def test_sssx_0005_01_0(self): "「失信自然人」可以通过「地域」+「性别」复合筛选" log.info(self.test_sssx_0005_01_0.__doc__) try: self.dishone.into_dishonest_mid().click() # 进入查老赖中间页 self.operation.adb_send_input( By.ID, self.ELEMENT["dishonest_mid_input"], "李星雨", self.device ) self.dishone.search_city("安徽省", "安徽省全省") self.dishone.search_sex("女") car_id = self.operation.new_find_element( By.XPATH, self.ELEMENT["dishonest_card_id"].format(2) ).text city_info = card_operation().check_region(car_id) sex_info = card_operation().check_sex(car_id) self.assertIn("安徽省", city_info, "所属区域不符合筛选条件") self.assertEqual("女", sex_info, "出生年月不正确") except AssertionError as ae: raise self.failureException() except Exception as e: log.error(error_format(e)) raise Exception
def test_sssx_0006_01_0(self): "「失信自然人」可以通过「性别」+「出生年份」复合筛选" log.info(self.test_sssx_0006_01_0.__doc__) try: self.dishone.into_dishonest_mid().click() # 进入查老赖中间页 self.operation.adb_send_input( By.ID, self.ELEMENT["dishonest_mid_input"], "李星竹", self.device ) self.dishone.search_year("1998年", 0.6, 0.5) self.dishone.search_sex("女") car_id = self.operation.new_find_element( By.XPATH, self.ELEMENT["dishonest_card_id"].format(2) ).text self.assertIn("1998", car_id, "出生年月不正确") sex = card_operation().check_sex(car_id) self.assertEqual("女", sex, "性别不符合筛选结果") except AssertionError as ae: raise self.failureException() except Exception as e: log.error(error_format(e)) raise Exception
def test_sssx_0003_01_0(self): "按性别男进行筛选" log.info(self.test_sssx_0003_01_0.__doc__) try: self.dishone.into_dishonest_mid().click() # 进入查老赖中间页 self.operation.adb_send_input(By.ID, self.ELEMENT["dishonest_mid_input"], "司马峰", self.device) self.dishone.search_sex("男") tab_number = self.operation.count_num( By.XPATH, self.ELEMENT["dishonest_tab_name"]) for i in range(2, tab_number + 2): car_id = self.operation.new_find_element( By.XPATH, self.ELEMENT["dishonest_card_id"].format(i)).text sex_info = card_operation().check_sex(car_id) self.assertEqual("男", sex_info, "该老赖性别不符合") except AssertionError as ae: raise self.failureException() except Exception as e: log.error(error_format(e)) raise Exception
def test_sssx_0001_02_0(self): "按地域筛选后,所有的筛选结果均属于该地域" log.info(self.test_sssx_0001_02_0.__doc__) try: self.dishone.into_dishonest_mid().click() # 进入查老赖中间页 self.operation.adb_send_input(By.ID, self.ELEMENT["dishonest_mid_input"], "马云峰", self.device) self.dishone.search_city("江苏省", "无锡市") tab_number = self.operation.count_num( By.XPATH, self.ELEMENT["dishonest_tab_name"]) for i in range(2, tab_number + 2): car_id = self.operation.new_find_element( By.XPATH, self.ELEMENT["dishonest_card_id"].format(i)).text city_info = card_operation().check_region(car_id) self.assertIn("无锡市", city_info, "该老赖所属区域不符合") except AssertionError as ae: raise self.failureException() except Exception as e: log.error(error_format(e)) raise Exception