-
-
Save SalmonMode/1ede19eba34bd1c25da4c6b0d7edd4c3 to your computer and use it in GitHub Desktop.
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
class UsernameField(PageComponent): | |
_locator = (By.ID, "username") | |
class PasswordField(PageComponent): | |
_locator = (By.ID, "password") | |
class LoginForm(PageComponent): | |
_locator = (By.ID, "login-form) | |
username = UsernameField() | |
password = PasswordField() | |
def fill_out(self, credentials: Credentials): | |
self.username = credentials.username | |
self.password = credentials.password | |
class LoginPage(Page): | |
login_form = LoginForm() | |
def login(self, credentials: Credentials): | |
self.login_form.fill_out(credentials) | |
self.login_form.submit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment