Esempio n. 1
0
 def test_001_安全验证_修改登录密码成功(self):
     old_pwd = account_data.普通全新账号['pwd']
     new_pwd = 'test1234'
     func.modify_login_password(self.driver, old_pwd, new_pwd)
     func.log_in(self.driver, account_data.普通全新账号['account'], new_pwd)
     sleep(20)
     user_name = self.page.用户名().text
     self.assertNotEqual('请登录', user_name, '修改密码后登录失败')
     func.modify_login_password(self.driver, new_pwd, old_pwd)
     func.log_in(self.driver, account_data.普通全新账号['account'], old_pwd)
     sleep(20)
Esempio n. 2
0
 def setUp(self):
     self.page = 用户中心页(self.driver)
     self.page.进入用户页面按钮().click()
     sleep(2)
     user_name = self.page.用户名().text
     if '请登录' in user_name:
         self.page.用户名().click()
         sleep(10)
         func.log_in(self.driver, account_data.普通全新账号['account'],
                     account_data.普通全新账号['pwd'])
         sleep(15)
Esempio n. 3
0
 def test_009_验证邮箱注册成功(self):
     func.register_by_email(self.driver, '*****@*****.**',
                            'test0002', 'test1234')
     func.log_in(self.driver, '*****@*****.**', 'test1234')
     user_name = self.page.用户名().text
     self.assertNotEqual('请登录', user_name, '登录失败')
Esempio n. 4
0
 def test_008_验证手机注册成功(self):
     func.register_by_phone(self.driver, '15811055254', 'test123123',
                            'test1234', 'test1234')
     func.log_in(self.driver, '15811055254', 'test1234')
     user_name = self.page.用户名().text
     self.assertNotEqual('请登录', user_name, '登录失败')
Esempio n. 5
0
 def test_006_验证登录_谷歌验证码输入不正确时提示信息正确(self):
     func.log_in(self.driver, account_data.有谷歌验证码的账号['account'],
                 account_data.有谷歌验证码的账号['pwd'], '123123')
     self.assertIn('请输入密码', self.driver.page_source, '应提示输入账号')
     self.driver.back()
Esempio n. 6
0
 def test_005验证带有谷歌验证码的账号登录正确(self):
     func.log_in(self.driver, account_data.有谷歌验证码的账号['account'],
                 account_data.有谷歌验证码的账号['pwd'], '123456')
     user_name = self.page.用户名().text
     self.assertNotEqual('请登录', user_name, '登录失败')
Esempio n. 7
0
 def test_004_验证登录功能时账号密码输入错误提示信息正确(self):
     func.log_in(self.driver, account_data.普通全新账号['account'], '123456sdf')
     self.assertIn('登录账号或密码不正确', self.driver.page_source, '应提示登录账号或密码不正确')
     func.log_in(self.driver, '1' + account_data.普通全新账号['account'],
                 account_data.普通全新账号['pwd'])
     self.assertIn('登录账号或密码不正确', self.driver.page_source, '应提示登录账号或密码不正确')
Esempio n. 8
0
 def test_001_验证登录正确(self):
     func.log_in(self.driver, account_data.普通全新账号['account'],
                 account_data.普通全新账号['pwd'])
     sleep(15)
     user_name = self.page.用户名().text
     self.assertNotEqual('请登录', user_name, '登录失败')