def test_login_errorPassword(self):
     login(self.driver, '*****@*****.**', '123')
     self.accountMsg = WebDriverWait(self.driver, 20, 0.2).until(
         lambda x: x.find_element_by_class_name('account-form-error')).text
     logger.info('页面跳转成功')
     sleep(3)
     self.assertEqual('用户名或密码错误', self.accountMsg)
Beispiel #2
0
 def test_login(self):
     login(self.driver)
     self.accountMsg = WebDriverWait(
         self.driver, 20,
         0.2).until(lambda x: x.find_element_by_class_name('bn-more')).text
     self.assertEqual('小杨阳的帐号', self.accountMsg)
     logger.info('页面跳转成功')
Beispiel #3
0
 def test_login(self):
     login(self.driver)
     time.sleep(3)
     self.accountMsg = self.driver.find_element_by_class_name(
         'bn-more').text
     self.assertEqual('小杨阳的帐号', self.accountMsg)
     logger.info('页面跳转成功')
 def test_login_errorPassword(self):
     login(self.driver, '*****@*****.**', '123')
     time.sleep(1)
     self.accountMsg = self.driver.find_element_by_class_name(
         'account-form-error').text
     logger.info('页面跳转成功')
     self.assertEqual('用户名或密码错误', self.accountMsg)
Beispiel #5
0
 def test_commentTmplPhone(self):
     login(self.driver)
     self.url = 'https://movie.douban.com/subject/30166972/?from=showing'
     self.start5CommentBtn = self.driver.find_element_by_id('star5')
     self.start5CommentBtn.click()
     time.sleep(2)
     self.tmplPhoneMsg = self.driver.find_element_by_class_name('account-body-text').text
     self.assertEqual('验证手机号',self.tmplPhoneMsg)
Beispiel #6
0
 def test_commentTmplPhone(self):
     login(self.driver)
     self.post1 = WebDriverWait(self.driver,20,0.2).until(lambda x:x.find_element_by_xpath('//*[@id="screening"]/div[2]/ul/li[6]/ul/li[1]'))
     self.post1.click()
     logger.info('页面跳转成功')
     self.start5CommentBtn = WebDriverWait(self.driver,20,0.2).until(lambda x:x.find_element_by_id('star5'))
     self.start5CommentBtn.click()
     logger.info('页面跳转成功')
     self.tmplPhoneMsg = WebDriverWait(self.driver,20,0.2).until(lambda x:x.find_element_by_class_name('account-body-text'))
     self.assertEqual('验证手机号',self.tmplPhoneMsg)
Beispiel #7
0
 def test_commentTmplPhone(self):
     login(self.driver)
     time.sleep(2)
     self.post1 = self.driver.find_element_by_xpath('//*[@id="content"]/div/div[2]/div[4]/div[3]/div/div[1]/div/div[2]/a[1]/div')
     time.sleep(3)
     self.start5CommentBtn = self.driver.find_element_by_id('star5')
     self.start5CommentBtn.click()
     time.sleep(2)
     self.tmplPhoneMsg = self.driver.find_element_by_class_name('account-body-text').text
     self.assertEqual('验证手机号',self.tmplPhoneMsg)
Beispiel #8
0
 def test_commentTmplPhone(self):
     login(self.driver)
     self.post1 = self.driver.find_element_by_xpath(
         '//*[@id="billboard"]/div[2]/table/tbody/tr[1]/td[2]/a')
     time.sleep(3)
     self.start5CommentBtn = self.driver.find_element_by_id('star5')
     self.start5CommentBtn.click()
     time.sleep(2)
     self.tmplPhoneMsg = self.driver.find_element_by_class_name(
         'account-body-text').text
     self.assertEqual('验证手机号', self.tmplPhoneMsg)
Beispiel #9
0
 def test_commentTmplPhone(self):
     login(self.driver)
     time.sleep(2)
     self.post1 = self.driver.find_element_by_xpath('//*[@id="screening"]/div[2]/ul/li[6]/ul/li[1]')
     self.post1.click()
     logger.info('页面跳转成功')
     time.sleep(3)
     self.start5CommentBtn = self.driver.find_element_by_id('star5')
     self.start5CommentBtn.click()
     logger.info('页面跳转成功')
     time.sleep(2)
     self.tmplPhoneMsg = getElement(self.driver,By.class,'account-body-text').text
     self.assertEqual('验证手机号',self.tmplPhoneMsg)
Beispiel #10
0
 def test_login_errorPassword(self):
     login(self.driver,'*****@*****.**','123')
     self.accountMsg = getElement(self.driver,class,'account-form-error').text
     logger.info('页面跳转成功')
     self.assertEqual('用户名或密码错误',self.accountMsg)
Beispiel #11
0
 def test_login_errorPassword(self):
     login(self.driver, username, '123')
     time.sleep(3)
Beispiel #12
0
 def test_login(self):
     login(self.driver)
     self.accountMsg = getElement(self.driver,By.CLASSNAME,'bn-more').text
     self.assertEqual('小杨阳的帐号',self.accountMsg)
     logger.info('页面跳转成功')
 def test_login_errorPassword(self):
     login(self.driver, '*****@*****.**', '123')
     time.sleep(3)