Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from selenium.webdriver.common.by import By
- from pypom import Page
- class LoginPage(Page):
- _email_locator = (By.NAME, 'email')
- _password_locator = (By.NAME, 'password')
- _login_locator = (By.CSS_SELECTOR, '.px-2')
- def click_login(self):
- self.find_element(*self._login_locator).click()
- @property
- def type_email(self, value):
- self.find_element(*self._email_locator).send_keys(value)
- def type_password(self, value):
- self.find_element(*self._password_locator).send_keys(value)
- def login(self, email, password):
- self.type_email(email)
- self.type_password(password)
- self.click_login()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement