コード例 #1
0
 def test_login_3_incorrect_pwd(self):
     logger.info(u'Test login with incorrect password')
     login_page = LoginPage(self.driver)
     login_page.sleep(2)
     login_page.input_email('*****@*****.**')
     login_page.sleep(2)
     login_page.input_pwd('kiwitest')
     login_page.sleep(2)
     login_page.sign_in()
     login_page.sleep(2)
     try:
         self.assertEqual(u'用户名或者密码错误', login_page.get_tips_info())
         logger.info('用户名或者密码不正确')
     except Exception as e:
         logger.error(u'错误提示不正确,请检查页面是否更新:%s' % format(e))
コード例 #2
0
 def test_login_2_incorrect_account(self):
     logger.info(u'Test login with incorrect account.')
     login_page = LoginPage(self.driver)
     login_page.sleep(2)
     login_page.input_email('*****@*****.**')
     login_page.sleep(2)
     login_page.input_pwd('kiwi888zx')
     login_page.sleep(2)
     login_page.sign_in()
     login_page.sleep(2)
     try:
         self.assertEqual(u'该账号不存在,请注册', login_page.get_tips_info())
         logger.info('账号未曾注册')
     except Exception as e:
         logger.error(u'错误提示不正确, 请检查页面是否更新:%s' % format(e))