summaryrefslogtreecommitdiff
path: root/page_element
diff options
context:
space:
mode:
authorguowenzheng <[email protected]>2024-10-14 14:46:09 +0800
committerguowenzheng <[email protected]>2024-10-14 14:46:09 +0800
commitd3010352b268017832d1c7dd122542ef12dc091a (patch)
treea28c476082b2503e0cff345f60eeabab29b8c0f3 /page_element
parentca85fb33dbdf93b985ce8df4b532de6da3c8db40 (diff)
功能补充
Diffstat (limited to 'page_element')
-rw-r--r--page_element/admin_area_element_position.py2
-rw-r--r--page_element/ln_objects_element_position.py8
-rw-r--r--page_element/objects_element_position.py34
3 files changed, 22 insertions, 22 deletions
diff --git a/page_element/admin_area_element_position.py b/page_element/admin_area_element_position.py
index 8047dd7d..77bb97f1 100644
--- a/page_element/admin_area_element_position.py
+++ b/page_element/admin_area_element_position.py
@@ -1,7 +1,7 @@
# main页面
##上导航栏
mainPage_navigationBar_logo_posCss = ".tsg-img-logo"
-mainPage_button_menu_posXpath = "//i[@class='icon-menu iconfont']" # menu按钮定位
+mainPage_button_menu_posXpath = '//div[@class="systemMenu"]//span[text()="Menu"]' # menu按钮定位
mainPage_button_adminArea_posCss = ".el-dropdown-menu__item:nth-child(3) > .el-row--flex > .el-col:nth-child(2)" # Admin Area按钮定位
mainPage_button_adminArea_posXpath = "//*[@class='level1-icon iconfont icon-Admin-Area']/../../.." # Admin Area按钮定位
# mainPage_text_adminArea_posXpath = "//span[@class='root-title']" #当前页面左上角Admin Area定位
diff --git a/page_element/ln_objects_element_position.py b/page_element/ln_objects_element_position.py
index 90bf1066..ef7c73a7 100644
--- a/page_element/ln_objects_element_position.py
+++ b/page_element/ln_objects_element_position.py
@@ -124,7 +124,7 @@ tunnel_add_endpoint_b= "//div[@class='tunnel-object-endpointB']"
tunnel_add_item_2="//div[@class='tunnel-object-endpointB']//i[@class='iconfont icon-Create1 font-[700]']"
tunnel_ip_list_fourth="//div[@class='pt-[2px] overflow-hidden flex-1']//ul/li[9]//div[@class='flex h-[22px] leading-[22px] MuiBox-root css-14di81r']"
tunnel_page_description="//div[@class='tunnel-object-description']//textarea[1]"
-tunnel_ip_list_close="//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-5vcc8t']"
+tunnel_ip_list_close="//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-zcc2bs']"
tunnel_ip_list_add_button='//i[@class="iconfont icon-Create1"]'
tunnel_ip_list_select_ip='//li[normalize-space(text())="Address"]'
@@ -483,9 +483,9 @@ Applications_create_rate_limiting_input = Object_Application_create_drop_input_x
Applications_create_Drop_button = '//*[text()="Drop"]'
Admin_application = '//*[@id="Application_applications"]/a'
Admin_application_edit_button = '//*[@id="appEdit-_OperateBtns_ElCol_ElRow_Application_Home_App_anonymousComponent"]//p[@class="text-content text"]'
-Applications_total_page = '//*[@id="pagination-_pagination_AppTable_Application_Home_App_anonymousComponent"]/span'
-Applications_category_collaboration = '(//*[@id="security-content"]//div[@class="item-value el-row"])[1]'
-Applications_clear_filters = '//*[@id="filter_btn-_Application_Home_App_anonymousComponent"]/span'
+Applications_total_page = '(//div[@class="flex-1"]//span[@class="text-textColor"])[1]'
+Applications_category_collaboration = '//div[@data-viewport-type="element"]//span[text()="business-systems"]'
+Applications_clear_filters = '//span[@class="action-refresh inline-flex mr-[8px] "]/button'
Applications_row = '//table/tbody/tr[{}]/td[2]/div/div' #application主页面各行xpath路径
Applications_export_button = '//*[@class="iconfont icon-export"]' #Applications主页面导出按钮xpath路径
Applications_export_select_box = '(//*[@class="el-dialog__body"]//span[@class="el-checkbox__input is-checked"]/span)[{}]' #导出页面勾选框xpath路径
diff --git a/page_element/objects_element_position.py b/page_element/objects_element_position.py
index 6db7303a..0436b2ea 100644
--- a/page_element/objects_element_position.py
+++ b/page_element/objects_element_position.py
@@ -184,7 +184,7 @@ listPage_object_pages_currentPageAreaMinNumber_posXpath = '//li[@class="el-icon
listPage_object_pages_currentPageAreaMaxNumber_posXpath = '(//li[@class="el-icon more btn-quicknext el-icon-more"]/preceding-sibling::li)[last()]' # 列表页当前页码所属区域最大页码元素Xpath
listPage_object_pages_currentPageArea_MaxNumber_posXpath = '(//li[@class="number"])[last()]'
listPage_object_pages_previousPage_button_poxXpath = '//div[@class="page-box-containcheck"]//button[@class="btn-prev"]/i' # 前翻页按钮Xpath
-listPage_object_pages_nextPage_button_poxXpath = '//div[@class="page-box-containcheck"]//button[@class="btn-next"]' # 后翻页按钮Xpath
+listPage_object_pages_nextPage_button_poxXpath = '//button[@aria-label="Go to next page"]' # 后翻页按钮Xpath
listPage_object_pages_next_2_Page_button_poxXpath = '//div[1]/ul/li[text()="2"]' # 翻页至第二页
listPage_object_pages_goTo_input_poxXpath = '//div[@class="page-box-containcheck"]//input[@class="el-input__inner"]' # 页码Go to输入框Xpath
listPage_object_pages_quickPreviousPage_button_poxXpath = '//li[contains(@class,"el-icon more btn-quickprev")]' # 快速前翻页按钮Xpath
@@ -208,8 +208,8 @@ listPage_object_pages_clearCounter_button_poxXpath = '//div[@class="page-box-con
listPage_object_pages_first_quoted_object_elem_posXpath = '(//div[contains(@class,"cursorPointer textCenter") and number(text()>=1)])[1]/ancestor::tr//*[@class="el-checkbox__inner"]' # 列表页中Reference Count大于等于1的第一个Object的CheckBox
listPage_first_row_checkBox_posXpath = '(//td[@rowspan="1"and @colspan="1"]//span[@class="el-checkbox__inner"])[1]' # 列表页 第一行的checkBox
listPage_second_row_checkBox_posXpat = '(//td[@rowspan="1"and @colspan="1"]//span[@class="el-checkbox__inner"])[2]' # 列表页 第二行的checkBox
-listPage_item_search_text_posXpath = "//input[@placeholder='Search for']"
-listPage_item_search_total_text_posXpath = "//div[@class='LocalationDraswer lstsub policy-right-show-edit v-draswer']//p[@class='total']"
+listPage_item_search_text_posXpath = '//input[@placeholder="Search"]'
+listPage_item_search_total_text_posXpath = '//div[@class="text-[--color-text-disabled] h-[18px] mt-[6px] mb-[4px]"]'
listPage_referenceCount_drawerList_ruleOrObject_posXpaths = '//div[@class="box-content"]//div[contains(@class,"el-dropdown-menu__item")]' # 列表页referenceCount侧滑页面中的所有rule或Object
listPage_referenceCount_drawerList_disabledRuleOrObject_posXpaths = '//div[@class="box-content"]//div[contains(@class,"el-dropdown-menu__item") and contains(@class,"showNamePointer")]'# 列表页referenceCount侧滑页面中的所有不可点击的rule或Object
listPage_referenceCount_drawerList_ruleOrObject_posXpaths_template = '(//div[@class="box-content"]//div[contains(@class,"el-dropdown-menu__item")])[{}]' # 列表页referenceCount侧滑页面中的所有rule或Object
@@ -442,7 +442,7 @@ listPage_object_urls_tableDetails_posXpath = '//div[@class="el-table__header-wra
# listPage_object_urls_tableDetails_selected_detailsRow_posXpaths = '//span[@class="el-checkbox__input is-checked"]/ancestor::tr//div[@class="itemDetails cursor"]/span' # list页被选中的对象details 值Xpath
# listPage_object_urls_tableDetails_selected_detailsRow_posXpaths = '//span[@class="el-checkbox__input is-checked"]/ancestor::tr//div[@class="itemDetails cursor"]/..' # list页被选中的对象details 值Xpath
listPage_object_urls_tableDetails_selected_detailsRow_posXpaths = '//span[@class="el-checkbox__input is-checked"]/ancestor::tr//div[@class="itemDetails cursor"]' # list页被选中的对象details 值Xpath
-listPage_object_urls_tableDetails_detailsRow_firstDetailValue_posXpaths = '(//div[@class="itemDetails cursor"][1]/span)[1]' # 列表页某行第一个details值 Xpath
+listPage_object_urls_tableDetails_detailsRow_firstDetailValue_posXpaths = '(//div[@class="DuneTableCellContent text-textColor css-ruuyc6"])[1]' # 列表页某行第一个details值 Xpath
listPage_object_urls_tableDetails_selected_checkBox_posXpaths = '//input[@aria-checked="true"]' # list页被选中的对象 CheckBox Xpath
listPage_object_urls_tableDetails_firstRowValues_span_posXpaths = '//li[@class="row el-dropdown-menu__item"]//span[@class="ellipsis list-popover"]' # list页点击Details后展示的数据Xpaths_span
listPage_object_urls_tableDetails_firstRowValues_div_posXpaths = '//li[@class="row el-dropdown-menu__item"]//div[@class="row-content-cell"]' # list页点击Details后展示的数据Xpaths_div
@@ -506,7 +506,7 @@ listPage_object_urls_searchCreatedBy_posId = '5-_FilteredSearch_ElRow_Objects_ur
# URLs对象详情页
url_ObjectDetailPage_nameInput_posXpath = '//input[@class="MuiInput-input css-fqt4w4"]' # Name输入框Xpath
-url_ObjectDetailPage_nameLenthNumber_posXpath = '//*[@class="VEditPanel"]//*[@class="biFangNameLength-length"]' # Name输入框中字符长度数值Xpath
+url_ObjectDetailPage_nameLenthNumber_posXpath = '//span[@class="flex items-center text-[var(--color-text-disabled)]"]' # Name输入框中字符长度数值Xpath
url_ObjectDetailPage_addButton_posXpath = "//i[@class='iconfont icon-Create1 font-[700]']" # “+”按钮id
url_ObjectDetailPage_itemsText_posXpath = '//div[@class="ItemRow infinite-list-item" and not(@style)]//div[@class="item-box"]//span[not(@class)]' # Items 列表下所有Item的文本元素
url_ObjectDetailPage_item_subAddButton_poXpath = "//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 css-1tj4fid']" # 单个Item中新增多条数据的"+"按钮
@@ -526,7 +526,7 @@ url_ObjectDetailPage_auditLogs_posXpath = '//div[@class="audit_log"]/span' # Au
url_ObjectDetailPage_auditLogsDrawer_firstRowLog_checkBox_posXpath = '(//div[@class="LocalationDraswer lstsub right-show-edit right-show-edit-other"]//table[@class="el-table__body"]//span[@class="el-checkbox__input"])[1]' # Audit Logs 侧滑页第一条日志CheckBox Xpath
url_ObjectDetailPage_auditLogsDrawer_compareButton_posXpath = '//div[@class="LocalationDraswer lstsub right-show-edit right-show-edit-other"]//button[contains(@id,"test-compare-_")]' # Audit Logs 侧滑页Compare 按钮Xpath
url_ObjectDetailPage_auditLogsDrawer_compareDrawer_operationText_posXpath = '//div[contains(text(),"Operation")]/following-sibling::div' # Audit Logs 侧滑页点击Compare后的 operation text Xpath
-url_ObjectDetailPage_itemsTotal_posXpath = '(//div[@class="panel-content"]//div[contains(@class,"total")])[1]' # 详情页Items Total Xpath
+url_ObjectDetailPage_itemsTotal_posXpath = '(//div[@class="flex-1 flex items-center justify-center undefined"]/span)[1]' # 详情页Items Total Xpath
url_ObjectDetailPage_importFromFile_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']" # Import From File 按钮Xpath
url_ObjectDetailPage_importFromFile_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']" # Import From File 按钮Xpath
# url_ObjectDetailPage_pleaseUpload_posXpath = '//span[contains(text(),"Please Upload")]/../../input' # Please Upload input标签Xpath
@@ -1440,7 +1440,7 @@ flagGroup_ObjectDetailPage_subitem_add_posXpath = '//div[@class="mt-[10px] flex
# Object Geolocation elements area bottom===================Object Geolocation elements area bottom===================Object Geolocation elements area bottom===================Object Geolocation elements area bottom===================
# 对象详情页
port_ObjectDetailPage_nameInput_posXpath = '//input[@class="MuiInput-input css-fqt4w4"]' # Name输入框Xpath!!!!!
-port_ObjectDetailPage_item_addButton_poId = '//i[@class="iconfont icon-Create1 font-[700]"]' # item下"+"按钮!!!!!
+port_ObjectDetailPage_item_addButton_posXpath = '//i[@class="iconfont icon-Create1 font-[700]"]' # item下"+"按钮!!!!!
port_ObjectDetailPage_itemValueInput_poXpath = '//div[@class="MuiInput-root MuiInput-variantOutlined MuiInput-colorNeutral MuiInput-sizeMd MuiInput-formControl css-grqzrl"]/input' # item 下value输入框Xpath!!!!!
port_ObjectDetailPage_itemSaveButton_poXpath = '//i[@class="operate-icon iconfont icon-save"]' # item 下value保存按钮Xpath!!!!!
port_ObjectDetailPage_item_search_posId = acc_ObjectDetailPage_item_search_posXpath # item 下搜索框id
@@ -1514,20 +1514,20 @@ object_page_ln_select_statistics_brief_posXpath = '//li[@class="MuiOption-root c
object_page_ln_select_statistics_none_posXpath = '//li[@class="MuiOption-root MuiOption-highlighted Mui-selected css-171tq0k"]//p[@class="MuiTypography-root MuiTypography-title-sm css-kfmwsi"]' # none!!!!!
# 详情页通用元素
port_ObjectDetailPage_mainOkButton_poId = 'OK-_PortDetail_Home_App_anonymousComponent' # OK按钮ID
-port_ObjectDetailPage_mainOkButton_posXpath = '//*[@id="OK-_PortDetail_Home_App_anonymousComponent"]'
+port_ObjectDetailPage_mainOkButton_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"]'
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[@data-desc="subObject"]//div[@class="AddButton"]' # Subordinate Objects 下无数据新增时"+"按钮Xpath
-port_ObjectGroupDetailPage_subObjects_toggleDraw_addButton_posXpath = '//div[@class="ToggleDraw"]//div[contains(@class,"search-box")]//button' # Ports侧滑窗口的"+"按钮
+port_ObjectGroupDetailPage_subObjects_addButton_newAdd_posXpath = '//div[@class="port-object-included_sub_object_uuids"]' # 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_subCreatePortDrawer_nameInput_posXpath = '//*[@id="router-view-container"]//div[@class="drawer-box"]//div[@data-label="Name"]//input' # 侧滑子Create Ports页面Name input Xpath
-port_ObjectGroupDetailPage_subObjects_subCreatePortDrawer_itemsAddButton_posXpath = '//div[@class="drawer-box"]//div[@class="CommonItems"]//div[@class="object-item-add"]/div[@class="IconBtn"]' # 侧滑子Create Ports页面中Items下的"+"按钮 Xpath
-port_ObjectGroupDetailPage_subObjects_subCreatePortDrawer_itemsValueInput_posXpath = '//*[@id="router-view-container"]//div[@class="item-box"]//input' # 侧滑子Create Ports页面中Items下的item value输入框 Xpath
-port_ObjectGroupDetailPage_subObjects_subCreatePortDrawer_itemsValueSaveButton_posXpath = '//div[@class="drawer-box"]//div[@class="CommonItems"]//i[contains(@class,"icon-save")]' # 侧滑子Create Ports页面中Items下的保存按钮 Xpath
-port_ObjectGroupDetailPage_subObjects_subCreatePortDrawer_descriptionTextarea_posXpath = '//div[@class="drawer-box"]//label[text()="Description"]/..//textarea' # 侧滑子Create Ports页面中的Description textarea Xpath
-port_ObjectGroupDetailPage_subObjects_subCreatePortDrawer_okButton_posXpath = '//*[@id="OK-_PortDetail_VDraswer_EditDraw_PortDetail_Home_App_anonymousComponent"]' # 侧滑子Create Account页面中OK按钮
+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
+port_ObjectGroupDetailPage_subObjects_subCreatePortDrawer_itemsValueSaveButton_posXpath = '//i[@class="operate-icon iconfont icon-save"]' # 侧滑子Create Ports页面中Items下的保存按钮 Xpath
+port_ObjectGroupDetailPage_subObjects_subCreatePortDrawer_descriptionTextarea_posXpath = '(//textarea[@placeholder="Please enter the content"])[2]' # 侧滑子Create Ports页面中的Description textarea Xpath
+port_ObjectGroupDetailPage_subObjects_subCreatePortDrawer_okButton_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]' # 侧滑子Create Account页面中OK按钮
port_ObjectGroupDetailPage_subObjects_subCreatePortDrawer_okButton_yes_posXpath = acc_ObjectGroupDetailPage_subObjects_subCreateAccountDrawer_okButton_yes_posXpath # 侧滑子Create Account页面确认弹窗的“Yes”按钮
port_ObjectDetailPage_firstPortObject = acc_ObjectDetailPage_firstAccObject ## 侧滑Objects列表中第一个acc object Xpath
portGroup_ObjectDetailPage_excludeObjectsSwitch_posXpath = accGroup_ObjectDetailPage_excludeObjectsSwitch_posXpath # Exclude Objects Switch Xpath
@@ -1537,7 +1537,7 @@ port_ObjectDetailPage_firstObject = acc_ObjectDetailPage_firstObject # 侧滑ac
port_ObjectGroupDetailPage_subObjects_toggleDraw_closeButton_posXpath = acc_ObjectGroupDetailPage_subObjects_toggleDraw_closeButton_posXpath # Accounts侧滑窗口的Close按钮
portGroup_ObjectDetailPage_excludeObjectsSwitch_normalAdd_posXpath = accGroup_ObjectDetailPage_excludeObjectsSwitch_normalAdd_posXpath # Exclude Objects有数据时新增按钮Xpath
port_ObjectDetailPage_secondObject = acc_ObjectDetailPage_secondObject # 侧滑acc Object中第二个url Xpath
-port_object_group_subobject_close_posXpath = '//*[@id="router-view-container"]//div[@class="PortList list-box"]/div[3]/button'
+port_object_group_subobject_close_posXpath = '//div[@class="absolute bottom-0 h-[40px] w-[100%] overflow-hidden text-[16px] truncate bg-[--color-background-secondary] flex justify-center items-center pl-[12px] pr-[38px]"]/button'
## listPage->Tips dialog 列表页 tips对话框
port_listPage_object_delete_yesButton_posCss = 'body>.el-dialog__wrapper .delComponents-ok span' # 删除提示的Tips的yes按钮Xpath
port_listPage_object_urls_delete_noButton_posCss = 'body>.el-dialog__wrapper .delComponents-close span' # 删除提示的Tips的No按钮Xpath