def test_uclogin2(self): test_cloudaccount_login(self.driver,self.login_url, username="******", password="", token="") sleep(1) get_screenshot(self.driver,"test_uclogin2") login_page=LoginPage(self.driver,u"baidu", u"baidu Cloud") self.assertEqual(login_page.uclogin_password_error_hint(), u"密码不能为空") self.assertEqual(login_page.uclogin_token_error_hint(), u"验证码不能为空")
def test_baidulogin1(self): test_user_login(self.driver, self.login_url, username="", password="") sleep(1) login_page = LoginPage(self.driver, u"baidu", u"baidu Cloud") self.assertEqual(login_page.baiduaccountlogin_error_hint(), u"请您输入手机/邮箱/用户名") get_screenshot(self.driver, "test_baidulogin1")
def test_baidulogin4(self): test_user_login(self.driver, self.login_url, username="******", password="******") sleep(1) login_page = LoginPage(self.driver, u"baidu", u"baidu Cloud") self.assertEqual(login_page.baiduaccountlogin_error_hint(), u"用户名或密码有误,请重新输入或找回密码") get_screenshot(self.driver, "test_baidulogin4")