Beispiel #1
0
 def test_1(self):
     denglu = Dl()
     duqu = Dq()
     shuju = duqu.QQdenglu()
     dr = denglu.QQkj(shuju[0][0], shuju[0][1])
     sleep(2)
     self.assertNotEqual(dr.current_url, 'https://qzone.qq.com/')
Beispiel #2
0
 def test_4(self):
     dl = Dl()
     dr = dl.denglu2()
     dr.find_element_by_class_name('loginBtn').click()
     wd = dr.find_element_by_class_name('current').is_displayed()
     self.assertEqual(wd, True)
     sleep(2)
     dr.quit()
Beispiel #3
0
 def test_3(self):
     dl = Dl()
     dr = dl.denglu2()
     dr.find_element_by_xpath('//*[@id="userForm"]/div[3]/a').click()
     wd = dr.find_element_by_name('phone').is_displayed()
     self.assertEqual(wd, True)
     sleep(2)
     dr.quit()
Beispiel #4
0
 def test_2(self):
     dl = Dl()
     dr = dl.jingdong()
     sleep(2)
     dr.find_element_by_xpath('//*[@id="settleup-2014"]/div[1]/a').click()
     sleep(2)
     ww = dr.find_element_by_class_name('p-name').is_displayed()
     sleep(2)
     self.assertEqual(ww, True)
Beispiel #5
0
 def test_2(self):
     denglu = Dl()
     duqu = Dq()
     shuju = duqu.QQdenglu()
     hang = len(shuju)
     for i in range(hang):
         dr = denglu.QQkj(shuju[1][0], shuju[1][1])
         sleep(3)
         self.assertEqual(dr.current_url, 'https://qzone.qq.com/')
Beispiel #6
0
 def test_2(self):
     dl = Dl()
     dr = dl.denglu2()
     wd = dr.find_element_by_xpath(
         '/html/body/div[2]/div/div/div/div/div[2]/div/li[3]/a/img')
     sleep(2)
     ActionChains(dr).move_to_element(wd).perform()
     aa = dr.find_element_by_id('saveCodeDiv').is_displayed()
     self.assertEqual(aa, True)
     sleep(2)
     dr.quit()
Beispiel #7
0
 def test_1(self):
     dl = Dl()
     dr = dl.denglu2()
     dr.find_element_by_xpath(
         '/html/body/div[2]/div/div/div/div/div[2]/div/li[2]/a/img').click(
         )
     sleep(1)
     wd = dr.find_element_by_xpath('//*[@id="login"]').is_displayed()
     sleep(2)
     self.assertEqual(wd, True)
     sleep(2)
     dr.quit()
Beispiel #8
0
 def test_1(self):
     dl = Dl()
     dr = dl.jingdong()
     ww = dr.find_element_by_class_name(
         'ftx-02').is_displayed()  # 判断有没有显示在页面上
     self.assertEqual(ww, True)