コード例 #1
0
 def test_login_phone_null(self):
     self.login("110224199201305248", "",
                CardUrl.CARD_NUMBER_QUERY_LOGIN_URL)
     sleep(1)
     self.assertIn("手机号码不能为空", self.number_phone_error_text())
     image_util.insert_img(self.driver, "phone_null.png")
     sleep(1)
コード例 #2
0
 def test_login_numb_english(self):
     self.login("李孝雪", "1762152373m", CardUrl.CUSTOMER_RECO_LOGIN_URL,
                '1001')
     sleep(2)
     self.assertIn("验证码为空或格式不正确", self.get_sms_error_text())
     image_util.insert_img(self.driver, "user_numb_english5.png")
     print('手机不正确,不是数字')
コード例 #3
0
 def test_login_numb_miss(self):
     self.login("李孝雪", "1762152373", CardUrl.CUSTOMER_RECO_LOGIN_URL,
                '1001')
     sleep(2)
     self.assertIn("手机号为空或格式不正确", self.get_sms_error_text())
     image_util.insert_img(self.driver, "user_numb_miss4.png")
     print('用户名正确,手机号码少一位')
コード例 #4
0
 def test_login_english_name(self):
     self.login("jingj", Phone.create_phone(),
                CardUrl.CUSTOMER_RECO_LOGIN_URL, '1001')
     sleep(2)
     self.assertIn("姓名为空或格式不正确", self.get_sms_error_text())
     image_util.insert_img(self.driver, "user_name_miss3.png")
     print('用户名为拼音,提示姓名为空或格式不正确')
     sleep(1)
コード例 #5
0
 def test_login_org_null(self):
     self.login("李芽", Phone.create_phone(), CardUrl.CUSTOMER_RECO_LOGIN_URL)
     sleep(3)
     message = self.driver.find_element_by_xpath(
         '//p[@id="copyright"]').text
     self.assertIn(u'©本服务由兴业银行信用卡中心提供', message)
     image_util.insert_img(self.driver, "user_pawd_true2.png")
     sleep(1)
コード例 #6
0
 def test_login_customer(self):
     self.login("512236197807102659", "15765484676", CardUrl.CARD_NUMBER_QUERY_LOGIN_URL)
     image_util.insert_img(self.driver, "customer_name.png")
     table = self.driver.find_element_by_xpath('//*[@id="app"]/div/div[1]/ul')
     trlist = self.driver.find_elements_by_tag_name('li')
     print(len(trlist))
     sleep(2)
     for row in trlist:
         if row.text == '申请日期:':
             self.assertIn(row.text, '申请日期:')
             print(row.text)
コード例 #7
0
 def test_login_null(self):
     self.login("", "", CardUrl.CARD_NUMBER_QUERY_LOGIN_URL)
     self.assertIn("身份证号不能为空", self.get_identify_error_text())
     self.assertIn("手机号码不能为空", self.number_phone_error_text())
     image_util.insert_img(self.driver, "customer_name.png")
コード例 #8
0
 def test_login_phone_space(self):
     self.login("110224199201305248", "123456789 1",
                CardUrl.CARD_NUMBER_QUERY_LOGIN_URL)
     self.assertIn("手机号格式不正确", self.number_phone_error_text())
     image_util.insert_img(self.driver, "customer_name.png")
コード例 #9
0
 def test_login_phone_miss(self):
     self.login("110224199201305248", "1576548467",
                CardUrl.CARD_NUMBER_QUERY_LOGIN_URL)
     sleep(1)
     self.assertIn("手机号格式不正确", self.number_phone_error_text())
     image_util.insert_img(self.driver, "phone_miss.png")
コード例 #10
0
 def test_login_identity_null(self):
     self.login("", Phone.create_phone(),
                CardUrl.CARD_NUMBER_QUERY_LOGIN_URL)
     sleep(1)
     self.assertIn("身份证号不能为空", self.get_identify_error_text())
     image_util.insert_img(self.driver, "identity_null.png")
コード例 #11
0
 def test_login_identity_miss(self):
     self.login("51223619780710265", Phone.create_phone(),
                CardUrl.CARD_NUMBER_QUERY_LOGIN_URL)
     sleep(1)
     self.assertIn("身份证号码有误,请确认", self.get_identify_error_text())
     image_util.insert_img(self.driver, "identity_miss.png")
コード例 #12
0
 def test_login_customer(self):
     self.login("512236197807102659", "15765484676",
                CardUrl.CARD_NUMBER_QUERY_LOGIN_URL)
     image_util.insert_img(self.driver, "customer_name.png")
     sleep(1)