robotframework-pageobjectlibrary | Lightweight keyword library | Crawler library
kandi X-RAY | robotframework-pageobjectlibrary Summary
kandi X-RAY | robotframework-pageobjectlibrary Summary
PageObjectLibrary is a lightweight Robot Framework keyword library that makes it possible to use the Page Object pattern when testing web pages with the keyword based approach of robot framework.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Go to the specified page
- Verify that the current page should be used
- Check if current page is the current page
- Wait until old page is stale
- Fetch and return a Library instance
- Login as a normal user
- Click the submit button
- Enter a password
- Enter username
- Handle GET requests
- Redirect to the given uri
- Handle login form
- Returns a form storage
robotframework-pageobjectlibrary Key Features
robotframework-pageobjectlibrary Examples and Code Snippets
from PageObjectLibrary import PageObject
class LoginPage(PageObject):
PAGE_TITLE = "Login - PageObjectLibrary Demo"
PAGE_URL = "/login.html"
_locators = {
"username": "id=id_username",
"password": "id=id_password",
*** Test Cases ***
| Login with valid credentials
| | Go to | ${ROOT}/Login.html
| | Wait for page to contain | id=id_username
| | Input text | id=id_username | ${USERNAME}
| | Input text | id=id_password | ${PASSWORD}
| | Click button | id=id_form_s
*** Test Cases ***
| Login with valid credentials
| | Go to page | LoginPage
| | Login as a normal user
| | The current page should be | DashboardPage
Community Discussions
Trending Discussions on robotframework-pageobjectlibrary
QUESTION
I am writing a custom Page Object library for Robot Framework like this one: robotframework-pageobjectlibrary
My page custom keywords (page objects) are in a separate folder and when I run my Robot Framework
tests, I give their path with the --pythonpath
option like this: robot --pythonpath ../resources/pageobjects lib-test/test.robot
.
My directory structure looks like this:
...ANSWER
Answered 2019-Oct-17 at 15:36For the page object library to work, you must first import PageObjectLibrary
in your test. Then, you must request that a page object library be loaded before you can use the keywords in that library.
Since your Open App
keyword is in a page object library, you must first call go to page CountryPage
or the current page should be CountryPage
. Calling either of those keywords will cause your library to be loaded, which then makes the keywords available.
QUESTION
could someone help me with this please. find attached dictionary.png
Questions:
- Why Intellij says that
No Usage found in Project Files
for dictionaries? when I try to click through. does anyone know? - Its
clearly in the robot test file under
variables
section
The reason why I'm trying to tackle is:
- All these dictionaries I've crated for other tests are moved to separate files in data
directory.
- Therefore click through is quite important to see the value of the dictionary keys.
ANSWER
Answered 2017-Oct-19 at 14:49In the IntelliJ IDE, the Find Usage
feature is not reliable. It's a known bug, but according to the responses to this post on the JetBrains community site the fix is to get the latest version of IntelliJ. If you have the latest version of IntelliJ and you're still getting this bug, ignore it. It shouldn't affect your code execution. It's a bug in a supposed-to-be helpful tool, not the end-all be-all information readout.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install robotframework-pageobjectlibrary
You can use robotframework-pageobjectlibrary like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page