def test_login(self): driver = self.driver driver.get("http://automationpractice.com/") login = LoginPage(driver) login.click_sign_in_link() login.enter_email("*****@*****.**") login.enter_password("12345") login.click_sign_in() time.sleep(3)
def test_login_valid(self): driver = self.driver # * Actions on login web-page driver.get(test_link) login_page = LoginPage(driver) login_page.enter_login(username) login_page.enter_password(password) login_page.click_submit() # self.assertIn("ukr.net", driver.title) # # driver.maximize_window() # # driver.implicitly_wait(10) # login_field = WebDriverWait(driver, 10).until( # EC.element_to_be_clickable((By.ID, "id-l")) # ) # # login_field.screenshot("./login_field_image.png") # login_field.send_keys(login) # driver.find_element_by_id("id-p").send_keys(password) # driver.find_element_by_xpath("//button[@type='submit']").click() # # * Actions on home web-page home_page = HomePage(driver) home_page.click_menu() home_page.click_logout() # driver.find_element_by_class_name("login-button__control").click() # driver.find_element_by_id("login__logout").click() # # driver.save_screenshot("./mailbox_image.png") time.sleep(3)
def test_01_login_by_valid_account(self): driver = self.driver driver.get('https://slack.com') login = LoginPage(driver) domain_name = 'loctesting' domain_url = 'https://' + domain_name + '.slack.com/' login.click_signin() login.enter_domain(domain_name) login.click_submit() login.verify_domain(domain_url) time.sleep(2)
def test_login_invalid(self): driver = self.driver # * Actions on login web-page driver.get(test_link) login_page = LoginPage(driver) login_page.enter_login("test123") login_page.enter_password(password) login_page.click_submit() message = driver.find_element_by_xpath("").text() self.assertEqual(message, "Неправильні дані")
def test_02_login_invalid(self): driver = self.driver driver.get('https://opensource-demo.orangehrmlive.com') login = LoginPage(driver) login.enter_username('Admin1') login.enter_password('admin123') login.click_login() message = driver.find_element_by_xpath("").text self.assertEqual(message, "Invalid credentials123") sleep(2)
def test_login_valid(self): driver = self.driver driver.get("https://opensource-demo.orangehrmlive.com") login = LoginPage(driver) login.enter_username("Admin") login.enter_password("admin123") login.click_login() homepage = HomePage(driver) homepage.click_welcome() homepage.click_logout()
def test_001_login_valid(self): driver = self.driver # * Actions on login web-page driver.get(test_link) login_page = LoginPage(driver) login_page.enter_login(username) login_page.enter_password(password) login_page.click_submit() # # * Actions on home web-page home_page = HomePage(driver) home_page.click_menu() home_page.click_logout() time.sleep(3)
def test_01_login_valid(self): driver = self.driver driver.get('https://opensource-demo.orangehrmlive.com') login = LoginPage(driver) login.enter_username('Admin') login.enter_password('admin123') login.click_login() homepage = HomePage(driver) sleep(1) homepage.click_welcome() sleep(1) homepage.click_logout() sleep(2)