예제 #1
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")
예제 #2
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")
예제 #3
0
 def test_login_normal(self):
     self.login(Phone.create_phone(), CardUrl.MGM_GIFT_DELIVERY_LOGIN_URL)
     message = self.driver.find_element_by_xpath('//*[@id="app"]/div/p[1]').text
     print(message)
     sleep(1)
     self.assertIn("礼品配送信息登记", message)
 def test_phone_random(self):
     self.login(Phone.create_phone(),
                CardUrl.SOURCE_RECOMMENDATION_RESULT_QUERY_LOGIN_URL)
 def test_login_success(self):
     self.login(Phone.create_phone(),
                CardUrl.RECOMMENDATION_RESULT_QUERY_LOGIN_URL)
 def test_login_custom_identity_no(self):
     self.basic_info_page("你好", "512236197807102650", Phone.create_phone(),
                          CardUrl.CARD_APPLICATION_BASIC_INFO_URL)
     base_info_label = self.driver.find_element_by_xpath(
         '/html/body/div[11]')
     self.assertEqual(base_info_label.text, '请输入正确的18位证件号码')
 def test_login_custom_name_null(self):
     self.basic_info_page("", "512236197807102659", Phone.create_phone(),
                          CardUrl.CARD_APPLICATION_BASIC_INFO_URL)
     base_info_label = self.driver.find_element_by_xpath(
         '/html/body/div[11]')
     self.assertEqual(base_info_label.text, '姓名不能为空')