def auth(driver, config): page_object = BasePage(driver, config) login = config['email'] paswd = config['password'] locator = basic_locators.BasePageLocators() page_object.click(locator.AUTH_BUTTON) page_object.find(locator.EMAIL).send_keys(login) page_object.find(locator.PASSWORD).send_keys(paswd) page_object.click(locator.ACCEPT) return MainPage(driver, config)
def incorrect_input(driver, config): page_object = BasePage(driver, config) login = '******' paswd = 'Incorrect_user_password' config['fake_email'] = login locator = basic_locators.BasePageLocators() page_object.click(locator.AUTH_BUTTON) page_object.find(locator.EMAIL).send_keys(login) page_object.find(locator.PASSWORD).send_keys(paswd) page_object.click(locator.ACCEPT) return MainPage(driver, config)
def __init__(self, driver): self.driver = driver self.base_page = BasePage(self) self.registration = Registration(self) self.wizard = Wizard(self) self.dashboard = DashBoard(self) self.account = Account(self)
def base_page(driver, config): return BasePage(driver, config)
def base_page(driver): return BasePage(driver=driver)
def __init__(self, driver): if 'dashboard' not in driver.current_url: raise AuthFailedException BasePage.__init__(self, driver)
def auto(driver): page = BasePage(driver) page.authorization(page.user, page.password) return BasePage(page.driver)
def reg(driver, username, email, password): page = BasePage(driver) page.go_to_reg() regPage = RegPage(driver) regPage.reg(username, email, password)
def auth(driver): page = BasePage(driver) page.auth(page.LOGIN, page.PASSWORD)
def auto_auth(driver): page = BasePage(driver) page.auth(page.EMAIL, page.PASSWORD) return CabinetPage(page.driver)
def __init__(self, driver): BasePage.__init__(self, driver)
def __init__(self, driver): BasePage.__init__(self, driver) self.driver.get(self.url)