def test_login_valid(self): driver = self.driver driver.get('https://lesemester.no/logg-inn/') driver.set_window_size(1024, 600) driver.maximize_window() driver.implicitly_wait(5) time.sleep(3) login = LoginPage(driver) login.enter_username("baerum-teacher19") login.enter_password("TestLesemester2020") login.click_login_page_login() time.sleep(2) homepage = HomePage(driver) time.sleep(4) homepage.click_welcome() time.sleep(3) homepage.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) homepage.click_welcome() homepage.click_logout() # self.driver.find_element_by_id('txtUsername').send_keys("Admin") # self.driver.find_element_by_id('txtPassword').send_keys('admin123') # self.driver.find_element_by_id('btnLogin').click() # self.driver.find_element_by_id('welcome').click() # self.driver.find_element_by_link_text("Logout").click() time.sleep(2)