Created
September 29, 2020 20:00
-
-
Save boatcoder/2da3841753d7251989379978a8036b6d to your computer and use it in GitHub Desktop.
Page description of the login page. Connects the Locators to the actual Page Elements
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from .Base import BasePage | |
from locators import LoginPageLocators as Locators | |
from elements import InputPageElement, PageElement | |
class LoginPage(BasePage): | |
""" Contains methods to do things on the login page """ | |
username = InputPageElement(Locators.USERNAME) | |
password = InputPageElement(Locators.PASSWORD) | |
error_message = PageElement(Locators.LOGIN_ERROR_MESSAGE) | |
login_button = PageElement(Locators.LOGIN_BUTTON) | |
def login(self): | |
self.username = XXXXXXXXXXX | |
self.password = XXXXXXXXXXX | |
self.click_login_button() | |
def click_login_button(self): | |
self.login_button.click() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment