summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryouzhijiang <[email protected]>2024-10-21 18:31:22 +0800
committeryouzhijiang <[email protected]>2024-10-21 18:31:22 +0800
commite5c00777d4b1ea40f2f28d6ad2195dc278382d29 (patch)
tree8d7364ccb45c0dd98e8251aada3e3c1c7ba69376
parent722b69c4f665f5e0c305515f204b61c56469f651 (diff)
修改元素定位
-rw-r--r--common/ui_common/dashboard/dashboard.py4
-rw-r--r--common/ui_common/objects/fqdns.py21
-rw-r--r--common/ui_common/objects/ip_address.py40
-rw-r--r--common/ui_common/objects/keywords.py8
-rw-r--r--common/ui_common/objects/moible_identities.py8
-rw-r--r--common/ui_common/objects/objects_public_operations.py33
-rw-r--r--common/ui_common/objects/subscriber_ids.py24
-rw-r--r--page_element/dashboard_element_position.py50
-rw-r--r--page_element/objects_element_position.py24
-rw-r--r--testdata/ui_data/objects_data/ip_address.json59
-rw-r--r--testdata/ui_data/objects_data/moible_identities.json8
11 files changed, 138 insertions, 141 deletions
diff --git a/common/ui_common/dashboard/dashboard.py b/common/ui_common/dashboard/dashboard.py
index 85ec6488..9d40993f 100644
--- a/common/ui_common/dashboard/dashboard.py
+++ b/common/ui_common/dashboard/dashboard.py
@@ -49,10 +49,10 @@ class Dashboard:
self.driver.find_element(By.XPATH, dashboard_chart_up_button_posXpath).click()
self.driver.find_element(By.XPATH, dashboard_chart_up_edit_button_posXpath).click()
# visualization_type校验
- chart_visualization_type = self.driver.find_element(By.XPATH,dashboard_chart_visualization_type_text_posXpath).text
+ chart_visualization_type = self.driver.find_element(By.XPATH,dashboard_chart_visualization_type_text_posXpath).get_attribute('value')
assert visualization_type == chart_visualization_type
#data source校验
- data_source = self.driver.find_element(By.XPATH,dashboard_chart_data_source_select_text_posXpath).get_attribute("innerText")
+ data_source = self.driver.find_element(By.XPATH,dashboard_chart_data_source_select_text_posXpath).text
assert data_source == data["data_source"]
#校验metric
if metric_type == "single":
diff --git a/common/ui_common/objects/fqdns.py b/common/ui_common/objects/fqdns.py
index 7a64439a..b8999598 100644
--- a/common/ui_common/objects/fqdns.py
+++ b/common/ui_common/objects/fqdns.py
@@ -354,7 +354,7 @@ class FQDNs:
if self.modify_status == "1":
# 确认创建sub_new_fqdns
self.driver.find_element(By.XPATH, FQDNs_Group_sub_Object_add_new_one_OK1_Button_posXpath).click()
- self.driver.find_element(By.XPATH, FQDNs_Group_sub_Object_add_new_one_OK1_Warning_Yes_Button_posXpath).click()
+ # self.driver.find_element(By.XPATH, FQDNs_Group_sub_Object_add_new_one_OK1_Warning_Yes_Button_posXpath).click()
# 确认创建
self.driver.find_element(By.XPATH, FQDNsObjectPage_button_SaveYes_posXpath).click()
time.sleep(3)
@@ -368,10 +368,10 @@ class FQDNs:
else:
# 确认创建sub_new_fqdns
self.driver.find_element(By.XPATH, FQDNs_Group_sub_Object_add_new_one_OK1_Button_posXpath).click()
- self.driver.find_element(By.XPATH, FQDNs_Group_sub_Object_add_new_one_OK1_Warning_Yes_Button_posXpath).click()
+ # self.driver.find_element(By.XPATH, FQDNs_Group_sub_Object_add_new_one_OK1_Warning_Yes_Button_posXpath).click()
# 确认创建
self.driver.find_element(By.XPATH, FQDNsObjectPage_button_SaveYes_posXpath).click()
- self.driver.find_element(By.XPATH, FQDNsObjectPage_button_warningSaveYes_posXpath).click()
+ # self.driver.find_element(By.XPATH, FQDNsObjectPage_button_warningSaveYes_posXpath).click()
time.sleep(3)
self.objects_po.extract_ele()
elif data["Create"]["model"] == "2":
@@ -1367,9 +1367,9 @@ class FQDNs:
self.loading_parameter(data)
self._sub_object_create(data)
self.driver.find_element(By.XPATH, FQDNs_Group_sub_Object_add_new_one_OK1_Button_posXpath).click()
- self.driver.find_element(By.XPATH,FQDNs_Group_sub_Object_add_new_one_OK1_Warning_Yes_Button_posXpath).click()
+ # self.driver.find_element(By.XPATH,FQDNs_Group_sub_Object_add_new_one_OK1_Warning_Yes_Button_posXpath).click()
self.driver.find_element(By.XPATH,fqdn_object_group_subobject_close_posXpath).click()
- self.driver.find_element(By.XPATH,listPage_object_group_exclude_open_posXpath).click()
+ self.driver.find_element(By.XPATH,FQDNs_Group_sub_Object_group_exclude_open_posXpath).click()
time.sleep(2)
self.driver.find_element(By.XPATH, FQDNsObjectPage_button_SaveYes_posXpath).click()
assert self.driver.find_element(By.XPATH,"//div[@role='alert']//p").text == "When enabling excluded objects, there must be at least one valid piece of data"
@@ -1378,7 +1378,7 @@ class FQDNs:
self._delete_sub(data)
elif data["Subtype"] == "1":
self.loading_parameter(data)
- self.driver.find_element(By.XPATH, listPage_object_group_exclude_open_posXpath).click()
+ self.driver.find_element(By.XPATH, FQDNs_Group_sub_Object_group_exclude_open_posXpath).click()
self.driver.find_element(By.XPATH,listPage_object_group_exclude_add_button_posXpath).click()
# self.driver.find_element(By.XPATH,listPage_object_group_subobject_fist_posXpath).click()
self.driver.find_element(By.XPATH,FQDNs_Group_sub_Object_add_new_Button_posXpath).click() # add new sub_object
@@ -1395,7 +1395,7 @@ class FQDNs:
self.driver.find_element(By.XPATH, asn_ObjectDetailPage_leaveThisPage_yesButton_posXpath).click()
self._delete_sub(data)
elif data["Subtype"] == "2":
- self.driver.find_element(By.XPATH, listPage_object_group_exclude_open_posXpath).click()
+ self.driver.find_element(By.XPATH, FQDNs_Group_sub_Object_group_exclude_open_posXpath).click()
self.driver.find_element(By.XPATH, FQDNsObjectPage_button_SaveYes_posXpath).click()
assert self.driver.find_element(By.XPATH,"//div[@role='alert']//p").text == "Subordinate objects of an object cannot be null"
elif data["Subtype"] == "3":
@@ -1408,7 +1408,7 @@ class FQDNs:
self.driver.find_element(By.XPATH, FQDNs_Group_sub_Object_add_new_one_OK1_Button_posXpath).click()
self.driver.find_element(By.XPATH,FQDNs_Group_sub_Object_add_new_one_OK1_Warning_Yes_Button_posXpath).click()
self.driver.find_element(By.XPATH, fqdn_object_group_subobject_close_posXpath).click()
- self.driver.find_element(By.XPATH, listPage_object_group_exclude_open_posXpath).click()
+ self.driver.find_element(By.XPATH, FQDNs_Group_sub_Object_group_exclude_open_posXpath).click()
self.random_number = "test_" + self.objects_po.my_random.random_number()
sub_object_name.append(self.random_number)
self._sub_object_create(data)
@@ -1619,12 +1619,13 @@ if __name__ == '__main__':
# model=0/1 ====0:单个 1group
# type =IMSI/Phone_Number/IMEI
data= {
- "ids": "用例1:FQDNs的增删改查",
+ "ids": "用例3:FQDNs添加item",
"Name": "test-1",
"Create": {
"model": "0",
"type": "new_object",
- "item": ["^example.com", "^www.example.com$", "example", "www.example$"]
+ "item": ["^example.com$"],
+ "item_modify": {"type": "add", "add_data": ["com$"]}
},
"Createtype": "FQDN",
"Subtype": "",
diff --git a/common/ui_common/objects/ip_address.py b/common/ui_common/objects/ip_address.py
index 0565b099..b08c5305 100644
--- a/common/ui_common/objects/ip_address.py
+++ b/common/ui_common/objects/ip_address.py
@@ -84,8 +84,8 @@ class IPAddress:
if data['Create']['model'] == '0':
self.driver.find_element(By.XPATH, listPage_object_ip_address_select_First_object_posXpath).click()
self.driver.find_element(By.XPATH, listPage_object_ip_address_editButton_posXpath).click()
- self.driver.find_element(By.XPATH,ip_address_statistics_select_posXpath).click()
- self.driver.find_element(By.XPATH, "//div[@x-placement='bottom-start']//div[text()='Elaborate']").click()
+ self.driver.find_element(By.XPATH, ip_address_statistics_select_posXpath).click()
+ self.driver.find_element(By.XPATH, acc_ObjectDetailPage_objectStatistics_elaborate_posXpath).click()
self.driver.find_element(By.XPATH, ip_addressObjectPage_button_OK_posXpath).click()
self.driver.find_element(By.XPATH, ip_addressObjectPage_button_warningSaveYes_posXpath).click()
self.objects_po.View_statistics(edit_element=listPage_object_ip_address_editButton_posXpath)
@@ -305,14 +305,13 @@ class IPAddress:
self.driver.find_element(By.XPATH,main_ObjectPage_Import_Mobile_Identity_files_OK_Button_posXpath).click()
# 确认创建sub object
self.driver.find_element(By.XPATH,ip_address_Group_sub_Object_add_new_one_OK1_Button_posXpath).click() # 保存new_Object
- self.driver.find_element(By.XPATH,ip_address_Group_sub_Object_add_new_one_OK1_Warning_Yes_Button_posXpath).click() # 确认新建保存按钮
+ # self.driver.find_element(By.XPATH,ip_address_Group_sub_Object_add_new_one_OK1_Warning_Yes_Button_posXpath).click() # 确认新建保存按钮
# 确认创建
self.driver.find_element(By.XPATH, ip_addressObjectPage_button_OK_posXpath).click()
try:
self.driver.isElementExist(Element=ip_addressObjectPage_button_warningSaveYes_posXpath)
if self.driver.Exist:
- self.driver.find_element(By.XPATH,
- ip_addressObjectPage_button_warningSaveYes_posXpath).click()
+ self.driver.find_element(By.XPATH,ip_addressObjectPage_button_warningSaveYes_posXpath).click()
except:
pass
time.sleep(3)
@@ -548,10 +547,9 @@ class IPAddress:
if search_type == "ID":
search_value = self.objects_po.table_dict['ID']
elif search_type == "Name":
- # search_value = self.objects_po.table_dict['Name']
- search_value = data["Name"]
+ search_value = self.objects_po.table_dict['Name']
elif search_type == "Description":
- search_value = self.random_name
+ search_value = self.objects_po.table_dict['Description']
elif search_type == "Details":
search_value = data["Create"]["item"][0]
elif search_type == "subType":
@@ -1813,17 +1811,21 @@ if __name__ == '__main__':
# model=0/1 ====0:单个 1group
# type =IMSI/Phone_Number/IMEI
data={
- "ids": "用例3、IP的修改添加item",
- "Name": "test-1",
- "Create": {
- "model": "0",
- "type": "new_object",
- "item": ["196.133.15.11"],
- "item_modify": {"type": "add","add_data": "192.168.2.1"}
- },
- "Createtype": "IP",
- "Subtype": "",
- "Search_type": "IP"
+ "ids": "用例32、Name的部分值搜索",
+ "Name": "random",
+ "Create": {
+ "model": "0",
+ "type": "new_object",
+ "item": [
+ "1.1.1.1",
+ "1.1.1.1-1.1.1.1",
+ "1:1:1::1-2:2:2::2",
+ "94E5:E27A::6041"
+ ]
+ },
+ "Createtype": "IP",
+ "Subtype": "",
+ "Search_type": "fuzzy->Name"
}
# r._clear_counter(data)
r.ip_address_case(data)
diff --git a/common/ui_common/objects/keywords.py b/common/ui_common/objects/keywords.py
index 834e7eb3..af495cb9 100644
--- a/common/ui_common/objects/keywords.py
+++ b/common/ui_common/objects/keywords.py
@@ -1132,7 +1132,7 @@ class Keywords:
self.driver.find_element(By.XPATH, Keywords_Group_sub_Object_add_new_one_OK1_Button_posXpath).click()
self.driver.find_element(By.XPATH,Keywords_Group_sub_Object_add_new_one_OK1_Warning_Yes_Button_posXpath).click()
self.driver.find_element(By.XPATH,ip_object_group_subobject_close_posXpath).click()
- self.driver.find_element(By.XPATH,listPage_object_group_exclude_open_posXpath).click()
+ self.driver.find_element(By.XPATH,Keywords_Group_sub_Object_exclude_open_posXpath).click()
time.sleep(2)
self.driver.find_element(By.XPATH, KeywordsObjectPage_button_SaveYes_posXpath).click()
assert self.driver.find_element(By.XPATH,"//div[@role='alert']//p").text == "When enabling excluded objects, there must be at least one valid piece of data"
@@ -1140,14 +1140,14 @@ class Keywords:
self.driver.find_element(By.XPATH, asn_ObjectDetailPage_leaveThisPage_yesButton_posXpath).click()
self._delete_sub(data)
elif data["Subtype"] == "1":
- self.driver.find_element(By.XPATH, listPage_object_group_exclude_open_posXpath).click()
+ self.driver.find_element(By.XPATH, Keywords_Group_sub_Object_exclude_open_posXpath).click()
self.driver.find_element(By.XPATH,listPage_object_group_exclude_add_button_posXpath).click()
self.driver.find_element(By.XPATH,listPage_object_group_subobject_fist_posXpath).click()
self.driver.find_element(By.XPATH,ip_object_group_subobject_close_posXpath).click()
self.driver.find_element(By.XPATH, KeywordsObjectPage_button_SaveYes_posXpath).click()
assert self.driver.find_element(By.XPATH,"//div[@role='alert']//p").text == "Subordinate objects of an object cannot contain only excluded objects"
elif data["Subtype"] == "2":
- self.driver.find_element(By.XPATH, listPage_object_group_exclude_open_posXpath).click()
+ self.driver.find_element(By.XPATH, Keywords_Group_sub_Object_exclude_open_posXpath).click()
self.driver.find_element(By.XPATH, KeywordsObjectPage_button_SaveYes_posXpath).click()
assert self.driver.find_element(By.XPATH,"//div[@role='alert']//p").text == "Subordinate objects of an object cannot be null"
elif data["Subtype"] == "3":
@@ -1158,7 +1158,7 @@ class Keywords:
self.driver.find_element(By.XPATH, Keywords_Group_sub_Object_add_new_one_OK1_Button_posXpath).click()
self.driver.find_element(By.XPATH,Keywords_Group_sub_Object_add_new_one_OK1_Warning_Yes_Button_posXpath).click()
self.driver.find_element(By.XPATH, ip_object_group_subobject_close_posXpath).click()
- self.driver.find_element(By.XPATH, listPage_object_group_exclude_open_posXpath).click()
+ self.driver.find_element(By.XPATH, Keywords_Group_sub_Object_exclude_open_posXpath).click()
# self.driver.find_element(By.XPATH, "(" + ip_address_Group_sub_Object_addButton_posXpath + ")" + f"[{2}]").click()
# time.sleep(0.5)
# self.driver.find_element(By.XPATH, listPage_object_group_subobject_second_posXpath).click()
diff --git a/common/ui_common/objects/moible_identities.py b/common/ui_common/objects/moible_identities.py
index e534073e..2a642b0c 100644
--- a/common/ui_common/objects/moible_identities.py
+++ b/common/ui_common/objects/moible_identities.py
@@ -1430,7 +1430,7 @@ class mobile_identiities:
self.driver.find_element(By.XPATH,mobile_Identities_Group_sub_Object_add_new_one_OK1_Button_posXpath).click() # 保存new_Object
self.driver.find_element(By.XPATH,mobile_Identities_Group_sub_Object_add_new_one_OK1_Warning_Yes_Button_posXpath).click() # 确认新建保存按钮
self.driver.find_element(By.XPATH,http_signature_object_group_close_posXpath).click()
- self.driver.find_element(By.XPATH, listPage_object_group_exclude_open_posXpath).click()
+ self.driver.find_element(By.XPATH, mobile_Identities_Group_sub_Object_exclude_open_posXpath).click()
time.sleep(2)
self.driver.find_element(By.XPATH, mobileIdentitiesObjectPage_button_SaveYes_posXpath).click()
self.driver.find_element(By.XPATH, mobileIdentitiesObjectPage_button_warningSaveYes_posXpath).click()
@@ -1439,7 +1439,7 @@ class mobile_identiities:
self.driver.find_element(By.XPATH, asn_ObjectDetailPage_leaveThisPage_yesButton_posXpath).click()
self._delete_sub(data)
elif data["Subtype"] == "1":
- self.driver.find_element(By.XPATH, listPage_object_group_exclude_open_posXpath).click()
+ self.driver.find_element(By.XPATH, mobile_Identities_Group_sub_Object_exclude_open_posXpath).click()
self.driver.find_element(By.XPATH,listPage_object_group_exclude_add_button_posXpath).click()
# self.driver.find_element(By.XPATH,listPage_object_group_subobject_fist_posXpath).click()
self.loading_parameter(data)
@@ -1458,7 +1458,7 @@ class mobile_identiities:
self.driver.find_element(By.XPATH, asn_ObjectDetailPage_leaveThisPage_yesButton_posXpath).click()
self._delete_sub(data)
elif data["Subtype"] == "2":
- self.driver.find_element(By.XPATH, listPage_object_group_exclude_open_posXpath).click()
+ self.driver.find_element(By.XPATH, mobile_Identities_Group_sub_Object_exclude_open_posXpath).click()
self.driver.find_element(By.XPATH, mobileIdentitiesObjectPage_button_SaveYes_posXpath).click()
self.driver.find_element(By.XPATH, mobileIdentitiesObjectPage_button_warningSaveYes_posXpath).click()
assert self.driver.find_element(By.XPATH, "//div[@role='alert']//p").text == "Subordinate objects of an object cannot be null"
@@ -1470,7 +1470,7 @@ class mobile_identiities:
self.driver.find_element(By.XPATH, mobile_Identities_Group_sub_Object_add_new_one_OK1_Button_posXpath).click() # 保存new_Object
self.driver.find_element(By.XPATH, mobile_Identities_Group_sub_Object_add_new_one_OK1_Warning_Yes_Button_posXpath).click() # 确认新建保存按钮
self.driver.find_element(By.XPATH, http_signature_object_group_close_posXpath).click()
- self.driver.find_element(By.XPATH, listPage_object_group_exclude_open_posXpath).click()
+ self.driver.find_element(By.XPATH, mobile_Identities_Group_sub_Object_exclude_open_posXpath).click()
self.random_number = self.objects_po.my_random.random_number()
sub_object_name.append(self.random_number)
self._sub_object_create(data)
diff --git a/common/ui_common/objects/objects_public_operations.py b/common/ui_common/objects/objects_public_operations.py
index 807a88f5..514c34a4 100644
--- a/common/ui_common/objects/objects_public_operations.py
+++ b/common/ui_common/objects/objects_public_operations.py
@@ -448,34 +448,32 @@ class ObjectsPublicOperations:
# 点击列设置
self.driver.find_element(By.XPATH, mainPage_ObjectSearch_Column_settings_posXpath).click()
# 全不选并确认
- self.driver.find_element(By.XPATH, mainPage_ObjectSearch_Column_settings_select_allCheckBox_posXpath).click()
- self.driver.find_element(By.XPATH, mainPage_ObjectSearch_Column_settings_select_allCheckBox_posXpath).click()
+ # self.driver.find_element(By.XPATH, mainPage_ObjectSearch_Column_settings_select_allCheckBox_posXpath).click()
+ # self.driver.find_element(By.XPATH, mainPage_ObjectSearch_Column_settings_select_allCheckBox_posXpath).click()
# self.driver.find_element(By.XPATH, mainPage_ObjectSearch_Column_settings_select_Cancel_Button_posXpath).click()
- self.driver.find_element(By.XPATH, mainPage_ObjectSearch_Column_settings_click_OK_Button_posXpath).click()
+ self.driver.find_element(By.XPATH, mainPage_ObjectSearch_Column_settings_select_CheckBox_posXpath).click()
+ self.driver.find_element(By.XPATH, mainPage_Object_Title_Name_posXpath).click()
# 全不选,选择展示Column并确认
self.driver.find_element(By.XPATH, mainPage_ObjectSearch_Column_settings_posXpath).click()
self.Column_text = self.driver.find_element(By.XPATH, Column).text
# print(self.Column_text)
self.driver.find_element(By.XPATH, Column).click() # 选择目标Column
- self.driver.find_element(By.XPATH,
- mainPage_ObjectSearch_Column_settings_click_OK_Button_posXpath).click() # 点击OK按钮
+ self.driver.find_element(By.XPATH, mainPage_Object_Title_Name_posXpath).click()
+ # self.driver.find_element(By.XPATH,mainPage_ObjectSearch_Column_settings_click_OK_Button_posXpath).click() # 点击OK按钮
self.Column_ele_ex(Column_text=self.Column_text) # 调用校验方法
# 全选并确认
# self.driver.find_element(By.XPATH, mainPage_ObjectSearch_Column_settings_posXpath).click() # 点击列设置
# self.driver.find_element(By.XPATH, mainPage_ObjectSearch_Column_settings_select_All_Button_posXpath).click()
# self.driver.find_element(By.XPATH, mainPage_ObjectSearch_Column_settings_click_OK_Button_posXpath).click()
-
self.driver.find_element(By.XPATH, mainPage_ObjectSearch_Column_settings_posXpath).click() # 点击列设置
- self.driver.find_element(By.XPATH,
- mainPage_ObjectSearch_Column_settings_select_allCheckBox_posXpath).click() # 全选
- self.driver.find_element(By.XPATH,
- mainPage_ObjectSearch_Column_settings_click_OK_Button_posXpath).click() # 点击OK按钮
+ self.driver.find_element(By.XPATH, mainPage_ObjectSearch_Column_settings_select_CheckBox_posXpath).click()
+ self.driver.find_element(By.XPATH, mainPage_ObjectSearch_Column_settings_select_CheckBox_posXpath).click()
+ self.driver.find_element(By.XPATH, mainPage_Object_Title_Name_posXpath).click()
# 全选并取消
self.driver.find_element(By.XPATH, mainPage_ObjectSearch_Column_settings_posXpath).click() # 点击列设置
- self.driver.find_element(By.XPATH,
- mainPage_ObjectSearch_Column_settings_select_allCheckBox_posXpath).click() # 全选
- self.driver.find_element(By.XPATH,
- mainPage_ObjectSearch_Column_settings_click_Cancel_Button_posXpath).click() # 点击Cancel按钮
+ self.driver.find_element(By.XPATH, mainPage_ObjectSearch_Column_settings_select_CheckBox_posXpath).click()
+ self.driver.find_element(By.XPATH, mainPage_ObjectSearch_Column_settings_select_CheckBox_posXpath).click()
+ self.driver.find_element(By.XPATH, mainPage_Object_Title_Name_posXpath).click()
def View_statistics(self, edit_element):
# 主界面View验证
@@ -577,22 +575,23 @@ class ObjectsPublicOperations:
# 判断列元素
def Column_ele_ex(self, Column_text):
- data = "//div/div/div[1]/div/div[2]/div/div[2]/table/thead/tr/th['replace']"
+ data = "//*[@id='root']/div/div/main/div[1]/div[2]/div[2]/div[1]/div[1]/div/div/div['replace']/div[1]/div/div/div"
# for i in range(1, 13):
self.result = True
i = 1
while self.result == False:
if i == 1:
- self.title = data.replace("th['replace']", "th[{}]/div/span/span[1]".format(i))
+ self.title = data.replace("div['replace']/div[1]/div/div/div", "div[{}]/div[1]/div/div/div".format(i))
self.title_text = self.driver.find_element(By.XPATH, self.title)
if Column_text == self.title_text:
self.result = True
+ print("校验通过")
break
else:
i += 1
else:
- self.title = data.replace("th['replace']", "th[{}]/div/div/span".format(i))
+ self.title = data.replace("div['replace']/div[1]/div/div/div", "div[{}]/div[1]/div/div/div".format(i))
self.title_text = self.driver.find_element(By.XPATH, self.title)
if Column_text == self.title_text:
self.result = True
diff --git a/common/ui_common/objects/subscriber_ids.py b/common/ui_common/objects/subscriber_ids.py
index 2852bfe5..9ceb0848 100644
--- a/common/ui_common/objects/subscriber_ids.py
+++ b/common/ui_common/objects/subscriber_ids.py
@@ -152,13 +152,9 @@ class Base_Subscriber_IDs:
elif self.create_model == "1":
for item in self.item_list:
# 创建sub_new_fqdns
- self.driver.find_element(By.XPATH,
- Subscriber_IDs_Group_sub_Object_add_new_add_item_Button_posXpath).click() # new添加itemButton
- self.driver.find_element(By.XPATH,
- Subscriber_IDs_Group_sub_Object_add_new_addIP_item_inputName_posXpath).send_keys(
- item) # 输入item
- self.driver.find_element(By.XPATH,
- Subscriber_IDs_Group_sub_Object_add_new_add_itemIP_Save_Button_posXpath).click() # 添加item保存
+ self.driver.find_element(By.XPATH,Subscriber_IDs_Group_sub_Object_add_new_add_item_Button_posXpath).click() # new添加itemButton
+ self.driver.find_element(By.XPATH,Subscriber_IDs_Group_sub_Object_add_new_addIP_item_inputName_posXpath).send_keys(item) # 输入item
+ self.driver.find_element(By.XPATH,Subscriber_IDs_Group_sub_Object_add_new_add_itemIP_Save_Button_posXpath).click() # 添加item保存
elif self.create_model == "2":
if self.item_list == "null":
pass
@@ -1050,7 +1046,7 @@ class Subscriber_IDs(Base_Subscriber_IDs):
def group_object_include(self, data):
self._goto_subObjectPage()
self.driver.find_element(By.XPATH, listPage_object_Subscriber_IDs_createButton_posXpath).click()
- self.driver.find_element(By.ID, listPage_object_Subscriber_IDs_create_Subscriber_IDs_Group_Button_posId).click()
+ self.driver.find_element(By.XPATH, listPage_object_Subscriber_IDs_create_Subscriber_IDs_Group_Button_posId).click()
self.driver.find_element(By.XPATH, Subscriber_IDsObjectPage_input_Name_posXpath).send_keys(data["Name"])
self.driver.find_element(By.XPATH, Subscriber_IDs_GroupObjectPage_textArea_Description_posXpath).send_keys(self.my_random.random_name())
if data["Subtype"] == "0":
@@ -1059,9 +1055,9 @@ class Subscriber_IDs(Base_Subscriber_IDs):
self.loading_parameter(data)
self._sub_object_create(data)
self.driver.find_element(By.XPATH, Subscriber_IDs_Group_sub_Object_add_new_one_OK1_Button_posXpath).click()
- self.driver.find_element(By.XPATH, Subscriber_IDs_Group_sub_Object_add_new_one_OK1_Warning_Yes_Button_posXpath).click()
- self.driver.find_element(By.XPATH,subscriber_id_object_group_close_posXpath).click()
- self.driver.find_element(By.XPATH,listPage_object_group_exclude_open_posXpath).click()
+ # self.driver.find_element(By.XPATH, Subscriber_IDs_Group_sub_Object_add_new_one_OK1_Warning_Yes_Button_posXpath).click()
+ # self.driver.find_element(By.XPATH,subscriber_id_object_group_close_posXpath).click()
+ self.driver.find_element(By.XPATH,Subscriber_IDs_Group_sub_object_group_exclude_open_posXpath).click()
time.sleep(2)
self.driver.find_element(By.XPATH, Subscriber_IDsObjectPage_button_SaveYes_posXpath).click()
assert self.driver.find_element(By.XPATH,"//div[@role='alert']//p").text == "When enabling excluded objects, there must be at least one valid piece of data"
@@ -1069,7 +1065,7 @@ class Subscriber_IDs(Base_Subscriber_IDs):
self.driver.find_element(By.XPATH, asn_ObjectDetailPage_leaveThisPage_yesButton_posXpath).click()
self._delete_sub(data)
elif data["Subtype"] == "1":
- self.driver.find_element(By.XPATH, listPage_object_group_exclude_open_posXpath).click()
+ self.driver.find_element(By.XPATH, Subscriber_IDs_Group_sub_object_group_exclude_open_posXpath).click()
# self.driver.find_element(By.XPATH,listPage_object_group_exclude_add_button_posXpath).click()
# self.driver.find_element(By.XPATH,listPage_object_group_subobject_fist_posXpath).click()
self.loading_parameter(data)
@@ -1088,7 +1084,7 @@ class Subscriber_IDs(Base_Subscriber_IDs):
self.driver.find_element(By.XPATH, asn_ObjectDetailPage_leaveThisPage_yesButton_posXpath).click()
self._delete_sub(data)
elif data["Subtype"] == "2":
- self.driver.find_element(By.XPATH, listPage_object_group_exclude_open_posXpath).click()
+ self.driver.find_element(By.XPATH, Subscriber_IDs_Group_sub_object_group_exclude_open_posXpath).click()
self.driver.find_element(By.XPATH, Subscriber_IDsObjectPage_button_SaveYes_posXpath).click()
assert self.driver.find_element(By.XPATH,"//div[@role='alert']//p").text == "Subordinate objects of an object cannot be null"
elif data["Subtype"] == "3":
@@ -1099,7 +1095,7 @@ class Subscriber_IDs(Base_Subscriber_IDs):
self.driver.find_element(By.XPATH,Subscriber_IDs_Group_sub_Object_add_new_one_OK1_Button_posXpath).click()
self.driver.find_element(By.XPATH,Subscriber_IDs_Group_sub_Object_add_new_one_OK1_Warning_Yes_Button_posXpath).click()
self.driver.find_element(By.XPATH, subscriber_id_object_group_close_posXpath).click()
- self.driver.find_element(By.XPATH, listPage_object_group_exclude_open_posXpath).click()
+ self.driver.find_element(By.XPATH, Subscriber_IDs_Group_sub_object_group_exclude_open_posXpath).click()
self.random_number = self.objects_po.my_random.random_number()
sub_object_name.append(self.random_number)
self._sub_object_create(data)
diff --git a/page_element/dashboard_element_position.py b/page_element/dashboard_element_position.py
index eca612be..de30a106 100644
--- a/page_element/dashboard_element_position.py
+++ b/page_element/dashboard_element_position.py
@@ -1,47 +1,47 @@
# Main Dashboard elements area bottom===================# Main Dashboard elements area bottom===================# Main Dashboard elements area bottom===================# Main Dashboard elements area bottom===================# Main Dashboard elements area bottom===================# Main Dashboard elements area bottom===================
-mainPage_main_dashboard_posXpath = "//div[@class='VDropdown']//span[@title='Main Dashboard']" #主页Main Dashboard,用于切换dashboard
+mainPage_main_dashboard_posXpath = "//div[@class='MuiSelect-root MuiSelect-variantOutlined MuiSelect-colorNeutral MuiSelect-sizeMd css-avzcw8']//button[text()='Main Dashboard']" #主页Main Dashboard,用于切换dashboard
mainPage_create_button_dashboard_posXpath ="//div[@class='VDropdown']//i[@class='el-icon-plus']" #创建自定义dashboard
-mainPage_create_chart_button_posXpath ="//div[@class='CustomDashboard']//div[normalize-space(text())='Add Chart']" #点击chart添加按钮
-mainPage_save_dashboard_button_posXpath ="//i[@class='icon-save iconfont']" #dashboard保存按钮
-mainPage_cancel_button_posXpath ="//i[@class='icon-a-notsave iconfont']" #自定义dashboard取消按钮
+mainPage_create_chart_button_posXpath ="//div[@class='AddChart MuiBox-root css-icxaae']" #点击chart添加按钮
+mainPage_save_dashboard_button_posXpath ="//i[@class='icon-save iconfont MuiBox-root css-0']" #dashboard保存按钮
+mainPage_cancel_button_posXpath ="//i[@class='icon-a-notsave iconfont MuiBox-root css-0']" #自定义dashboard取消按钮
mainPage_cancel_OK_button_posXpath = "//div[@class='el-message-box leavePage ']//span[normalize-space(text())='OK']" #自定义dashboard取消按钮二次确认OK按钮
mainPage_cancel_Cancel_button_posXpath = "//div[@class='el-message-box leavePage ']//span[normalize-space(text())='Cancel']" #自定义dashboard取消按钮二次确认Cacncel按钮
-mainPage_delete_dashboard_posXpath ="//div[@class='edit-tools']//i[@class='icon-Delete iconfont']" #自定义dashboard删除按钮
+mainPage_delete_dashboard_posXpath ="//i[@class='icon-Delete iconfont MuiBox-root css-0']" #自定义dashboard删除按钮
mainPage_delete_Delete_button_posXpath = "//div[@class='el-message-box el-message-box--center']//span[normalize-space(text())='Delete']" #自定义dashboard删除二次确认delete按钮
mainPage_delete_Cancel_button_posXpath = "//div[@class='el-message-box el-message-box--center']//span[normalize-space(text())='Cancel']" #自定义dashboard删除二次确认Cancel按钮
-mainPage_edit_dashboard_button_posXpath = "//div[@class='edit-tools']//i[@class='icon-Editinpage iconfont']" #自定义dashboard主页编辑按钮
-dashboard_chart_up_button_posXpath = "//div[@class='vbox-title']//i[@class='el-icon-arrow-down el-icon--right']"#单个chart表下拉选择编辑删除,下拉按钮
-dashboard_chart_up_edit_button_posXpath = "//div[@class='vbox-title']//i[@class='icon-Editinpage iconfont']" #下拉编辑按钮
-dashboard_chart_up_delete_button_posXpath = "//div[@class='vbox-title']//i[@class='icon-Delete iconfont']" #下拉删除按钮
-dashboard_chart_name_text_posXpath = "//div[@class='el-form-item el-form-item--small']//div[@class='width280px el-input el-input--small']//input[@class='el-input__inner']" #chart下Nmae输入框
+mainPage_edit_dashboard_button_posXpath = "//i[@class='icon-Editinpage iconfont MuiBox-root css-0']" #自定义dashboard主页编辑按钮
+dashboard_chart_up_button_posXpath = "//div[@class='chartHeader MuiBox-root css-15p9n5u']//span[@class='MuiSelect-indicator css-o1yc9m']"#单个chart表下拉选择编辑删除,下拉按钮
+dashboard_chart_up_edit_button_posXpath = "//ul[@class='base-Popper-root MuiSelect-listbox Mui-expanded css-1bxrsif']//li[text()='Edit']" #下拉编辑按钮
+dashboard_chart_up_delete_button_posXpath = "//ul[@class='base-Popper-root MuiSelect-listbox Mui-expanded css-1bxrsif']//li[text()='Delete']" #下拉删除按钮
+dashboard_chart_name_text_posXpath = "//div[@class='MuiBox-root css-0']//input[@class='MuiInput-input css-1u0jcuo']" #chart下Nmae输入框
dashboard_chart_visualization_type_posXpath = "//div[@role='radiogroup']//span[normalize-space(text())='type']" #visualization_type选择
-dashboard_chart_visualization_type_text_posXpath = "//span[@class='el-radio__input is-checked']/following-sibling::span[1]"
-dashboard_chart_data_source_select_up_posXpath = "(//i[@class='el-select__caret el-input__icon el-icon-arrow-up'])[2]"
+dashboard_chart_visualization_type_text_posXpath = "//div[@class='MuiFormGroup-root MuiRadioGroup-root css-1h7anqn']//span[contains(@class,'Mui-checked')]/input"
+dashboard_chart_data_source_select_up_posXpath = "//div[@class='MuiSelect-root MuiSelect-variantOutlined MuiSelect-colorNeutral MuiSelect-sizeMd w-[300px] css-1g79nrq']//span[@class='MuiSelect-indicator css-o1yc9m']"
dashboard_chart_data_source_select_reverse_posXpath = "//i[@class='el-select__caret el-input__icon el-icon-arrow-up is-reverse']"
-dashboard_chart_data_source_select_text_posXpath = "//label[text()='Data Source']//parent::*//li[@class='el-select-dropdown__item selected']/span"
-dashboard_chart_metric_add_button_posXpath = "//div[@class='Metrics']//i[@class='iconfont icon-Create1 fontsize14']"
+dashboard_chart_data_source_select_text_posXpath = "//div[@class='MuiSelect-root MuiSelect-variantOutlined MuiSelect-colorNeutral MuiSelect-sizeMd w-[300px] css-1g79nrq']/button"
+dashboard_chart_metric_add_button_posXpath = "//div[@class='timeDimension MuiBox-root css-0']//i[@class='iconfont icon-Create1 font-[700]']"
dashboard_chart_metric_text_posXpath = "((//div[@class='Metrics']//div[@class='el-select__tags'])[{}]//span[@class='el-select__tags-text'])[{}]" #拼接每个metric下的text文本
-dashboard_chart_save_OK_button_posXpath = "//div[@class='prox-fixed-footer']//span[normalize-space(text())='OK']"
-dashboard_chart_save_Cancel_button_posXpath = "//div[@class='prox-fixed-footer']//span[normalize-space(text())='Cancel']"
-dashboard_chart_name_text_input_posXpath = "//div[@class='width280px el-input el-input--small']/input"
-dashboard_chart_dimension_add_button_posYpath = "//div[@class='Dimension margin-top-2']//div[@class='addCondition width280px addobject addobject-long-list obj-content-null cursor']"
+dashboard_chart_save_OK_button_posXpath = "//button[text()='OK']"
+dashboard_chart_save_Cancel_button_posXpath = "//button[text()='Cancel']"
+dashboard_chart_name_text_input_posXpath = "//button[text()='Default Name']//parent::*//parent::*//input[@class='MuiInput-input css-1u0jcuo']"
+dashboard_chart_dimension_add_button_posYpath = "//div[@class='timeDimension mb-[8px] MuiBox-root css-0']//i[@class='iconfont icon-Create1 font-[700]']"
dashboard_chart_dimension_not_add_button_posYpath ="//div[@class='Dimension margin-top-2']//div[@class='addCondition width280px addobject addobject-long-list obj-content-null cursor notAllowed']"
dashboard_chart_dimension_text_posYpath = "(//label[text()='Dimensions']/parent::*//li[@class='el-select-dropdown__item selected']/span)[{}]"
-dashboard_chart_filter_add_button_posYpath ="//div[@class='addCondition addobject addobject-long-list obj-content-null cursor margin-top0']//i[@class='iconfont icon-Create1 margin-right5']" #添加and filter条件
-dashboard_chart_filter_or_button_posXpath ="//div[normalize-space(text())='Or Condition']/i"
+dashboard_chart_filter_add_button_posYpath ="//label[text()='Filter']//parent::*//button[text()='And Condition']//i[@class='iconfont icon-Create1 font-[700]']" #添加and filter条件
+dashboard_chart_filter_or_button_posXpath ="//label[text()='Filter']//parent::*//button[text()='Or Condition']//i[@class='iconfont icon-Create1 font-[700]']i"
dashboard_chart_filter_add_or_button_posYpath = "//div[@id='addOrCondition0']//i[@class='iconfont icon-Create1 margin-right5']"#添加or filter条件
dashboard_chart_filter_text_posYpath = "(//div[@class='Filters']//div[@class='el-select filter-row-select el-select--small']//li[@class='el-select-dropdown__item selected']/span)[{}]"
dashboard_chart_different_metric_error_text_posYpath ="//div[@class='Metrics']/parent::*/descendant::div[@class='el-form-item__error']" #Metric给出的错误提示
-dashboard_chart_name_error_text_posYpath ="//span[normalize-space(text())='Default Name']/parent::*/parent::*//div[@class='el-form-item__error']"#空名称错误提示
-dashboard_chart_dimensions_error_text_posXpath ="//label[text()='Dimensions']/parent::*//div[@class='el-form-item__error']"#dimensions错误提示
+dashboard_chart_name_error_text_posYpath ="//div[@class='MuiFormControl-root MuiFormControl-vertical Mui-error MuiFormControl-sizeMd chart-name mt-[16px] mb-[8px] css-1h5ao69']//div[@class='MuiFormHelperText-root css-18e5lcg']/span"#空名称错误提示
+dashboard_chart_dimensions_error_text_posXpath ="//div[@class='timeDimension mb-[8px] MuiBox-root css-0']//div[@class='MuiFormHelperText-root css-18e5lcg']/span"#dimensions错误提示
dashboard_empty_chart_save_alter_text_posXpath ="//*[@role='alert']//p" #空chart保存时错误提示
dashboard_chart_order_by_posXpath ="//label[text()='Order By']/parent::*//div[@class='el-input el-input--small el-input--suffix']"#order by选择按钮
dashboard_chart_order_by_down_posXpath = "//label[text()='Order By']/parent::*//div[@class='el-input el-input--small el-input--suffix is-focus']"
dashboard_chart_limit_posXpath = "//label[contains(text(),'Row Limit')]/parent::*//div[@class='el-input el-input--small el-input--suffix'] | //label[contains(text(),'Series Limit')]/parent::*//div[@class='el-input el-input--small el-input--suffix']"#row limit或series limit选择框
dashboard_chart_limit_down_posXpath = "//label[contains(text(),'Limit')]/parent::*//div[@class='el-input el-input--small el-input--suffix is-focus']"
-dashboard_delete_metrci_posXpath = "//div[@class='Metrics']//i[@class='iconfont icon-Clear_c cursor color262626']"
+dashboard_delete_metrci_posXpath = "//div[@class='timeDimension MuiBox-root css-0']//i[@class='iconfont icon-Clear_c text-[22px] text-[var(--color-text)]']"
dashboard_no_delete_metrci_posXpath = "//div[@class='Metrics']//i[@class='iconfont icon-Clear_c cursor color262626 notAllowed']"
-dashboard_delete_dimensions_posXpath = "//div[@class='Dimension margin-top-2']//i[@class='iconfont icon-Clear_c cursor color262626']"
-dashboard_delete_filter_posXpath = "//div[@class='Filters']//i[@class='iconfont icon-Clear_c cursorPointer margin-left10 floatright']" \ No newline at end of file
+dashboard_delete_dimensions_posXpath = "//div[@class='timeDimension mb-[8px] MuiBox-root css-0']//i[@class='iconfont icon-Clear_c text-[22px] text-[var(--color-text)]']"
+dashboard_delete_filter_posXpath = "//label[text()='Filter']//parent::*//i[@class='iconfont icon-Clear_c text-[22px] text-[var(--color-text)]']" \ No newline at end of file
diff --git a/page_element/objects_element_position.py b/page_element/objects_element_position.py
index c9377d95..808dd23c 100644
--- a/page_element/objects_element_position.py
+++ b/page_element/objects_element_position.py
@@ -142,6 +142,8 @@ main_listPage_object_select_Second_object_posXpath = '//table/tbody/tr[2]/td[1]/
main_listPage_object_total_value_posXpath = '(//div[@class="flex-1 flex items-center justify-center undefined"]/span)[1]' # 列表页total值
##Object模块列设置
mainPage_ObjectSearch_Column_settings_posXpath = "//i[@class='iconfont icon-SetNormal text-[14px] text-[var(--color-text-disabled)]']"
+mainPage_ObjectSearch_Column_settings_select_CheckBox_posXpath = "//input[@name='Show/Hide All']"
+mainPage_Object_Title_Name_posXpath = "//div[@class='MuiDataGrid-columnHeader MuiDataGrid-withBorderColor']//div[text()='Name']"
mainPage_ObjectSearch_Column_settings_select_allCheckBox_posXpath = "//div[@class='MuiDataGrid-columnsManagementFooter css-1l93brk']//span[@class='MuiTypography-root MuiTypography-body1 MuiFormControlLabel-label css-1hhkft9']" # ALL选择框----------------
mainPage_ObjectSearch_Column_settings_click_Cancel_Button_posXpath = '//div[@class="choose-button"][1]//span[text()="Cancel"]' # 点击Cancel
mainPage_ObjectSearch_Column_settings_click_OK_Button_posXpath = '//div[@class="choose-button"][1]//span[text()="OK"]' # 点击OK
@@ -413,6 +415,7 @@ mobile_Identities_Group_sub_Object_add_new_addIMEI_item_inputName_posXpath = "//
mobile_Identities_Group_sub_Object_add_new_add_itemIMSI_Save_Button_posXpath = "//i[@class='operate-icon iconfont icon-save']" # 保存item按钮
mobile_Identities_Group_sub_Object_add_new_add_item_phoneNumber_Save_Button_posXpath = "//i[@class='operate-icon iconfont icon-save']"
mobile_Identities_Group_sub_Object_add_new_add_item_IMEI_Save_Button_posXpath = "//i[@class='operate-icon iconfont icon-save']"
+mobile_Identities_Group_sub_Object_exclude_open_posXpath = "//div[@class='mobile-identity-object-']"
mobile_Identities_Group_sub_Object_add_new_one_OK1_Button_posXpath = "//button[@id='OK-_mobileIdDetail_VDraswer_EditDraw_mobileIdDetail_Home_App_anonymousComponent']" # new mobile_Identities CreateOK1
mobile_Identities_Group_sub_Object_add_new_one_OK1_Warning_Yes_Button_posXpath = "//div[@class='el-message-box__btns']//span[normalize-space(text())='Yes']" # 再次确认创建new mobile_Identities
@@ -767,18 +770,17 @@ FQDNsObjectPage_button_cancel_posCss = "//button[@id='Cancle-_FqdnDetail_Home_Ap
# Create FQDNs Group Object 和 Edit CreateFQDNs Group 新增和编辑页
FQDNs_Group_sub_Object_addButton_posXpath = "//div[@class='fqdn-object-included_sub_object_uuids']" # FQDNs_Group添加sub Object按钮
FQDNs_Group_sub_Object_add_new_Button_posXpath = "//i[@class='iconfont icon-Create1']" # 新建sub_FQDNs按钮
-FQDNs_Group_sub_Object_add_new_Select_one_Button_posXpath = "//ul[@x-placement='bottom-start']/li[1]" # 新建选择FQDNs按钮
-FQDNs_Group_sub_Object_add_new_Select_Group_Button_posXpath = "//ul[@x-placement='bottom-start']/li[2]" # 新建选择FQDNs_Group按钮
+FQDNs_Group_sub_Object_add_new_Select_one_Button_posXpath = "//ul[@class='base-Popper-root MuiMenu-root Mui-expanded MuiMenu-variantOutlined MuiMenu-colorNeutral MuiMenu-sizeMd css-131n2dh']//li[1]" # 新建选择FQDNs按钮
+FQDNs_Group_sub_Object_add_new_Select_Group_Button_posXpath = "//ul[@class='base-Popper-root MuiMenu-root Mui-expanded MuiMenu-variantOutlined MuiMenu-colorNeutral MuiMenu-sizeMd css-131n2dh']//li[2]" # 新建选择FQDNs_Group按钮
FQDNs_Group_sub_Object_add_new_one_inputName_posXpath = "//div[@class='MuiBox-root css-1krxo6z']//div[@class='fqdn-object-name']//input" # new FQDNs input Name
FQDNs_Group_sub_Object_add_new_add_item_Button_posXpath = "//div[@class='MuiBox-root css-1krxo6z']//i[@class='iconfont icon-Create1 font-[700]']" # new FQDNs add items Button
FQDNs_Group_sub_Object_add_new_addIP_item_inputName_posXpath = "//div[@class='MuiBox-root css-1krxo6z']//div[@class='fqdn-object-expression']//input" # new FQDNs Item input
FQDNs_Group_sub_Object_add_new_add_itemIP_Save_Button_posXpath = "//i[@class='operate-icon iconfont icon-save']" # new FQDNs 保存item按钮
-FQDNs_Group_sub_Object_add_new_one_OK1_Button_posXpath = "//div[@class='MuiBox-root css-1krxo6z']//button[@class='MuiButtonBase-root MuiButton-root MuiLoadingButton-root \
-MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmallw MuiButton-colorPrimary MuiButton-root MuiLoadingButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary form-action-submit css-1djnbgz']" # new FQDNs CreateOK1
+FQDNs_Group_sub_Object_add_new_one_OK1_Button_posXpath = "//div[@class='MuiBox-root css-1krxo6z']//button[text()='OK']" # new FQDNs CreateOK1
FQDNs_Group_sub_Object_add_new_one_OK1_Warning_Yes_Button_posXpath = "//div[@class='el-message-box__btns']//span[normalize-space(text())='Yes']" # 再次确认创建new FQDNs
FQDNs_Group_sub_Object_add_new_one_OK1_Warning_Cancel_Button_posXpath = "//div[@class='el-message-box__btns']//span[normalize-space(text())='Cancel']" # 再次确认取消new FQDNs
FQDNs_Group_sub_Object_add_new_one_Cancel2_Button_posXpath = '//div/div/div[2]/div/div/div[1]/div/div/div[1]/div[3]/button[2]/span' # new FQDNs CreateCancel2
-
+FQDNs_Group_sub_Object_group_exclude_open_posXpath = "//div[@class='fqdn-object-']"
# link页
FQDNs_listpage_linkButton_posId = "btnCopy-_OperateBtns_ElRow_Objects_fqdn_Home_App_anonymousComponent" # link按钮ID
FQDNs_listpage_linkSave_posXpath = '//*[@id="clusterSave-_ClusterTable_ElDialog_copyComponents_Objects_fqdn_Home_App_anonymousComponent"]' # Cluster和Vsys保存按钮ID
@@ -853,8 +855,8 @@ Subscriber_IDsObjectPage_button_cancel_posCss = "//button[@id='Cancle-_Subscribe
Subscriber_IDs_Group_sub_Object_include_addButton_posXpath = "//div[@class='subscriber-id-object-included_sub_object_uuids']//i[@class='iconfont icon-Create1 font-[700]']" # Subscriber_IDs_Group添加sub Object按钮
Subscriber_IDs_Group_sub_Object_exclude_addButton_posXpath = "//div[@class='subscriber-id-object-excluded_sub_object_uuids']//i[@class='iconfont icon-Create1 font-[700]']"
Subscriber_IDs_Group_sub_Object_add_new_Button_posXpath = "//button[@class='MuiIconButton-root MuiIconButton-variantPlain MuiIconButton-colorNeutral MuiIconButton-sizeMd MuiMenuButton-root MuiMenuButton-variantOutlined MuiMenuButton-colorNeutral MuiMenuButton-sizeMd css-83p2rh']//i[@class='iconfont icon-Create1']" # 新建sub_Subscriber_IDs按钮
-Subscriber_IDs_Group_sub_Object_add_new_Select_one_Button_posXpath = "//ul[@x-placement='bottom-start']/li[1]" # 新建选择Subscriber_IDs按钮
-Subscriber_IDs_Group_sub_Object_add_new_Select_Group_Button_posXpath = "//ul[@x-placement='bottom-start']/li[2]" # 新建选择Subscriber_IDs_Group按钮
+Subscriber_IDs_Group_sub_Object_add_new_Select_one_Button_posXpath = "//ul[@class='base-Popper-root MuiMenu-root Mui-expanded MuiMenu-variantOutlined MuiMenu-colorNeutral MuiMenu-sizeMd css-131n2dh']//li[1]" # 新建选择Subscriber_IDs按钮
+Subscriber_IDs_Group_sub_Object_add_new_Select_Group_Button_posXpath = "//ul[@class='base-Popper-root MuiMenu-root Mui-expanded MuiMenu-variantOutlined MuiMenu-colorNeutral MuiMenu-sizeMd css-131n2dh']//li[2]" # 新建选择Subscriber_IDs_Group按钮
Subscriber_IDs_Group_sub_Object_export_files_Button_posXpath = "//i[@class='iconfont icon-export']" # 导出文件按钮
Subscriber_IDs_Group_sub_Object_import_files_Button_posXpath = "//button[@class='MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall \
MuiButton-textSizeSmall MuiButton-colorPrimary MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary css-bc4t0x']" # object导入文件按钮
@@ -873,6 +875,7 @@ Subscriber_IDs_Group_sub_Object_add_new_one_OK1_Button_posXpath = "//div[@class=
Subscriber_IDs_Group_sub_Object_add_new_one_OK1_Warning_Yes_Button_posXpath = "//div[@class='el-message-box__btns']//span[normalize-space(text())='Yes']" # 再次确认创建new Subscriber_IDs
Subscriber_IDs_Group_sub_Object_add_new_one_OK1_Warning_Cancel_Button_posXpath = "//div[@class='el-message-box__btns']//span[normalize-space(text())='Cancel']" # 再次确认取消new Subscriber_IDs
Subscriber_IDs_Group_sub_Object_add_new_one_Cancel2_Button_posXpath = '//div/div/div[2]/div/div/div[1]/div/div/div[1]/div[3]/button[2]/span' # new Subscriber_IDs CreateCancel2
+Subscriber_IDs_Group_sub_object_group_exclude_open_posXpath = "//div[@class='subscriber-id-object-']"
# link页
Subscriber_IDs_listpage_linkButton_posId = "btnCopy-_OperateBtns_ElRow_Objects_subscriberid_Home_App_anonymousComponent" # link按钮ID
Subscriber_IDs_listpage_linkSave_posXpath = '//*[@id="clusterSave-_ClusterTable_ElDialog_copyComponents_Objects_subscriberid_Home_App_anonymousComponent"]' # Cluster和Vsys保存按钮ID
@@ -1070,6 +1073,7 @@ Keywords_Group_sub_Object_add_new_one_OK1_Warning_Yes_Button_posXpath = "//div[@
Keywords_Group_sub_Object_add_new_one_OK1_Warning_Cancel_Button_posXpath = '//div[@class="el-message-box__wrapper"]/div/div[3]/button[1]/span' # 再次确认取消new Keywords
Keywords_Group_sub_Object_add_new_one_Cancel2_Button_posXpath = '//div/div/div[2]/div/div/div[1]/div/div/div[1]/div[3]/button[2]/span' # new Keywords CreateCancel2
keywords_ObjectPage_button_OK_posXpath = "//*[@id='OK-_keywordsDetail_Home_App_anonymousComponent']" # 详情页ok按钮Xpath
+Keywords_Group_sub_Object_exclude_open_posXpath = "//div[@class='keyword-object-']"
# link页
keywords_listpage_linkButton_posId = "btnCopy-_OperateBtns_ElRow_Objects_keywords_Home_App_anonymousComponent" # link按钮ID
keywords_listpage_linkSave_posXpath = '//*[@id="clusterSave-_ClusterTable_ElDialog_copyComponents_Objects_keywords_Home_App_anonymousComponent"]' # Cluster和Vsys保存按钮ID
@@ -1232,9 +1236,9 @@ acc_ObjectDetailPage_auditLogsDrawer_compareDrawer_operationText_posXpath = url_
acc_ObjectDetailPage_itemsTotal_posXpath = url_ObjectDetailPage_itemsTotal_posXpath # Items Total Xpath
acc_ObjectDetailPage_clearCounter_posXpath = url_ObjectDetailPage_clearCounter_posXpath # Clear Counter 按钮
acc_ObjectDetailPage_objectStatistics_dropDown_posXpath = "//div[@class='MuiSelect-root MuiSelect-variantOutlined MuiSelect-colorNeutral MuiSelect-sizeMd css-1lceg5i']" # Statistics type下拉框
-acc_ObjectDetailPage_objectStatistics_elaborate_posXpath = '//div[contains(@x-placement,"start")]//div[text()="Elaborate"]' # object_statistics下的Elaborate选项
-acc_ObjectDetailPage_objectStatistics_brief_posXpath = '//div[contains(@x-placement,"start")]//div[text()="Brief"]' # object_statistics下的 Brief 选项
-acc_ObjectDetailPage_objectStatistics_none_posXpath = '//div[contains(@x-placement,"start")]//div[text()="None"]' # object_statistics下的 None 选项
+acc_ObjectDetailPage_objectStatistics_elaborate_posXpath = "//ul[@class='base-Popper-root MuiSelect-listbox Mui-expanded css-1ufo3gk']//*[text()='Elaborate']" # object_statistics下的Elaborate选项
+acc_ObjectDetailPage_objectStatistics_brief_posXpath = "//ul[@class='base-Popper-root MuiSelect-listbox Mui-expanded css-1ufo3gk']//*[text()='Brief']" # object_statistics下的 Brief 选项
+acc_ObjectDetailPage_objectStatistics_none_posXpath = "//ul[@class='base-Popper-root MuiSelect-listbox Mui-expanded css-1ufo3gk']//*[text()=’None‘]" # object_statistics下的 None 选项
acc_ObjectDetailPage_dupAlert_posXpath = "//i[@class='iconfont icon-jinggao1 text-[var(--color-btn-warning)] px-[4px] text-[18px]']" # item重复提示
acc_ObjectDetailPage_dupAlert_duplicateListTotal_posXpath = '//div[@class="DuplicateList list-box"]//p[contains(@class,"total")]' # duplicateList中的“Total:xx”
acc_ObjectDetailPage_importedFile_posXpath = url_ObjectDetailPage_importedFile_posXpath # 导入文件元素位置(Import From File 按钮旁)
diff --git a/testdata/ui_data/objects_data/ip_address.json b/testdata/ui_data/objects_data/ip_address.json
index bc6fdf9e..2af06d7d 100644
--- a/testdata/ui_data/objects_data/ip_address.json
+++ b/testdata/ui_data/objects_data/ip_address.json
@@ -12,14 +12,13 @@
"item": [
"1.1.1.1",
"1.1.1.1-1.1.1.1",
- "192.168.2.1/24",
- "1:1:1::1/24",
+ "1:1:1::1-2:2:2::2",
"94E5:E27A::6041"
]
},
"Createtype": "IP",
"Subtype": "",
- "Search_type": "ID"
+ "Search_type": "Name"
},{
"ids": "用例2、IP_Learning的增删改查",
"Name": "test-1",
@@ -54,11 +53,11 @@
"model": "0",
"type": "new_object",
"item": ["1.1.1.1"],
- "item_modify": {"type": "modify","modify_data": "192.168.2.1/24"}
+ "item_modify": {"type": "modify","modify_data": "192.168.2.1"}
},
"Createtype": "IP",
"Subtype": "",
- "Search_type": "ID"
+ "Search_type": "Name"
},{
"ids": "用例5-1、IP_Learning的添加item",
"Name":"test-1",
@@ -117,7 +116,7 @@
},
"Createtype": "IP",
"Subtype": "",
- "Search_type": "ID"
+ "Search_type": "Name"
},{
"ids": "用例7-2、IP_Group的修改操作",
"Name": "test-1",
@@ -129,7 +128,7 @@
},
"Createtype": "IP",
"Subtype": "",
- "Search_type": "ID"
+ "Search_type": "Name"
},{
"ids": "用例18、正常内容输入框校验",
"Name": "test",
@@ -142,7 +141,7 @@
},
"Createtype": "IP",
"Subtype": "",
- "Search_type": "ID"
+ "Search_type": "Name"
},{
"ids": "用例19、128字符输入框校验",
"Name": "testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest",
@@ -180,7 +179,7 @@
},
"Createtype": "IP",
"Subtype": "",
- "Search_type": "ID"
+ "Search_type": "Name"
}, {
"ids": "用例22-1、IP的增量导入",
"Name": "test-1",
@@ -192,7 +191,7 @@
},
"Createtype": "IP",
"Subtype": "",
- "Search_type": "ID"
+ "Search_type": "Name"
},{
"ids": "用例22-2、IP的增量导入",
"Name": "test-1",
@@ -204,7 +203,7 @@
},
"Createtype": "IP",
"Subtype": "",
- "Search_type": "ID"
+ "Search_type": "Name"
},{
"ids": "用例22-3、IP的增量导入",
"Name": "test-1",
@@ -216,7 +215,7 @@
},
"Createtype": "IP",
"Subtype": "",
- "Search_type": "ID"
+ "Search_type": "Name"
},{
"ids": "用例23、输入框反向测试(长度为3)",
"Name": "tes",
@@ -227,7 +226,7 @@
},
"Createtype": "IP",
"Subtype": "",
- "Search_type": "ID"
+ "Search_type": "Name"
},{
"ids": "用例24、输入框反向测试(长度为0)",
"Name": "",
@@ -238,7 +237,7 @@
},
"Createtype": "IP",
"Subtype": "",
- "Search_type": "ID"
+ "Search_type": "Name"
},{
"ids": "用例25、不输入必要数据",
"Name": "test",
@@ -249,7 +248,7 @@
},
"Createtype": "IP",
"Subtype": "",
- "Search_type": "ID"
+ "Search_type": "Name"
},{
"ids": "用例26、输入错误ipv4数据",
"Name": "test",
@@ -260,7 +259,7 @@
},
"Createtype": "IP",
"Subtype": "error_item",
- "Search_type": "ID"
+ "Search_type": "Name"
},{
"ids": "用例27、错误的ipv6的数据",
"Name": "test",
@@ -271,7 +270,7 @@
},
"Createtype": "IP",
"Subtype": "error_item",
- "Search_type": "ID"
+ "Search_type": "Name"
},{
"ids": "用例28、IP_Learning的item错误",
"Name":"test-1",
@@ -286,7 +285,7 @@
},
"Createtype": "IP_Learning",
"Subtype":"error_item",
- "Search_type": "ID"
+ "Search_type": "Name"
},{
"ids": "用例29、IP_Learning的item错误",
"Name":"test-1",
@@ -301,7 +300,7 @@
},
"Createtype": "IP_Learning",
"Subtype":"error_item",
- "Search_type": "ID"
+ "Search_type": "Name"
},{
"ids": "用例30、5wIP的增量导入",
"Name": "test-1",
@@ -313,7 +312,7 @@
},
"Createtype": "IP",
"Subtype": "",
- "Search_type": "ID"
+ "Search_type": "Name"
},{
"ids": "用例31、IP的修改操作导入item",
"Name": "test-1",
@@ -327,7 +326,7 @@
},
"Createtype": "IP",
"Subtype": "",
- "Search_type": "ID"
+ "Search_type": "Name"
},{
"ids": "用例32、Name的部分值搜索",
"Name": "random",
@@ -337,8 +336,7 @@
"item": [
"1.1.1.1",
"1.1.1.1-1.1.1.1",
- "192.168.2.1/24",
- "1:1:1::1/24",
+ "1:1:1::1-2:2:2::2",
"94E5:E27A::6041"
]
},
@@ -354,8 +352,7 @@
"item": [
"1.1.1.1",
"1.1.1.1-1.1.1.1",
- "192.168.2.1/24",
- "1:1:1::1/24",
+ "1:1:1::1-2:2:2::2",
"94E5:E27A::6041"
]
},
@@ -371,8 +368,7 @@
"item": [
"1.1.1.1",
"1.1.1.1-1.1.1.1",
- "192.168.2.1/24",
- "1:1:1::1/24",
+ "1:1:1::1-2:2:2::2",
"94E5:E27A::6041"
]
},
@@ -388,8 +384,7 @@
"item": [
"1.1.1.1",
"1.1.1.1-1.1.1.1",
- "192.168.2.1/24",
- "1:1:1::1/24",
+ "1:1:1::1-2:2:2::2",
"94E5:E27A::6041"
]
},
@@ -403,7 +398,7 @@
"model": "0",
"type": "new_object",
"item": [
- "1:1:1::1/24",
+ "1:1:1::1",
"94E5:E27A::6041"
]
},
@@ -417,7 +412,7 @@
"model": "0",
"type": "new_object",
"item": [
- "1:1:1::1/24",
+ "1:1:1::1",
"94E5:E27A::6041"
]
},
@@ -431,7 +426,7 @@
"model": "0",
"type": "new_object",
"item": [
- "1:1:1::1/24",
+ "1:1:1::1",
"94E5:E27A::6041"
]
},
diff --git a/testdata/ui_data/objects_data/moible_identities.json b/testdata/ui_data/objects_data/moible_identities.json
index e68c59ce..ea7d71a2 100644
--- a/testdata/ui_data/objects_data/moible_identities.json
+++ b/testdata/ui_data/objects_data/moible_identities.json
@@ -67,7 +67,7 @@
},{
"ids": "用例5-2、修改IMSI,item修改123*",
"Name": "test-1",
- "item_modify": {"type": "modify","modify_data": ["123$"]},
+ "item_modify": {"type": "modify","modify_data": ["^123$"]},
"Create":{
"model": "0",
"type": "new_object",
@@ -144,9 +144,9 @@
"Create":{
"model": "1",
"type": "new_object",
- "item":["123$"]
+ "item":["^123$"]
},
- "item_modify": {"type": "modify", "modify_data": ["123123$"]},
+ "item_modify": {"type": "modify", "modify_data": ["^123123$"]},
"Createtype": "IMEI",
"Subtype": "",
"Search_type": "Name"
@@ -157,7 +157,7 @@
"Create":{
"model": "0",
"type": "new_object",
- "item": ["123$"]
+ "item": ["^123$"]
},
"Createtype": "IMEI",
"Subtype":"",