Пример #1
0
 def test_002(self):
     Zhuce().zhuce("dasds", "*****@*****.**", "", "", "", "", "", "18410178656", "dalian")
     Zhuce().question(6)
     Zhuce().submit()
     time.sleep(2)
     self.msg = Denglu().alert()
     shiji = self.msg.text
     yuqi = u"登录密码不能为空"
     print(shiji)
     # 点击确定按钮
     Denglu().alert().accept()
     self.assertIn(yuqi, shiji, msg=u"对比失败")
     pass
Пример #2
0
    def test_004(self):

        # Zhuce().question(6)
        self.driver.find_element_by_name("username").send_keys("123456")
        Zhuce().submit()
        time.sleep(2)
        self.msg = Denglu().alert()
        shiji = self.msg.text
        yuqi = u"登录密码不能为空"
        print(shiji)
        # 点击确定按钮
        Denglu().alert().accept()
        self.assertIn(yuqi, shiji, msg=u"对比失败")
        pass
Пример #3
0
    def test_003(self):
        # Zhuce().zhuce("", "", "", "", "", "", "", "", "")
        # Zhuce().question(6)
        Zhuce().submit()
        time.sleep(2)
        self.msg = Denglu().alert()
        shiji = self.msg.text
        yuqi = u"登录密码不能为空"
        print(shiji)
        # 点击确定按钮
        Denglu().alert().accept()
        self.assertIn(yuqi, shiji, msg=u"对比失败")

        pass
Пример #4
0
 def test_002(self):
     i = "2"
     print "test00" + i
     username = Duqu().duqu("lianxi", "denglu00" + i, "username")
     password = Duqu().duqu("lianxi", "denglu00" + i, "password")
     yuqi = Duqu().duqu("lianxi", "denglu00" + i, "yuqi")
     if username == " ":
         username = ""
     if password == " ":
         password = ""
     Denglu().denglu(username, password)
     a = Denglu().alert()
     #a = self.driver.find_element_by_xpath("/html/body/div[4]/div/div/div/div/p[1]")
     shiji = a.text
     print shiji
     self.assertIn(yuqi, shiji, msg=u"断言失败")
     pass
Пример #5
0
 def test_002(self):
     i="3"
     username = Huoquexel().duquexel("C"+i)
     password = Huoquexel().duquexel("D"+i)
     yuqi = Huoquexel().duquexel("E"+i)
     if username == " ":
         username=""
     if password==" ":
         password=""
     Denglu().denglu(username, password)
     a = Denglu().alert()
     #a = self.driver.find_element_by_xpath("/html/body/div[4]/div/div/div/div/p[1]")
     shiji = a.text
     print (shiji)
     Huoquexel().xieruexel("F" + i, shiji)
     Huoquexel().xieruexel("H" + i, time1)
     self.assertIn(yuqi, shiji, msg=u"断言失败")
     pass
Пример #6
0
 def tearDown(self):
     # 通过try进行判断有没有弹框
     try:
         Denglu().alert().accept()
     except Exception:
         # print u"没有弹框"
         pass
     self.driver.find_element_by_xpath("//*[@id=\"ECS_MEMBERZONE\"]/a[2]").click()
     pass
Пример #7
0
 def tearDownClass(self):
     Denglu().guanbi()
     pass
Пример #8
0
 def test_018(self):
     Denglu().denglu("123456", "123456")
     self.driver.find_element_by_xpath(
         "/html/body/div[4]/div/div/div/div/p[2]/a").click()