Exemple #1
0
 def test_login_001_all_empty(self):
     account = ''
     username = ''
     password = ''
     vercode = ''
     po = Login(self.browser)
     po.login_action(account, username, password, vercode)
     error = po.login_error_hint()
     print(error)
     self.assertEqual(po.login_error_hint(), '请输入代理商账号或登录号!')
Exemple #2
0
 def test_login3(self):
     '''用户名密码不匹配'''
     self.user_login_verify(username='******', password='******')
     po = Login(self.driver)
     sleep(2)
     self.assertEqual(po.login_error_hint(), '密码错误')
     function.insert_img(self.driver, "pwd_error.png")
Exemple #3
0
 def test_login_005_vercode_wrong(self):
     account = 'A0000000000001'
     username = '******'
     password = '******'
     vercode = '1234'
     po = Login(self.browser)
     po.login_action(account, username, password, vercode)
     self.assertEqual(po.login_error_hint(), '验证码输入有误,请重新输入验证码!')
Exemple #4
0
 def test_login_004_vercode_empty(self):
     account = 'A0000000000001'
     username = '******'
     password = '******'
     vercode = ''
     po = Login(self.browser)
     po.login_action(account, username, password, vercode)
     self.assertEqual(po.login_error_hint(), '请输入四位验证码!')
Exemple #5
0
 def test_login_003_password_empty(self):
     account = 'A0000000000001'
     username = '******'
     password = ''
     vercode = ''
     po = Login(self.browser)
     po.login_action(account, username, password, vercode)
     self.assertEqual(po.login_error_hint(), '密码不能为空!')
Exemple #6
0
 def test_login_002_username_empty(self):
     account = 'A0000000000001'
     username = ''
     password = ''
     vercode = ''
     po = Login(self.browser)
     po.login_action(account, username, password, vercode)
     self.assertEqual(po.login_error_hint(), '请输入代理商操作员账号!')
Exemple #7
0
 def test_login2(self):
     '''用户名正确密码为空登录'''
     self.user_login_verify(username='******')
     po = Login(self.driver)
     self.assertEqual(po.login_error_hint(), '请输入密码')
     function.insert_img(self.driver, "pwd_empty.png")
Exemple #8
0
 def test_login1(self):
     '''用户名密码为空登录'''
     self.user_login_verify()
     po = Login(self.driver)
     self.assertEqual(po.login_error_hint(), '请输入用户名')
     function.insert_img(self.driver, "user_pwd_empty.png")