def test1_auto_login_next(self): """勾选【下次自动登录】登录测试""" pl = PageLogin(self.driver) pl.auto_login() sleep(3) self.driver.switch_to.default_content() assert (self.text == pl.login_success_hint()), '登录失败!'
def test_login_ok(self): """正确的用户名和密码登录测试""" pl = PageLogin(self.driver) pl.test_login() self.driver.switch_to.default_content() sleep(3) get_screenshot(self.driver, "./mail_auto_test/report/img/login_ok.jpg") assert(self.text == pl.login_success_hint()), '登录失败!'
def test5_login_ok(self): """正确的用户名和密码登录测试""" text = '*****@*****.**' pl = PageLogin(self.driver) pl.test_login() self.driver.switch_to.default_content() sleep(3) assert (text == pl.login_success_hint()), '登录失败!'