Comments (3)
The problem is that you have not provided an implementation for the method _is_current_page
. The default implementation assumes there is a class attribute named PAGE_TITLE
. You haven't defined that variable, and there's a bug in the default implementation of _is_current_page
that throws this error when it can't find the expected page title.
The simple solution is to add a definition for PAGE_TITLE
to your class definition:
class LoginPage(PageObject):
PAGE_TITLE = "The Internet"
...
This is both a bug in the definition of the PageObject
class, but also in my documentation. Thanks for reporting the issue.
from robotframework-pageobjectlibrary.
@automationTestStudent - have you tried specifying the namespace for each of the methods/keywords you're trying to use? In other words:
Valid Login
[Setup] Go to page LoginPage
Enter Username tomsmith
Enter password SuperSecretPassword!
LoginPage.new_keyword
Click the login button
The current page should be SecureAreaPage
SecureAreaPage.new_keyword
sleep 5
My advice is to use a different keyword name for each of these page objects. If you need a method that is universal, see Bryan's article on Mixins.
from robotframework-pageobjectlibrary.
@GLMeece it's perfectly fine (and, arguably, very common) to have the same keyword in multiple page objects. While you are correct that using a fully qualified keyword name can work, the page object library was designed so that you shouldn't need to do that.
from robotframework-pageobjectlibrary.
Related Issues (19)
- First Feedback HOT 2
- Updates for new versions of SeleniumLibrary HOT 1
- Dynamic elements in locators? HOT 2
- Error while importing module six
- Installation issue with Python 3.6 HOT 4
- Problem with setting library search order
- Localization Support
- Webdriver didn't get website with document.readyState == 'complete' HOT 3
- Init method of user class execute few times
- wait_for_page_refresh, "timeout" parameter not taken into account by the wait_for_condition function
- Need to implement Inheritance using PageObject library HOT 4
- User defined inheritance using Page Object Library HOT 1
- Argument check probably wrong
- Page Object and robotframework-browser (playwright)?
- Could this package be used with other test-framework HOT 5
- Test Setup broken HOT 5
- Page objects with extended Selenium2Library HOT 3
- How to do when lots of page objects are in different directories? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from robotframework-pageobjectlibrary.