-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed when keyword conflicts in two files #15
Comments
@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. |
The problem is that you have not provided an implementation for the method The simple solution is to add a definition for
This is both a bug in the definition of the |
@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. |
Hi,
I follow the guide "https://github.com/boakley/robotframework-pageobjectlibrary/wiki/Tutorial" to learn how to use this library.
When keyword doesn't conflict, the case passed.
But after adding conflict keyword in two files as following, the case failed, can you help to check where is wrong in my test, thank you very much.
In LoginPage.py:
In SecureAreaPage:
And change the 'Valid Login' Case as following
This time, the case failed, here is the error information
The text was updated successfully, but these errors were encountered: