Exemplo n.º 1
0
    def test_login_valid(self):
        global driver
        driver = self.driver
        self.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()
        x = driver.title
        assert x == "abc"

        #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)
Exemplo n.º 2
0
 def test_login_valid(self):
     driver = self.driver
     driver.get("https://www.facebook.com")
     login = LoginPage(driver)
     login.enter_username("*****@*****.**")
     login.enter_password("madrid")
     login.click_login()
Exemplo n.º 3
0
 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_button()
     time.sleep(2)
Exemplo n.º 4
0
    def test_login_valid(self):
        driver = self.driver
        driver.get("https://kabirmundra-trials65.orangehrmlive.com/")
        login = LoginPage(driver)
        login.enter_username("Admin")
        login.enter_password("lZK@sO9Md6")
        login.click_login()

        homepage = HomePage(driver)
        homepage.click_user()
        time.sleep(10)
        homepage.click_logout()