summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryouzhijiang <[email protected]>2024-10-21 18:31:31 +0800
committeryouzhijiang <[email protected]>2024-10-21 18:31:31 +0800
commit9b24c7fdacbe51376714440e743d822e090a425c (patch)
tree582ac68cbee46a329858049d30e65b89b7813f9e
parente5c00777d4b1ea40f2f28d6ad2195dc278382d29 (diff)
parent1a6f25663c58d249288862fcb177bae64bae1fb8 (diff)
Merge branch 'develop' of https://git.mesalab.cn/zhaokun/tsg_ui_script into develop
-rw-r--r--common/ui_common/objects/apns.py56
-rw-r--r--common/ui_common/objects/flags.py8
-rw-r--r--common/ui_common/objects/ports.py34
-rw-r--r--page_element/ln_objects_element_position.py10
-rw-r--r--page_element/objects_element_position.py18
5 files changed, 65 insertions, 61 deletions
diff --git a/common/ui_common/objects/apns.py b/common/ui_common/objects/apns.py
index 33269b65..295cece3 100644
--- a/common/ui_common/objects/apns.py
+++ b/common/ui_common/objects/apns.py
@@ -167,7 +167,7 @@ class APNs:
time.sleep(4)
self.driver.find_element(By.XPATH, APNs_Group_sub_Object_addButton_posXpath).click() # 添加sub_Object
self.driver.find_element(By.XPATH,APNs_Group_sub_Object_add_new_Button_posXpath).click() # add new sub_object
- self.driver.find_element(By.XPATH,APNs_Group_sub_Object_add_new_Select_one_Button_posXpath).click() # new apn
+ self.driver.find_element(By.XPATH,objectPage_group_sub_object_add_new_select_button_posXpath).click() # new apn
#新建apn
self.driver.find_element(By.XPATH, APNs_Group_sub_Object_add_new_one_inputName_posXpath).send_keys(data["Name"]) # new apn name
self.driver.find_element(By.XPATH, APNs_Group_sub_Object_add_new_add_item_Button_posXpath).click() # new添加itemButton
@@ -175,7 +175,7 @@ class APNs:
self.driver.find_element(By.XPATH,APNs_Group_sub_Object_add_new_add_itemAPN_Save_Button_posXpath).click() # 添加item保存
# 确认创建apn
self.driver.find_element(By.XPATH, APNs_Group_sub_Object_add_new_one_OK1_Button_posXpath).click()
- self.driver.find_element(By.XPATH,APNs_Group_sub_Object_add_new_one_OK1_Warning_Yes_Button_posXpath).click()
+ # self.driver.find_element(By.XPATH,APNs_Group_sub_Object_add_new_one_OK1_Warning_Yes_Button_posXpath).click()
#确认创建apn group
self.object_page_save()
@@ -205,7 +205,7 @@ class APNs:
self.driver.find_element(By.XPATH,
APNs_Group_sub_Object_add_new_Button_posXpath).click() # add new sub_object
self.driver.find_element(By.XPATH,
- APNs_Group_sub_Object_add_new_Select_one_Button_posXpath).click() # new apn
+ objectPage_group_sub_object_add_new_select_button_posXpath).click() # new apn
# 新建apn
self.driver.find_element(By.XPATH, APNs_Group_sub_Object_add_new_one_inputName_posXpath).send_keys(
data["Name"]) # new apn name
@@ -217,8 +217,8 @@ class APNs:
APNs_Group_sub_Object_add_new_add_itemAPN_Save_Button_posXpath).click() # 添加item保存
# 确认创建apn
self.driver.find_element(By.XPATH, APNs_Group_sub_Object_add_new_one_OK1_Button_posXpath).click()
- self.driver.find_element(By.XPATH,
- APNs_Group_sub_Object_add_new_one_OK1_Warning_Yes_Button_posXpath).click()
+ # self.driver.find_element(By.XPATH,
+ # APNs_Group_sub_Object_add_new_one_OK1_Warning_Yes_Button_posXpath).click()
self.driver.find_element(By.XPATH, listPage_object_group_exclude_open_posXpath).click()
self.driver.find_element(By.XPATH, listPage_object_group_exclude_add_button_posXpath).click()
time.sleep(2)
@@ -493,10 +493,10 @@ class APNs:
# 选择Sub Objects中的第一个Object item的编辑图标
self.driver.find_element(By.XPATH, APNs_Group_sub_Object_edit_Button_posXpath).click()
self.driver.find_element(By.XPATH, APNs_Group_sub_Object_edit_add_Button_posXpath).click()
- self.driver.find_element(By.XPATH, APNs_Group_sub_Object_edit_input_Button_posXpath).send_keys("abcd$")
+ self.driver.find_element(By.XPATH, APNs_Group_sub_Object_edit_input_Button_posXpath).send_keys("abcd.com$")
self.driver.find_element(By.XPATH, APNs_Group_sub_Object_edit_save_Button_posXpath).click()
- self.driver.find_element(By.XPATH, APNs_Group_sub_Object_edit_ok_Button_posid).click()
- self.driver.find_element(By.XPATH,'//*[@class="el-button el-button--default el-button--small el-button--primary operation-confirm"]').click() #confirm yes
+ self.driver.find_element(By.XPATH, APNs_Group_sub_Object_edit_ok_Button_posXpath).click()
+ # self.driver.find_element(By.XPATH,'//*[@class="el-button el-button--default el-button--small el-button--primary operation-confirm"]').click() #confirm yes
# 确认修改
self.driver.find_element(By.XPATH, APNsObjectPage_button_SaveYes_posXpath).click() #只需要保存一次
@@ -797,7 +797,7 @@ class APNs:
self.driver.find_element(By.XPATH, listPage_object_apns_exportButton_posXpath).click()
self.driver.isElementExist(Element=port_listPage_object_exportPopYes_posXpath)
assert self.driver.Exist, "断言导出按钮是否置灰不展示"
- self.driver.find_element(By.XPATH, listPage_object_APNs_export_no_button_posXpath).click()
+ self.driver.find_element(By.XPATH, listpage_export_no_button_posXpath).click()
self.driver.refresh()
def create_apn(self,data):
# 调用消除右上提示弹窗
@@ -846,10 +846,10 @@ class APNs:
# 上传文件
self.import_file_from_edit_page(data)
self.driver.find_element(By.XPATH,apn_ObjectDetailPage_pleaseUpload_ok_button_posXpath).click()
- self.driver.isElementExist(Element='//li/i[@class="iconfont icon-DownNormal fontsize16"]')
+ self.driver.isElementExist(Element='//i[@class="iconfont icon-DownNormal text-[14px] hidden"]')
assert self.driver.Exist
print("存在下载按钮,测试 == Success")
- self.driver.isElementExist(Element='//li/i[@class="el-icon-close fontsize18"]')
+ self.driver.isElementExist(Element='//i[@class="iconfont icon-Delete_X text-[14px] hidden"]')
assert self.driver.Exist
print("存在删除按钮,测试 == Success")
except:
@@ -877,8 +877,8 @@ class APNs:
self.driver.find_element(By.XPATH, APNs_Group_sub_Object_add_exclude_Button_posXpath).click()
self.driver.find_element(By.XPATH, APNs_Group_sub_Object_list_Select_first_object_Button_posXpath).click()#选择侧滑框的第一行数据
self.driver.find_element(By.XPATH, APNsObjectPage_button_SaveYes_posXpath).click()
- # error_tip = self.driver.find_element(By.XPATH,'//div[@class="el-message el-message--error"]/p' ).text
- # assert "Subordinate objects of an object cannot contain only excluded objects" in error_tip.strip() ,"判断出错时的提示信息"
+ error_tip = self.driver.find_element(By.XPATH,'//div[@class="apn-object-included_sub_object_uuids"]/div[@class="MuiFormHelperText-root css-koslx8"]' ).text
+ assert "Subordinate Objects cannot be empty" in error_tip.strip() ,"判断出错时的提示信息"
def unauthorized_operation(self):
#self.driver.find_element(By.XPATH, listPage_objectSearch_APNs_All_Button_posxpath).click()
@@ -942,7 +942,7 @@ class APNs:
self.driver.find_element(By.XPATH, APNs_Group_InputDescripton_posXpath).send_keys(data["Name"])
time.sleep(3)
self.driver.find_element(By.XPATH, APNsObjectPage_button_SaveYes_posXpath).click()
- self.driver.find_element(By.XPATH, APNsObjectPage_button_warningSaveYes_posXpath).click()
+ # self.driver.find_element(By.XPATH, APNsObjectPage_button_warningSaveYes_posXpath).click()
self._goto_subObjectPage()
self._search(data)
self.driver.find_element(By.XPATH, listPage_object_APNs_select_First_object_posXpath).click() # 第一行数据前的复选框
@@ -1054,7 +1054,7 @@ class APNs:
self.driver.find_element(By.XPATH, listPage_object_apns_editButton_posXpath).click() # 点击edit按钮
elif detail_type == 1: # Object Group详情页
# 选中第一个Object Group并进入其详情页
- self.driver.find_element(By.XPATH, listpage_select_first_group_posXpath).click()
+ self.driver.find_element(By.XPATH, listpage_object_APNs_select_first_group_posXpath).click()
self.driver.find_element(By.XPATH, listPage_object_apns_editButton_posXpath).click() # 点击edit按钮
else: # etail_type=2--非本Vsys的Object详情页
@@ -1522,7 +1522,7 @@ class APNs:
data["modify_sou_item"])
self.driver.find_element(By.XPATH, apn_ObjectPagen_SaveItem_posXpath).click()
self.driver.find_element(By.XPATH, APNsObjectPage_button_SaveYes_posXpath).click()
- self.driver.find_element(By.XPATH, APNsObjectPage_button_warningSaveYes_posXpath).click()
+ # self.driver.find_element(By.XPATH, APNsObjectPage_button_warningSaveYes_posXpath).click()
else:
self.driver.find_element(By.XPATH, listPage_select_first_object_posXpath).click() # 第一行数据前的复选框
self.driver.find_element(By.XPATH, listPage_object_apns_editButton_posXpath).click() # edit按钮
@@ -1536,9 +1536,9 @@ class APNs:
data["modify_sou_item"])
self.driver.find_element(By.XPATH, apn_ObjectPagen_SaveItem_posXpath).click()
self.driver.find_element(By.XPATH, APNs_Group_sub_Object_add_new_one_OK1_Button_posXpath).click()
- self.driver.find_element(By.XPATH, APNs_Group_sub_Object_add_new_one_OK1_Warning_Yes_Button_posXpath).click()
+ # self.driver.find_element(By.XPATH, APNs_Group_sub_Object_add_new_one_OK1_Warning_Yes_Button_posXpath).click()
self.driver.find_element(By.XPATH, APNsObjectPage_button_SaveYes_posXpath).click()
- self.driver.find_element(By.XPATH, APNsObjectPage_button_warningSaveYes_posXpath).click()
+ # self.driver.find_element(By.XPATH, APNsObjectPage_button_warningSaveYes_posXpath).click()
self._goto_subObjectPage()
self._search(data)
# 获取修改后的数据
@@ -1609,7 +1609,7 @@ class APNs:
data["modify_des_item"])
self.driver.find_element(By.XPATH, apn_ObjectPagen_SaveItem_posXpath).click()
self.driver.find_element(By.XPATH, APNsObjectPage_button_SaveYes_posXpath).click()
- self.driver.find_element(By.XPATH, APNsObjectPage_button_warningSaveYes_posXpath).click()
+ # self.driver.find_element(By.XPATH, APNsObjectPage_button_warningSaveYes_posXpath).click()
else:
self.driver.find_element(By.XPATH, listPage_select_first_object_posXpath).click() # 第一行数据前的复选框
self.driver.find_element(By.XPATH, listPage_object_apns_editButton_posXpath).click() # edit按钮
@@ -1623,10 +1623,10 @@ class APNs:
data["modify_des_item"])
self.driver.find_element(By.XPATH, apn_ObjectPagen_SaveItem_posXpath).click()
self.driver.find_element(By.XPATH, APNs_Group_sub_Object_add_new_one_OK1_Button_posXpath).click()
- self.driver.find_element(By.XPATH,
- APNs_Group_sub_Object_add_new_one_OK1_Warning_Yes_Button_posXpath).click()
+ # self.driver.find_element(By.XPATH,
+ # APNs_Group_sub_Object_add_new_one_OK1_Warning_Yes_Button_posXpath).click()
self.driver.find_element(By.XPATH, APNsObjectPage_button_SaveYes_posXpath).click()
- self.driver.find_element(By.XPATH, APNsObjectPage_button_warningSaveYes_posXpath).click()
+ # self.driver.find_element(By.XPATH, APNsObjectPage_button_warningSaveYes_posXpath).click()
# 调用公用的sync点击逻辑
Request_ID = self.objects_po.click_sync(Request_ID)
if data["cluster_id"] == 2:
@@ -1803,11 +1803,11 @@ class APNs:
self.driver.find_element(By.XPATH,listPage_object_group_subobject_fist_posXpath).click()
self.driver.find_element(By.XPATH,APNs_object_group_subobject_close_posXpath).click()
self.driver.find_element(By.XPATH, APNsObjectPage_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"
+ assert self.driver.find_element(By.XPATH,'//div[@class="apn-object-included_sub_object_uuids"]/div[@class="MuiFormHelperText-root css-koslx8"]').text == "Subordinate Objects cannot be empty"
elif data["subtype"] == "2":
self.driver.find_element(By.XPATH, listPage_object_group_exclude_open_posXpath).click()
self.driver.find_element(By.XPATH, APNsObjectPage_button_SaveYes_posXpath).click()
- assert self.driver.find_element(By.XPATH,"//div[@role='alert']//p").text == "Subordinate objects of an object cannot be null"
+ assert self.driver.find_element(By.XPATH,'//div[@class="apn-object-included_sub_object_uuids"]/div[@class="MuiFormHelperText-root css-koslx8"]').text == "Subordinate Objects cannot be empty"
elif data["subtype"] == "3":
# 添加sub_Object
self.driver.find_element(By.XPATH, APNs_Group_sub_Object_addButton_posXpath).click()
@@ -1819,7 +1819,7 @@ class APNs:
time.sleep(1)
self.driver.find_element(By.XPATH, listPage_object_group_subobject_second_posXpath).click()
self.driver.find_element(By.XPATH, APNsObjectPage_button_SaveYes_posXpath).click()
- self.driver.find_element(By.XPATH, APNsObjectPage_button_warningSaveYes_posXpath).click()
+ # self.driver.find_element(By.XPATH, APNsObjectPage_button_warningSaveYes_posXpath).click()
self._goto_subObjectPage()
self.driver.find_element(By.XPATH, listpage_search_box_posXpath).click()
self.driver.find_element(By.XPATH, listPage_objectSearch_apns_selectLabel_posXpath).send_keys(data['Name'])
@@ -1977,7 +1977,7 @@ class APNs:
time.sleep(0.5)
self.driver.find_element(By.XPATH, "//button[@class='el-button import-ok el-button--primary el-button--small']").click()
self.driver.find_element(By.XPATH, APNsObjectPage_button_SaveYes_posXpath).click() # 只需要保存一次,不需要confirm save
- self.driver.find_element(By.XPATH, APNsObjectPage_button_warningSaveYes_posXpath).click()
+ # self.driver.find_element(By.XPATH, APNsObjectPage_button_warningSaveYes_posXpath).click()
self._goto_subObjectPage()
self._search(data)
self.driver.find_element(By.XPATH, listPage_select_first_object_posXpath).click()
@@ -2027,7 +2027,7 @@ class APNs:
time.sleep(1)
self.driver.find_element(By.XPATH, apn_ObjectPage_InputName_posXpath).send_keys(self.random_name) # 输入Name
self.driver.find_element(By.XPATH, APNsObjectPage_button_SaveYes_posXpath).click() # 只需要保存一次,不需要confirm save
- self.driver.find_element(By.XPATH, APNsObjectPage_button_warningSaveYes_posXpath).click()
+ # self.driver.find_element(By.XPATH, APNsObjectPage_button_warningSaveYes_posXpath).click()
time.sleep(3)
self.objects_po.extract_ele() ## 提取ID、Name、Description、Detail
time.sleep(1)
@@ -2067,7 +2067,7 @@ class APNs:
self.driver.find_element(By.XPATH,
"//button[@class='el-button import-ok el-button--primary el-button--small']").click()
self.driver.find_element(By.XPATH, APNsObjectPage_button_SaveYes_posXpath).click() # 只需要保存一次,不需要confirm save
- self.driver.find_element(By.XPATH, APNsObjectPage_button_warningSaveYes_posXpath).click()
+ # self.driver.find_element(By.XPATH, APNsObjectPage_button_warningSaveYes_posXpath).click()
self._goto_subObjectPage()
self._search(data)
self.driver.find_element(By.XPATH, listPage_object_APNs_select_First_object_posXpath).click() # 选中第一行
diff --git a/common/ui_common/objects/flags.py b/common/ui_common/objects/flags.py
index fec80e5f..0e0cc9f0 100644
--- a/common/ui_common/objects/flags.py
+++ b/common/ui_common/objects/flags.py
@@ -839,10 +839,10 @@ class Flags:
self.driver.find_element(By.XPATH,
flag_ObjectGroupDetailPage_subObjects_subCreateFlagDrawer_okButton_posXpath).click() # 点击“OK”按钮
# 点击侧滑子Create Flag 页面确认弹窗的“Yes”按钮
- subCreateFlagDrawer_okButton_yes = self.driver.find_element(By.XPATH,
- flag_ObjectGroupDetailPage_subObjects_subCreateFlagDrawer_okButton_yes_posXpath)
- if subCreateFlagDrawer_okButton_yes.is_displayed():
- subCreateFlagDrawer_okButton_yes.click()
+ # subCreateFlagDrawer_okButton_yes = self.driver.find_element(By.XPATH,
+ # flag_ObjectGroupDetailPage_subObjects_subCreateFlagDrawer_okButton_yes_posXpath)
+ # if subCreateFlagDrawer_okButton_yes.is_displayed():
+ # subCreateFlagDrawer_okButton_yes.click()
def _operate_exclude_objects(self, data, data_index=0):
if "Exclude Objects" in data and data["Exclude Objects"] != "":
diff --git a/common/ui_common/objects/ports.py b/common/ui_common/objects/ports.py
index fb64bbc9..5d691e5f 100644
--- a/common/ui_common/objects/ports.py
+++ b/common/ui_common/objects/ports.py
@@ -500,10 +500,10 @@ class Ports:
self.driver.find_element(By.XPATH,
port_ObjectGroupDetailPage_subObjects_subCreatePortDrawer_okButton_posXpath).click() # 点击“OK”按钮
# 点击侧滑子Create Port页面确认弹窗的“Yes”按钮
- subCreatePortDrawer_okButton_yes = self.driver.find_element(By.XPATH,
- port_ObjectGroupDetailPage_subObjects_subCreatePortDrawer_okButton_yes_posXpath)
- if subCreatePortDrawer_okButton_yes.is_displayed():
- subCreatePortDrawer_okButton_yes.click()
+ # subCreatePortDrawer_okButton_yes = self.driver.find_element(By.XPATH,
+ # port_ObjectGroupDetailPage_subObjects_subCreatePortDrawer_okButton_yes_posXpath)
+ # if subCreatePortDrawer_okButton_yes.is_displayed():
+ # subCreatePortDrawer_okButton_yes.click()
def _operate_sub_items_modify(self, data, old_value, new_value):
print("_operate_sub_items_modify!!")
@@ -512,8 +512,8 @@ class Ports:
self.driver.find_element(By.XPATH,
port_ObjectGroupDetailPage_subObjects_subCreatePortDrawer_okButton_posXpath).click()
# 点击确认弹窗的YES
- self.driver.find_element(By.XPATH,
- port_ObjectGroupDetailPage_subObjects_subCreatePortDrawer_okButton_yes_posXpath).click()
+ # self.driver.find_element(By.XPATH,
+ # port_ObjectGroupDetailPage_subObjects_subCreatePortDrawer_okButton_yes_posXpath).click()
@screenshot_on_failure
def _sub_items_port_modify(self, data, old_value, new_value):
@@ -527,14 +527,14 @@ class Ports:
print("clicked sub_port_object_edit_btn")
# 进入Edit Interval侧滑页面
# 点击要修改数据的编辑按钮操作
- sub_port_item_edit_btn_xpath = "(//*[normalize-space(text())='{}']/ancestor::*[@class='view-row']//i[contains(@class, 'iconfont icon-Edit')])[1]".format(
+ sub_port_item_edit_btn_xpath = '(//*[normalize-space(text())="{}"/ancestor::div[@class="form-list-row css-xpbhx9"]//i[@class="iconfont icon-Edit"])[1]'.format(
old_value)
print("old_value:{}".format(old_value))
self.driver.implicitly_wait(6)
self.driver.find_element(By.XPATH, sub_port_item_edit_btn_xpath).click()
# 清空要编辑修改数据的输入框内容
# port-input el-input el-input--small
- sub_port_item_input_xpath = '//*[@id="router-view-container"]//div[@class="port-input el-input el-input--small"]//input'.format(old_value)
+ sub_port_item_input_xpath = '//input[@class="MuiInput-input css-1u0jcuo"]'.format(old_value)
self.driver.find_element(By.XPATH, sub_port_item_input_xpath).clear()
# 清空后键入新数据
self.driver.find_element(By.XPATH, sub_port_item_input_xpath).send_keys(new_value)
@@ -560,16 +560,16 @@ class Ports:
:return:
"""
self._object_detail_page_save()
- notLoading_elem_xpath = self.driver.element_isExist(By.XPATH,
- global_loading_elem_whenNotDisplaied_xpath)
+ # notLoading_elem_xpath = self.driver.element_isExist(By.XPATH,
+ # global_loading_elem_whenNotDisplaied_xpath)
# print("是否不在加载:{}".format(is_exist_notLoading_elem_xpath))
- while not notLoading_elem_xpath: # 加载
- # print("Loading!")
- notLoading_elem_xpath = self.driver.element_isExist(By.XPATH,
- global_loading_elem_whenNotDisplaied_xpath)
- if notLoading_elem_xpath:
- # print("加载完毕")
- break
+ # while not notLoading_elem_xpath: # 加载
+ # # print("Loading!")
+ # notLoading_elem_xpath = self.driver.element_isExist(By.XPATH,
+ # global_loading_elem_whenNotDisplaied_xpath)
+ # if notLoading_elem_xpath:
+ # # print("加载完毕")
+ # break
self.first_row_checkBox_element = self.driver.find_element(By.XPATH,
listPage_select_first_object_posXpath).click() # 勾选第一行元素
self.driver.find_element(By.XPATH, listpage_edit_button_posXpath).click() # 点击edit按钮
diff --git a/page_element/ln_objects_element_position.py b/page_element/ln_objects_element_position.py
index 09d2134b..e4cbdb19 100644
--- a/page_element/ln_objects_element_position.py
+++ b/page_element/ln_objects_element_position.py
@@ -28,7 +28,7 @@ listPage_object_APNs_select_Second_object_posXpath ='(//span[@class="MuiCheckbox
listPage_object_APNs_No_Data_posXpath = '//div[@class="MuiDataGrid-overlay css-14349d1"]' #列表页No Data按钮!!!!!
listPage_object_APNs_reference_count_posXpath='(//button[@class="MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium MuiButton-colorPrimary MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium MuiButton-colorPrimary css-18studs"])[1]' #列表中第一个元素的reference count!!!!!
listPage_object_APNs_first_row_id_posXpath = "//div[contains(@class,'el-table__body-wrapper')]//tr[1]//td[count(//div[@class='el-table__header-wrapper']//span[text()='ID']/../../../preceding-sibling::th)+1]//div[@class='table-status-item-id']//span"
-
+listpage_object_APNs_select_first_group_posXpath = '(//i[@class="iconfont color-ip icon-APNgroup css-lp3td5"]/ancestor::div[@class="css-16m40q9 MuiDataGrid-cell MuiDataGrid-cell--textLeft"]/preceding-sibling::div[2]//input)[1]'
#APN Create&Edit页
apn_Objectpage_ln_select_statistics_input_posXpath = "//div[@class='apn-object-statistics_option']"
apn_ObjectPage_InputName_posXpath='//input[@class="MuiInput-input css-fqt4w4"]'#输入名字!!!!!
@@ -48,6 +48,8 @@ APNsObjectPage_button_cancel_posCss = "" #Cancel按钮
APNsObjectPage_importTipsValue_posXpath_template = '//div[@class="drawer-box"]//div[@class="importTips"]//td[count(//div[@class="drawer-box"]//div[@class="importTips"]//th[@title="{}"]/preceding-sibling::th)+1]' #!!!!!!!!!!
apn_reference_count_list_xpath ='//*[@class="policy-item el-dropdown-menu__item"]' #usage quantity of APN #!!!!!!!!!!
APNsObjectPage_importTipsValue_error_item_posXpath = '//div[@class="importTable"]//*[@class="{}"]'#!!!!!!!!!!
+apn_ObjectDetailPage_pleaseUpload_ok_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-k5thc0"]'
+apn_ObjectDetailPage_pleaseUpload_posXpath = '//label[@class="MuiButtonBase-root MuiButton-root MuiButton-outlined MuiButton-outlinedPrimary MuiButton-sizeSmall MuiButton-outlinedSizeSmall MuiButton-colorPrimary MuiButton-root MuiButton-outlined MuiButton-outlinedPrimary MuiButton-sizeSmall MuiButton-outlinedSizeSmall MuiButton-colorPrimary css-154nz5n"]'
#APNs Group Object Create&Edit页
apn_Group_InputName_posXpath='//div[@class="MuiInput-root MuiInput-variantOutlined MuiInput-colorNeutral MuiInput-sizeMd MuiInput-formControl css-uzf287"]/input' # apn group input输入框Xpath!!!!!
APNs_Group_InputDescripton_posXpath='//textarea[@placeholder="Please enter the content"]' #apn group description输入框xpath!!!!!
@@ -71,10 +73,10 @@ APNs_Group_sub_Object_add_new_one_OK1_Warning_Cancel_Button_posXpath = '/html/bo
APNs_Group_sub_Object_add_new_one_Cancel2_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 form-action-cancel css-5vcc8t"])[2]' # new APNs CreateCancel 右下角!!!!!
APNs_Group_sub_Object_edit_Button_posXpath='//*[@id="OperateBtn-_OperateBtn_MemberItem_SubObjectsList_ElFormItem_ElForm_VPanel_VEditPanel_apnDetail_Home_App_anonymousComponent"]/i' #sub object中编辑第一个Object的图标
-APNs_Group_sub_Object_edit_add_Button_posXpath = '(//*[@id="temporary_form"]/i)[last()]' #apn编辑页面的添加按钮
+APNs_Group_sub_Object_edit_add_Button_posXpath = '//button[@class="MuiButtonBase-root MuiButton-root MuiLoadingButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary MuiButton-root MuiLoadingButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary form-list-action-add css-h4tbqb"]' #apn编辑页面的添加按钮
APNs_Group_sub_Object_edit_input_Button_posXpath = APNs_Group_sub_Object_add_new_addAPN_item_posXpath #input
-APNs_Group_sub_Object_edit_save_Button_posXpath = '//*[@id="router-view-container"]//i[@class="operate-icon iconfont icon-save check color31739C"]'#save
-APNs_Group_sub_Object_edit_ok_Button_posid ="OK-_apnDetail_VDraswer_EditDraw_apnDetail_Home_App_anonymousComponent" #OK
+APNs_Group_sub_Object_edit_save_Button_posXpath = '//i[@class="operate-icon iconfont icon-save"]'#save
+APNs_Group_sub_Object_edit_ok_Button_posXpath ='(//button[@class="MuiButtonBase-root MuiButton-root MuiLoadingButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary MuiButton-root MuiLoadingButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary form-action-submit css-1djnbgz"])[2]' #OK
#APN查询页面,Object类似
listPage_objectSearch_APNs_select_Id_posXpath = '//li[@id="1-_FilteredSearch_ElRow_Objects_apn_Home_App_anonymousComponent"]' #查询ID
listPage_objectSearch_APNs_select_Name_posXpath = "//ul[@class='base-Popper-root MuiAutocomplete-listbox css-18r31z0']//span[text()='Name']" #查询Name
diff --git a/page_element/objects_element_position.py b/page_element/objects_element_position.py
index 808dd23c..554b202b 100644
--- a/page_element/objects_element_position.py
+++ b/page_element/objects_element_position.py
@@ -13,13 +13,15 @@ listpage_no_data_posXpath = '//div[@class="MuiDataGrid-overlay css-14349d1"]' #�
listpage_reference_count_posXpath = '(//button[@class="MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium MuiButton-colorPrimary MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium MuiButton-colorPrimary css-18studs"])[1]' #列表中第一个元素的reference count!!!!!
listpage_first_row_name_posXpath = '(//span[@class="truncate"])[1]' #第一行nameXpath!!!!!
listpage_delete_no_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-1hoe4y0"]'
+listpage_export_no_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-1hoe4y0"]'
listpage_export_yes_button_posXpath = '//button[@class="MuiButtonBase-root MuiButton-root MuiLoadingButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeSmall MuiButton-containedSizeSmall MuiButton-colorPrimary MuiButton-root MuiLoadingButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeSmall MuiButton-containedSizeSmall MuiButton-colorPrimary css-1k1ho7l"]'
listPage_objectSearch_select_Name_posXpath = "//ul[@class='base-Popper-root MuiAutocomplete-listbox css-18r31z0']//span[text()='Name']" #查询Name
listPage_objectSearch_select_Details_posXpath = "//ul[@class='base-Popper-root MuiAutocomplete-listbox css-18r31z0']//span[text()='Detail']" #查询Details
listPage_objectSearch_select_Description_posXpath = "//ul[@class='base-Popper-root MuiAutocomplete-listbox css-18r31z0']//span[text()='Description']" #查询Description
listPage_object_Select_createButton_posXpath = "//ul[@class='base-Popper-root MuiMenu-root Mui-expanded MuiMenu-variantOutlined MuiMenu-colorNeutral MuiMenu-sizeMd css-1iuehdr']//li[1]"
listPage_objectGroup_Select_createButton_posXpath = "//ul[@class='base-Popper-root MuiMenu-root Mui-expanded MuiMenu-variantOutlined MuiMenu-colorNeutral MuiMenu-sizeMd css-1iuehdr']//li[2]"
-
+objectPage_group_sub_object_add_new_select_button_posXpath = '//ul[@class="base-Popper-root MuiMenu-root Mui-expanded MuiMenu-variantOutlined MuiMenu-colorNeutral MuiMenu-sizeMd css-131n2dh"]/li[1]'
+objectPage_group_sub_objectGroup_add_new_select_button_posXpath = '//ul[@class="base-Popper-root MuiMenu-root Mui-expanded MuiMenu-variantOutlined MuiMenu-colorNeutral MuiMenu-sizeMd css-131n2dh"]/li[2]'
# login page 登录页面
loginPage_userName_posName = "username"
loginPage_passwd_posName = "password"
@@ -137,7 +139,7 @@ MuiButton-outlined MuiButton-outlinedPrimary MuiButton-sizeSmall MuiButton-outli
main_ObjectPage_No_data_text_posXpath = "//DIV[@class='MuiDataGrid-overlay css-14349d1']"
# 列表中元素
-main_listPage_object_select_First_object_posXpath = '//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]'
+main_listPage_object_select_First_object_posXpath = '//div[@data-rowindex="0"]'
main_listPage_object_select_Second_object_posXpath = '//table/tbody/tr[2]/td[1]/div/div/div[1]/div/label/span[1]/span' # 选择列表中第二个对象
main_listPage_object_total_value_posXpath = '(//div[@class="flex-1 flex items-center justify-center undefined"]/span)[1]' # 列表页total值
##Object模块列设置
@@ -271,8 +273,8 @@ listPage_current_object_reprtition_tips_posXpath = '//*[@id="router-view-contain
listPage_other_object_reprtition_tips_posXpath = '//*[@id="router-view-container"]//div[@title="Duplicate data exists"]'
# '//table/tbody/tr[1]/td[4]/div/div/div/div/div/div[1]/span' # IMSI提取Details
listPage_object_group_exclude_open_posXpath = "//div[@class='ip-object-']"
-listPage_object_group_subobject_fist_posXpath = "//div[@class='tab-content floatleft height100 width100 margin-top40']//ul[@class='row-container tableList']/li[1]//div[@class='row-content-cell']"
-listPage_object_group_subobject_second_posXpath = "//div[@class='tab-content floatleft height100 width100 margin-top40']//ul[@class='row-container tableList']/li[2]//div[@class='row-content-cell']/span"
+listPage_object_group_subobject_fist_posXpath = '//ul[@class="MuiList-root MuiList-vertical MuiList-variantPlain MuiList-colorNeutral MuiList-sizeMd css-1cklc3"]/li[1]//span[@class="truncate"]'
+listPage_object_group_subobject_second_posXpath = '//ul[@class="MuiList-root MuiList-vertical MuiList-variantPlain MuiList-colorNeutral MuiList-sizeMd css-1cklc3"]/li[2]//span[@class="truncate"]'
ip_object_group_subobject_close_posXpath = "//div[@class='KeywordsList list-box']//span[normalize-space(text())='Close']"
fqdn_object_group_subobject_close_posXpath = "//div[@class='FqdnList list-box']//span[normalize-space(text())='Close']"
http_signature_object_group_close_posXpath = "//div[@class='HttpSignatureList list-box']//span[normalize-space(text())='Close']"
@@ -1260,7 +1262,7 @@ acc_ObjectDetailPage_firstAccObject = url_ObjectDetailPage_firstUrlObject ## �
acc_ObjectGroupDetailPage_subObjects_search_posId = url_ObjectDetailPage_object_ip_search_posId # Subordinate Objects 下搜索框id
acc_ObjectGroupDetailPage_subObjects_toggleDraw_addButton_posXpath = "//button[@class='MuiIconButton-root MuiIconButton-variantPlain MuiIconButton-colorNeutral MuiIconButton-sizeMd MuiMenuButton-root MuiMenuButton-variantOutlined MuiMenuButton-colorNeutral MuiMenuButton-sizeMd css-83p2rh']" # Accounts侧滑窗口的"+"按钮
acc_ObjectGroupDetailPage_subObjects_toggleDraw_closeButton_posXpath = url_ObjectGroupDetailPage_subObjects_toggleDraw_closeButton_posXpath # Accounts侧滑窗口的Close按钮
-acc_ObjectGroupDetailPage_subObjects_toggleDraw_addButton_account_posXpath = '(//ul[@class="el-dropdown-menu el-popper el-dropdown-menu--small"]/li[not(contains(text(),"Group"))])[last()]' # Accounts侧滑窗口的"+"按钮下的Account
+acc_ObjectGroupDetailPage_subObjects_toggleDraw_addButton_account_posXpath = objectPage_group_sub_object_add_new_select_button_posXpath # Accounts侧滑窗口的"+"按钮下的Account
acc_ObjectGroupDetailPage_subObjects_subCreateAccountDrawer_nameInput_posXpath = "//div[@class='MuiBox-root css-1krxo6z']//input[@class='MuiInput-input css-fqt4w4']" # 侧滑子Create Account页面Name input Xpath
acc_ObjectGroupDetailPage_subObjects_subCreateAccountDrawer_itemsAddButton_posXpath = "//div[@class='MuiBox-root css-1krxo6z']//i[@class='iconfont icon-Create1 font-[700]']" # 侧滑子Create Account页面中Items下的"+"按钮 Xpath
acc_ObjectGroupDetailPage_subObjects_subCreateAccountDrawer_itemsValueInput_posXpath = "//div[@class='MuiBox-root css-1krxo6z']//input[@class='MuiInput-input css-1u0jcuo']" # 侧滑子Create Account页面中Items下的item value输入框 Xpath
@@ -1526,10 +1528,10 @@ port_ObjectDetailPage_mainOkButton_posXpath = '//button[@class="MuiButtonBase-ro
port_ObjectDetailPage_okButton_yes_posXpath = acc_ObjectDetailPage_okButton_yes_posXpath # 确认弹窗的“Yes”按钮
# 对象组详情页
-port_ObjectGroupDetailPage_subObjects_addButton_normalAdd_posXpath = '//div[@data-desc="subObject"]//i[@class="operate-icon iconfont icon-Create1"]' # Subordinate Objects 下有数据新增时"+"按钮Xpath
-port_ObjectGroupDetailPage_subObjects_addButton_newAdd_posXpath = '//div[@class="port-object-included_sub_object_uuids"]' # Subordinate Objects 下无数据新增时"+"按钮Xpath
+port_ObjectGroupDetailPage_subObjects_addButton_normalAdd_posXpath = '//div[@class="port-object-included_sub_object_uuids"]//i[@class="iconfont icon-Create1 text-[18px] font-[700] text-[--color-primary] cursor-pointer"]' # Subordinate Objects 下有数据新增时"+"按钮Xpath
+port_ObjectGroupDetailPage_subObjects_addButton_newAdd_posXpath = '//div[@class="port-object-included_sub_object_uuids"]//button' # Subordinate Objects 下无数据新增时"+"按钮Xpath
port_ObjectGroupDetailPage_subObjects_toggleDraw_addButton_posXpath = '//div[@class="px-[12px] py-[4px] flex"]/button' # Ports侧滑窗口的"+"按钮
-port_ObjectGroupDetailPage_subObjects_toggleDraw_addButton_port_posXpath = '(//ul[@class="el-dropdown-menu el-popper el-dropdown-menu--small"]/li[not(contains(text(),"Group"))])[last()]' # Ports侧滑窗口的"+"按钮下的Port
+port_ObjectGroupDetailPage_subObjects_toggleDraw_addButton_port_posXpath = objectPage_group_sub_object_add_new_select_button_posXpath # Ports侧滑窗口的"+"按钮下的Port
port_ObjectGroupDetailPage_subObjects_subCreatePortDrawer_nameInput_posXpath = '(//input[@class="MuiInput-input css-fqt4w4"])[2]' # 侧滑子Create Ports页面Name input Xpath
port_ObjectGroupDetailPage_subObjects_subCreatePortDrawer_itemsAddButton_posXpath = '//button[@class="MuiButtonBase-root MuiButton-root MuiLoadingButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary MuiButton-root MuiLoadingButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary form-list-action-add css-h4tbqb"]' # 侧滑子Create Ports页面中Items下的"+"按钮 Xpath
port_ObjectGroupDetailPage_subObjects_subCreatePortDrawer_itemsValueInput_posXpath = '//input[@class="MuiInput-input css-1u0jcuo"]' # 侧滑子Create Ports页面中Items下的item value输入框 Xpath