def test_interact_permission(self): self.login(Phone.create_phone(), 4484040029, CardUrl.INTERACT_QR_CODE_TPLUS_QUERY_LOGIN_URL) interact_error_hint_loc = (By.XPATH, '//*[@id="app"]/div/div[3]/div/p[2]') operator = LoginOperator(self.driver) self.assertIn("无权查询", operator.get_text(interact_error_hint_loc))
def test_interact_code_null(self): self.login('12345698755', "", CardUrl.INTERACT_QR_CODE_TPLUS_QUERY_LOGIN_URL) interact_error_hint_loc = (By.XPATH, '//*[@id="app"]/div/ul/li[1]/div/div[3]/p') operator = LoginOperator(self.driver) self.assertIn("推广人代码不能为空", operator.get_text(interact_error_hint_loc))
def get_org_error_text(self): mgm_login_loc = (By.XPATH, '//*[@id="app"]/div/ul/li[3]/div/div[3]/p') operator = LoginOperator(self.driver) return operator.get_text(mgm_login_loc)
def get_phone_error_text(self): phone_error_hint_loc = (By.XPATH, '//*[@id="app"]/div/ul/li[1]/div/div[3]/p') operator = LoginOperator(self.driver) return operator.get_text(phone_error_hint_loc)
def card_error_text(self): card_error_hint_loc = (By.XPATH, '/html/body/div[8]') operator = LoginOperator(self.driver) return operator.get_text(card_error_hint_loc )
def phone_interact_error_text(self): interact_error_hint_loc = (By.XPATH, '//*[@id="app"]/div/ul/li[2]/div/div[3]/p' ) # 交互式二维码的无权限弹框 operator = LoginOperator(self.driver) return operator.get_text(interact_error_hint_loc)
def get_identify_error_text(self): fast_identity_error_hint_loc = ( By.XPATH, '//*[@id="app"]/div/ul/li[1]/div/div[3]/p ' ) # 卡号进度申请查询错误提示弹框定位 operator = LoginOperator(self.driver) return operator.get_text(fast_identity_error_hint_loc)
def get_sms_error_text(self): sms_error_hint_loc = (By.XPATH, '//*[@id="app"]/div/div[5]/div/p[2]' ) # 推荐客户错误提示弹框定位 operator = LoginOperator(self.driver) return operator.get_text(sms_error_hint_loc)