test_ui.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:integration 作者: mendersoftware 项目源码 文件源码
def login(self, driver):
        if "login" not in driver.current_url:
            return
        mock_email    = auth.email
        mock_password = auth.password
        print("Logging in with credentials:")
        print("Email: " + mock_email)
        print("Password: " + mock_password)
        email_field = driver.find_element_by_id("email")
        email_field.click()
        email_field.send_keys(mock_email)
        password_field = driver.find_element_by_id("password")
        password_field.click()
        password_field.send_keys(mock_password)
        clicked = self.click_button(driver, "log in")
        if not clicked:
            clicked = self.click_button(driver, "create user")
        assert clicked
        xp = tag_contents_xpath("button", "Dashboard")
        element = self.wait_for_element(driver, By.XPATH, xp)
        assert element
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号