diff options
Diffstat (limited to 'common/ui_common/objects/fqdns.py')
| -rw-r--r-- | common/ui_common/objects/fqdns.py | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/common/ui_common/objects/fqdns.py b/common/ui_common/objects/fqdns.py index 6a818b50..60980501 100644 --- a/common/ui_common/objects/fqdns.py +++ b/common/ui_common/objects/fqdns.py @@ -384,7 +384,7 @@ class FQDNs: self.driver.isElementExist(Element=main_ObjectPage_import_files_error_type_posXpath) if self.driver.Exist: self.item_error = self.driver.find_element(By.XPATH,main_ObjectPage_import_files_error_type_posXpath).text - assert self.item_error =="Items cannot be empty","断言item为空" + assert self.item_error =="Please add at least one item","断言item为空" @screenshot_on_failure def _create(self,data:{}): self.loading_parameter(data) @@ -524,19 +524,19 @@ class FQDNs: item_datas = f.readlines() #读取所有行 item_data = item_datas[random.randint(0,len(item_datas)) - 2].strip() # Total校验 - total = self.driver.find_element(By.XPATH,"//div[@class='item-container']//div[contains(text(),'Total')]").text - count = total.split("Total:") + total = self.driver.find_element(By.XPATH,main_first_Item_count_posXpath).text + # count = total.split("Total:") total_files_num = len(set(item_datas)) - self.objects_po.invalid_format_num if total_files_num > 30: total_files_num = 30 - assert total_files_num == int(count[1]) + assert total_files_num == int(total) #item搜索校验 if '*' in item_data: item_data = item_data.strip('*') elif '$' in item_data: item_data = item_data.strip('$') self.driver.find_element(By.XPATH,mainPage_ObjectSearch_buttonSearch_Item_posXpath).send_keys(item_data + Keys.ENTER) - self.item_check_content = self.driver.find_element(By.XPATH,"//div[@class='item-box']//span/span").text + self.item_check_content = self.driver.find_element(By.XPATH,mobileIdentitiesObjectPage_content_inputItem1_posId).text assert item_data in self.item_check_content, "断言检查item文本正确" @@ -1618,13 +1618,12 @@ if __name__ == '__main__': # model=0/1 ====0:单个 1group # type =IMSI/Phone_Number/IMEI data= { - "ids": "用例3:FQDNs添加item", - "Name": "test-1", + "ids": "用例24:FQDN的item为空校验", + "Name": "test", "Create": { "model": "0", "type": "new_object", - "item": ["^example.com$"], - "item_modify": {"type": "add", "add_data": ["com$"]} + "item": "null" }, "Createtype": "FQDN", "Subtype": "", |
