class TestLogin(BaseTest): def test_home_page(self): self.loginPage = LoginPage(self.driver) self.loginPage.input_username(TestData.username) self.loginPage.input_password(TestData.password) self.loginPage.click_login_button() self.homePage = HomePage(self.driver) self.homePage.get_title(TestData.home_page_title)
def test_log_in_with_email(self): driver = self.driver homePage = HomePage(driver) homePage.slides_item_is_displayed() homePage.click_account_icon() homePage.account_icon_dropdown_is_displayed() homePage.click_login_label() loginPage = LoginPage(driver) loginPage.register_button_is_displayed() loginPage.facebook_button_is_displayed() loginPage.click_login_button() loginPage.send_login_email() loginPage.send_login_password() loginPage.click_submit_login_button() profilePage = ProfilePage(driver) profilePage.purchased_tab_is_displayed()
def login_attempt(self, email, password): driver = self.driver login = LoginPage(driver) login.enter_login_details(email, password) login.click_login_button()