示例#1
0
    def test_Login(self):
        driver = self.driver
        driver.get("https://www.saucedemo.com/")

        login = LoginPage(driver)
        login.enter_username("standard_user")
        login.enter_password("secret_sauce")
        login.click_login()

        homepage = HomePage(driver)
        homepage.OpenSidebar()
        homepage.LogoutClick()
        # self.driver.find_element_by_id("user-name").send_keys("standard_user")
        # self.driver.find_element_by_id("password").send_keys("secret_sauce")
        # self.driver.find_element_by_id("login-button").click()
        # self.driver.find_element_by_class_name("bm-burger-button").click()
        # self.driver.find_element_by_id("logout_sidebar_link").click()
        time.sleep(2)
        print("Test Completed!")
示例#2
0
    def test_login_valid(self):
        driver = self.driver
        driver.get("https://opensource-demo.orangehrmlive.com/")
        # create a object of login page
        login = LoginPage(driver)
        login.enter_username("Admin")
        login.enter_password("admin123")
        login.click_login()

        homepage = HomePage(driver)
        homepage.click_welcome()
        homepage.click_logpout()
        time.sleep(2)
示例#3
0
    def test_login(self):
        driver = self.driver
        driver.get("https://opensource-demo.orangehrmlive.com/")

        # Create object of loginPage
        login = LoginPage(driver)
        login.enter_username('Admin')
        login.enter_password('admin123')
        login.click_login()

        homepage = HomePage(driver)
        homepage.click_welcome()
        homepage.click_logout()
        time.sleep(2)
示例#4
0
    def test_login(self):

        #driver = self.driver
        self.driver.get("https://opensource-demo.orangehrmlive.com/index.php/auth/login")
        login = LoginPage(self.driver)
        #login = LoginPage(driver)

        login.enterUsername("Admin")
        login.enterPassword("admin123")
        login.clickLogin()

        homepage = HomePage(self.driver)
        homepage.clickWelcome()
        homepage.clickLogout()
    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()
        # 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)