예제 #1
0
 def tearDown(self):
     print("tearDown")
     try:
         if MyPageIndex().MyLoginText_by_Id().text == "CC83483282":
             #enter into the accountinfopage
             MyPageIndex().MyLoginText_by_Id().click()
             AccountInfoPage().LogoutBtn_Id().click()
     except:
         pass
예제 #2
0
    def testLogin001(self):
        HomePageIndex().HomeBtn_Android_Uiautomator().click()
        time.sleep(2)
        MyPageIndex().MyLoginText_by_Id().click()
        time.sleep(2)
        LoginPageIndex().LoginPage_Text_Usr_Uiautotor().send_keys(
            "18983838625")
        #LoginPageIndex().LoginPage_Text_Usr_Uiautotor().send_keys(ReadXMLDriver().returnXMLfile("LoginData.xml","LoginData","Login001"))
        time.sleep(2)
        LoginPageIndex().LoginPage_Text_Pwd_By_Id().send_keys("12345678")
        time.sleep(2)
        LoginPageIndex().LoginPage_Btn_by_Id().click()
        time.sleep(2)

        expValue = "CC83483282"
        actValue = MyPageIndex().MyLoginText_by_Id().text
        msg = "登录测试失败"
        self.assertEqual(expValue, actValue,
                         msg)  #fail, if expValue != actValue,and print (msg)
    def testLogin002(self):
        HomePageIndex().HomeBtn_By_Id().click()
        time.sleep(1)

        MyPageIndex().MyLoginText_by_Id().click()
        time.sleep(1)

        LoginPageIndex().LoginPage_Text_Usr_Uiautotor().send_keys("18983838625")
        time.sleep(1)

        LoginPageIndex().LoginPage_Text_Pwd_By_Id().send_keys("12345678")
        time.sleep(2)

        LoginPageIndex().LoginPage_Btn_by_Id().click()
        time.sleep(2)

        expValue = "CC83483282"
        actValue = MyPageIndex().MyLoginText_by_Id().text
        self.assertEqual(expValue,actValue)
예제 #4
0
    def testLogin002(self):
        HomePageIndex().HomeBtn_By_Id().click()
        time.sleep(2)
        #MyPage click the login button
        MyPageIndex().MyLoginText_by_Id().click()
        time.sleep(2)
        #input username
        LoginPageIndex().LoginPage_Text_Usr_Uiautotor().send_keys(
            "18983838625")
        time.sleep(2)
        #input password
        LoginPageIndex().LoginPage_Text_Pwd_By_Id().send_keys("12345678")
        time.sleep(2)
        # Login click
        LoginPageIndex().LoginPage_Btn_by_Id().click()
        time.sleep(2)

        expValue = "CC83483282"
        actValue = MyPageIndex().MyLoginText_by_Id().text
        # self.assertEqual(expValue,actValue,msg) #fail, if expValue != actValue,and print (msg)
        self.assertEqual(expValue, actValue)