Skip to content

Instantly share code, notes, and snippets.

@boatcoder
Created September 29, 2020 20:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boatcoder/2da3841753d7251989379978a8036b6d to your computer and use it in GitHub Desktop.
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
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