Esempio n. 1
0
class LoginPage:

    def __init__(self, browser: Browser):
        self.browser = browser
        self.edt_username = Element(browser, '#username input')
        self.edt_password = Element(browser, 'input[type="password"]')
        self.btn_login = Element(browser, 'button[ng-click="Login()"]')

    def log_in(self, user: dict):
        self.edt_username.set_text(user['username'])
        self.edt_password.set_text(user['password'])
        self.btn_login.web_element.click()
Esempio n. 2
0
 def __init__(self, browser: Browser):
     self.browser = browser
     self.edt_username = Element(browser, '#username input')
     self.edt_password = Element(browser, 'input[type="password"]')
     self.btn_login = Element(browser, 'button[ng-click="Login()"]')