Esempio n. 1
0
 def test_login1(self):
     '''用户名、密码为空登陆'''
     self.user_login_verify()
     po = login(self.driver)
     self.assertEqual(po.user_error_hint(), "请填写手机号码!")
     #self.assertEqual(po.pawd_error_hint(),"请填写登陆密码!")
     function.insert_img(self.driver, "user_pawd_empty.jpg")
Esempio n. 2
0
 def test_login5(self):
     '''用户名、密码正确'''
     self.user_login_verify(username="******", password='******')
     sleep(2)
     po = login(self.driver)
     self.assertEqual(po.user_login_success(), '请确认要登录的企业')
     function.insert_img(self.driver, "use" "r_pawd_ture.jpg")
Esempio n. 3
0
 def test_login4(self):
     '''用户名与密码不匹配'''
     character = random.choice('abcdefghijklmnopqrstuvwxyz')
     Password = "******" + character
     self.user_login_verify(username='******', password=Password)
     po = login(self.driver)
     self.assertEqual(po.pawd_wrong_hint(), "密码不正确")
     function.insert_img(self.driver, "user_pawd_error.jpg")
Esempio n. 4
0
 def test_login3(self):
     '''用户名为空,密码正确'''
     self.user_login_verify(password="******")
     po = login(self.driver)
     self.assertEqual(po.user_error_hint(), "请填写手机号码!")
     function.insert_img(self.driver, "user_empty.jpg")
Esempio n. 5
0
 def test_login2(self):
     '''用户名正确,密码为空登陆'''
     self.user_login_verify(username="******")
     po = login(self.driver)
     self.assertEqual(po.pawd_error_hint(), "请填写登录密码!")
     function.insert_img(self.driver, "pawd_empty.jpg")
Esempio n. 6
0
 def user_login_verify(self, username='', password=''):
     login(self.driver).user_login(username, password)
Esempio n. 7
0
 def test_staff(self):
      login(self.driver).user_login()
      sleep(2)
      staff(self.driver).staff_login_platform()