diff options
| author | guowenzheng <[email protected]> | 2024-10-28 15:01:04 +0800 |
|---|---|---|
| committer | guowenzheng <[email protected]> | 2024-10-28 15:01:04 +0800 |
| commit | ed6b0d532476e0e1c3ae8e69a19f8d4d52e8a3e9 (patch) | |
| tree | 3f73a82a7a02807f6617044845ec1bacc9a06d4e | |
| parent | be76b6478ae7135b7f5ab03b538483ded4a35e32 (diff) | |
| parent | 24c34ac98e04d48807a06e65f3a521120bd5a64a (diff) | |
Merge branch 'develop' of https://git.mesalab.cn/zhaokun/tsg_ui_script into develop
| -rw-r--r-- | common/ui_common/language.py | 6 | ||||
| -rw-r--r-- | common/ui_common/login_logout/loginout.py | 12 | ||||
| -rw-r--r-- | common/ui_common/objects/accounts.py | 2 | ||||
| -rw-r--r-- | common/ui_common/objects/fqdns.py | 2 | ||||
| -rw-r--r-- | common/ui_common/objects/ip_address.py | 4 | ||||
| -rw-r--r-- | common/ui_common/objects/keywords.py | 2 | ||||
| -rw-r--r-- | common/ui_common/objects/moible_identities.py | 2 | ||||
| -rw-r--r-- | common/ui_common/objects/objects_public_operations.py | 22 | ||||
| -rw-r--r-- | common/ui_common/objects/subscriber_ids.py | 2 | ||||
| -rw-r--r-- | common/ui_common/objects/tunnels.py | 2 | ||||
| -rw-r--r-- | common/ui_common/objects/urls.py | 2 | ||||
| -rw-r--r-- | page_element/objects_element_position.py | 20 | ||||
| -rw-r--r-- | page_element/profiles_element_position.py | 6 |
13 files changed, 42 insertions, 42 deletions
diff --git a/common/ui_common/language.py b/common/ui_common/language.py index 8eec955f..c0e9f1f6 100644 --- a/common/ui_common/language.py +++ b/common/ui_common/language.py @@ -25,7 +25,7 @@ class Language: self.workdir = workdir self.my_random = RandomName() self.driver = demo_fixture - self.language_style = "iconfont cursorPointer icon-Lang_{replaceLanguage}Select" + self.language_style = "cursor-pointer iconfont icon-Lang_{replaceLanguage}Select" self.language_abbreviation = {"English": "en","简体中文": "zh","Русский": "py"} @screenshot_on_failure @@ -47,9 +47,9 @@ class Language: time.sleep(0.5) if target_lauguage == "Current Laguage" or target_lauguage == "": current_laguage = self.driver.find_element(By.XPATH, common_language_button_posXpath).get_attribute("class") - if 'iconfont cursorPointer icon-Lang_enSelect' == current_laguage: + if 'cursor-pointer iconfont icon-Lang_enSelect' == current_laguage: current_laguage = "en" - elif 'iconfont cursorPointer icon-Lang_zhSelect' == current_laguage: + elif 'cursor-pointer iconfont icon-Lang_zhSelect' == current_laguage: current_laguage = "zh" #elif 'iconfont cursorPointer icon-Lang_pySelect' == current_laguage: else: diff --git a/common/ui_common/login_logout/loginout.py b/common/ui_common/login_logout/loginout.py index 8997bb3d..b973623a 100644 --- a/common/ui_common/login_logout/loginout.py +++ b/common/ui_common/login_logout/loginout.py @@ -47,8 +47,8 @@ class LogInOut: self.driver.find_element(By.XPATH, "//*[@id='details-button']").click() self.driver.find_element(By.XPATH, "//*[@id='proceed-link']").click() #输入账户和密码 - self.driver.find_element(By.NAME, loginPage_userName_posName).send_keys(username) - self.driver.find_element(By.NAME, loginPage_passwd_posName).send_keys(passwd) + self.driver.find_element(By.XPATH, loginPage_userName_posXpath).send_keys(username) + self.driver.find_element(By.XPATH, loginPage_passwd_posXpath).send_keys(passwd) self.driver.find_element(By.ID, loginPage_signIn_posId).click() # 消除右上角弹框 self.dismiss_right_top_tips() @@ -59,8 +59,8 @@ class LogInOut: def _default_language(self): # 获取当前默认语言,并设置为英语 - current_language = self.driver.find_element(By.XPATH, mainPage_input_language_posXpath).get_attribute("value").strip() - if "english" != current_language.lower(): + current_language = self.driver.find_element(By.XPATH, mainPage_input_language_posXpath).get_attribute("class").strip() + if "enSelect" != current_language.lower(): self.driver.find_element(By.XPATH, mainPage_language_change_posXpath).click() self.driver.find_element(By.XPATH, mainPage_language_english_posXpath).click() @@ -117,8 +117,8 @@ class LogInOut: """ self.driver.get(self.tsglogin_url) #输入账户和密码 - self.driver.find_element(By.NAME, loginPage_userName_posName).send_keys(user_name) - self.driver.find_element(By.NAME, loginPage_passwd_posName).send_keys(passowrd) + self.driver.find_element(By.XPATH, loginPage_userName_posXpath).send_keys(user_name) + self.driver.find_element(By.XPATH, loginPage_passwd_posXpath).send_keys(passowrd) self.driver.find_element(By.ID, loginPage_signIn_posId).click() def logout(self): diff --git a/common/ui_common/objects/accounts.py b/common/ui_common/objects/accounts.py index e290d258..5bedf4fb 100644 --- a/common/ui_common/objects/accounts.py +++ b/common/ui_common/objects/accounts.py @@ -3319,7 +3319,7 @@ class Accounts: raise e finally: self._del(data) - self.objects_po.audit_log_view("Account Object") + self.objects_po.audit_log_view("Account") def _multiple_search(self, data): search_type_list = data["Search type"].split('&') diff --git a/common/ui_common/objects/fqdns.py b/common/ui_common/objects/fqdns.py index 6dbb6b07..afdac2f0 100644 --- a/common/ui_common/objects/fqdns.py +++ b/common/ui_common/objects/fqdns.py @@ -1545,7 +1545,7 @@ class FQDNs: self.driver.find_element(By.XPATH, main_Export_ObjectPage_Button_posXpath).click() self.driver.find_element(By.XPATH, list_PageObject_Export_files_yes_button_posXpath).click() self._delete(data) - self.objects_po.audit_log_view("FQDN Object") + self.objects_po.audit_log_view("FQDN") def policy_reference_count_check(self, data): self.driver.implicitly_wait(10) diff --git a/common/ui_common/objects/ip_address.py b/common/ui_common/objects/ip_address.py index a302303d..4c5ad3a9 100644 --- a/common/ui_common/objects/ip_address.py +++ b/common/ui_common/objects/ip_address.py @@ -1756,8 +1756,8 @@ class IPAddress: self.driver.find_element(By.XPATH, list_PageObject_Export_files_yes_button_posXpath).click() #删除 self._delete(data) - #校验system-audit log下是否记录全部审计日志 - self.objects_po.audit_log_view("IP Address Object") + # 校验system-audit log下是否记录全部审计日志 + self.objects_po.audit_log_view("IP") def policy_reference_count_check(self,data): self.driver.implicitly_wait(10) diff --git a/common/ui_common/objects/keywords.py b/common/ui_common/objects/keywords.py index 32bddc82..ab9a9610 100644 --- a/common/ui_common/objects/keywords.py +++ b/common/ui_common/objects/keywords.py @@ -1728,7 +1728,7 @@ class Keywords: self.driver.find_element(By.XPATH, list_HTTP_Signatures_Export_files_button_posXpath).click() self.driver.find_element(By.XPATH, listPage_object_Keywords_del_yes_Button_posXpath).click() self._delete(data) - self.objects_po.audit_log_view("Keyword Object") + self.objects_po.audit_log_view("Keyword") def policy_reference_count_check(self,data): self.driver.implicitly_wait(10) diff --git a/common/ui_common/objects/moible_identities.py b/common/ui_common/objects/moible_identities.py index 39f3d80b..92e57707 100644 --- a/common/ui_common/objects/moible_identities.py +++ b/common/ui_common/objects/moible_identities.py @@ -2049,7 +2049,7 @@ class mobile_identiities: self.driver.find_element(By.XPATH, list_HTTP_Signatures_Export_files_button_posXpath).click() self.driver.find_element(By.XPATH, listPage_object_Keywords_del_yes_Button_posXpath).click() self._delete(data) - self.objects_po.audit_log_view("Mobile Identity Object") + self.objects_po.audit_log_view("Mobile Identity") def policy_reference_count_check(self, data): self.driver.implicitly_wait(10) diff --git a/common/ui_common/objects/objects_public_operations.py b/common/ui_common/objects/objects_public_operations.py index ddaa2ed3..3900f5f2 100644 --- a/common/ui_common/objects/objects_public_operations.py +++ b/common/ui_common/objects/objects_public_operations.py @@ -801,8 +801,7 @@ class ObjectsPublicOperations: nextPage_button, goTo_input, currentPageNumber_posXpath, destination_page_elem_XpathTemple): if turn_mode == 1: # 直接跳转至对应页面,如destination_page为0则进行随机跳转 - if destination_page_number == "0" or int(destination_page_number) > int( - max_page_number): # 如destination_page为0或大于最大页码则进行随机跳转 + if destination_page_number == "0" or int(destination_page_number) > int(max_page_number): # 如destination_page为0或大于最大页码则进行随机跳转 # 随机页码list # random_list = [(lambda a, b: random.randrange(a, b + 1))(1, int(max_page_number)) for i in # range(int(int(max_page_number) / 2))] @@ -2202,24 +2201,25 @@ class ObjectsPublicOperations: ###校验["Create", "Edit", "Delete", "Import", "Query Verbose"] # 选择Targrt ID if object_type in ["Signature Object", "Application Object", "Customized Attribute Object"]: - self.driver.find_element(By.XPATH, listPage_auditlogSearch_targetid_text_posXpath).send_keys(self.table_dict1["ID"] + Keys.ENTER) + self.driver.find_element(By.XPATH, listPage_auditlogSearch_input_posXpath).send_keys(self.table_dict1["ID"] + Keys.ENTER) self.driver.find_element(By.XPATH, listPage_auditlogSearch_select_TagrgetID_posXpath).click() else: - self.driver.find_element(By.XPATH, listPage_auditlogSearch_targetid_text_posXpath).send_keys(self.table_dict["ID"] + Keys.ENTER) + self.driver.find_element(By.XPATH, listPage_auditlogSearch_input_posXpath).send_keys("123" + Keys.ENTER) self.driver.find_element(By.XPATH, listPage_auditlogSearch_select_TagrgetID_posXpath).click() # 选择Target Type self.driver.find_element(By.XPATH, listPage_auditlogSearch_input_posXpath).click() self.driver.find_element(By.XPATH, listPage_auditlogSearch_select_TargetType_posXpath).click() - scrollable_div = self.driver.find_element(By.XPATH,f"//ul[@class='base-Popper-root MuiSelect-listbox Mui-expanded css-1wd16dk']//span[text()='{object_type}']") + scrollable_div = self.driver.find_element(By.XPATH,f"//ul[@class='base-Popper-root MuiSelect-listbox Mui-expanded css-1wd16dk']//li[text()='{object_type}']") self.driver.execute_script("arguments[0].scrollIntoView();", scrollable_div) scrollable_div.click() # 选择当前用户 self.driver.find_element(By.XPATH, listPage_auditlogSearch_input_posXpath).click() + self.driver.find_element(By.XPATH, listPage_auditlogSearch_input_posXpath).send_keys(user_name) self.driver.find_element(By.XPATH, listPage_auditlogSearch_select_UserName_posXpath).click() - self.driver.find_element(By.XPATH, listPage_auditlogSearch_username_text_posXpath).send_keys(user_name) - time.sleep(2) - element_user_name = self.driver.find_element(By.XPATH,f"//div[@x-placement='bottom-start']//span[text()='{user_name}']") - self.driver.execute_script("arguments[0].click()", element_user_name) # 强制点击搜索出来的Name + + # time.sleep(2) + # element_user_name = self.driver.find_element(By.XPATH,f"//div[@x-placement='bottom-start']//span[text()='{user_name}']") + # self.driver.execute_script("arguments[0].click()", element_user_name) # 强制点击搜索出来的Name # 搜索 self.driver.find_element(By.XPATH, listPage_auditlogSearch_buttonSearch_posXpath).click() # 搜索 @@ -2248,7 +2248,7 @@ class ObjectsPublicOperations: object_type = "Object" self.driver.find_element(By.XPATH, listPage_auditlogSearch_input_posXpath).click() self.driver.find_element(By.XPATH, listPage_auditlogSearch_select_TargetType_posXpath).click() - scrollable_div = self.driver.find_element(By.XPATH,f"//ul[@class='base-Popper-root MuiSelect-listbox Mui-expanded css-1wd16dk']//span[text()='{object_type}']") + scrollable_div = self.driver.find_element(By.XPATH,f"//ul[@class='base-Popper-root MuiSelect-listbox Mui-expanded css-1wd16dk']//li[text()='{object_type}']") self.driver.execute_script("arguments[0].scrollIntoView();", scrollable_div) scrollable_div.click() # 选择当前用户 @@ -2282,7 +2282,7 @@ class ObjectsPublicOperations: detaile_text = self.driver.find_element(By.XPATH, f"(//div[@class='MuiDataGrid-virtualScrollerContent css-0']//div[@data-field='details'])[{i + 1}]").text self.driver.find_element(By.XPATH, f"(//div[@class='MuiDataGrid-virtualScrollerContent css-0']//div[@data-field='details'])[{i + 1}]").click() if detaile_text == "Compare": - compare_verision = self.driver.find_elements(By.XPATH, "//div[@class='rm-content']//div[@class='el-table__body-wrapper is-scrolling-none']//tr[@class='el-table__row']") + compare_verision = self.driver.find_elements(By.XPATH, "//div[@class='overflow-hidden']//tbody//tr") assert len(compare_verision) != 0, "Compare存在修改信息" elif detaile_text == "View": assert self.driver.find_element(By.XPATH, url_ObjectDetailPage_auditLogsDrawer_compareDrawer_operationText_posXpath).text != "" diff --git a/common/ui_common/objects/subscriber_ids.py b/common/ui_common/objects/subscriber_ids.py index 34c5a382..5eb88a92 100644 --- a/common/ui_common/objects/subscriber_ids.py +++ b/common/ui_common/objects/subscriber_ids.py @@ -1676,7 +1676,7 @@ class Subscriber_IDs(Base_Subscriber_IDs): self.driver.find_element(By.XPATH, Subscriber_IDs_Group_sub_Object_export_files_Button_posXpath).click() self.driver.find_element(By.XPATH, Subscriber_IDs_Group_sub_Object_export_files_yes_Button_posXpath).click() self._delete(data) - self.objects_po.audit_log_view("Subscriber ID Object") + self.objects_po.audit_log_view("Subscriber ID") def policy_reference_count_check(self, data): self.driver.implicitly_wait(10) diff --git a/common/ui_common/objects/tunnels.py b/common/ui_common/objects/tunnels.py index ad084fd4..05ac03d5 100644 --- a/common/ui_common/objects/tunnels.py +++ b/common/ui_common/objects/tunnels.py @@ -1641,7 +1641,7 @@ class Tunnels: raise e finally: self._delete(data) - self.objects_po.audit_log_view("Tunnel Object", import_verify=2, export_verify=2) + self.objects_po.audit_log_view("Tunnel", import_verify=2, export_verify=2) create = create_tunnel query = _search diff --git a/common/ui_common/objects/urls.py b/common/ui_common/objects/urls.py index 9661aaef..5d179591 100644 --- a/common/ui_common/objects/urls.py +++ b/common/ui_common/objects/urls.py @@ -3645,7 +3645,7 @@ class URLs: raise e finally: self._del(data) - self.objects_po.audit_log_view("URL Object") + self.objects_po.audit_log_view("URL") create = _create query = _query diff --git a/page_element/objects_element_position.py b/page_element/objects_element_position.py index 4d2b1a41..46981cd3 100644 --- a/page_element/objects_element_position.py +++ b/page_element/objects_element_position.py @@ -135,7 +135,7 @@ main_Group_sub_Object_input_frame_posXpath = "//input[@class='MuiInput-input css main_Group_sub_Object_input_frame_select_one_posXpath = "//ul[@class='MuiList-root MuiList-vertical MuiList-variantPlain MuiList-colorNeutral MuiList-sizeMd css-1cklc3']/li[1]//div[@class='flex h-[22px] leading-[22px] MuiBox-root css-14di81r']" # 搜索框第一个元素 # 列表页 main_listPage_object_reference_count_posXpath = "//div[@class='MuiDataGrid-virtualScrollerContent css-0']/div/div[2]//div[@data-field='reference_count']/button" # 提取reference的数量《断言》 -main_listPage_object_statistics_view_postXpath = "(//div[@id='ly-table1-listcontent']//span[text()='View'])[1]" +main_listPage_object_statistics_view_postXpath = "(//div[@class='MuiDataGrid-virtualScrollerContent css-0']//div[@data-field='statistics'])[2]" main_listPage_object_bottomTotal_postXpath = "//div[@class='flex-1 flex items-center justify-center undefined']/span[1]" # 列表页底部Total元素 # object导入文件Xpath路径 main_ObjectPage_Input_path_Import_files_posXpath = "//div[@class='flex flex-col justify-start flex-1 MuiBox-root css-0']//input[@type='file']" @@ -188,14 +188,14 @@ list_second_row_sixth_column_posXpath = '//table/tbody/tr[1]/td[6]/div//p' # � # 列表页翻页元素 listPage_object_pages_maxPageNumber_posXpath = '(//button[@class="MuiButtonBase-root MuiPaginationItem-root MuiPaginationItem-sizeMedium MuiPaginationItem-text MuiPaginationItem-rounded MuiPaginationItem-colorPrimary MuiPaginationItem-textPrimary MuiPaginationItem-page css-x4rueb"])[last()]' # 列表页最大页码 -listPage_object_pages_currentPageNumber_posXpath = '//div[@class="page-box-containcheck"]//li[@class="number active"]' # 列表页当前页码元素Xpath +listPage_object_pages_currentPageNumber_posXpath = "//button[@aria-current='true']" # 列表页当前页码元素Xpath listPage_object_pages_currentPageAreaMinNumber_posXpath = '//li[@class="el-icon more btn-quickprev el-icon-more"]/following-sibling::li[1]' # 列表页当前页码所属区域最小页码元素Xpath 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_previousPage_button_poxXpath = "//button[@aria-label='Go to previous page']" # 前翻页按钮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_goTo_input_poxXpath = "//div[@class='MuiInputBase-root MuiOutlinedInput-root MuiInputBase-colorPrimary MuiInputBase-sizeSmall ml-[5px] h-[24px] w-[48px] css-1q6u993']/input" # 页码Go to输入框Xpath listPage_object_pages_quickPreviousPage_button_poxXpath = '//li[contains(@class,"el-icon more btn-quickprev")]' # 快速前翻页按钮Xpath listPage_object_pages_quickNextPage_button_poxXpath = '//li[contains(@class,"el-icon more btn-quicknext")]' # 快速后翻页按钮Xpath listPage_fist_object_id_poxXpath = '//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' @@ -473,24 +473,24 @@ listPage_object_urls_tableCheckbox_posXpaths = '//table[@class="el-table__body"] # listPage_object_urls_tableCheckbox_objectGroup_posXpaths = '//i[contains(@class,"icon-URLgroup")]/ancestor::tr//span[@class="el-checkbox__inner"]' # 列表页对象组的CheckBox(多个) # listPage_object_urls_tableCheckbox_objectGroup_posXpaths = '//i[contains(@class,"group")]/ancestor::tr//span[@class="el-checkbox__inner"]' # 列表页对象组的CheckBox(多个) listPage_object_urls_tableCheckbox_objectGroup_posXpaths = \ - '(//*[contains(@class,"table-status-item-id")]/preceding-sibling::div[2][not(*)]/ancestor::tr//*[contains(@class,"name-fontFamily")]/preceding-sibling::i[(contains(@class,"group"))]/ancestor::tr//span[@class="el-checkbox__inner"])' # 列表页Object Group 的CheckBoxs(不包含single Object和锁定对象) + "(//i[@class='iconfont color-ip icon-IPgroup css-lp3td5']//parent::*//parent::*//preceding-sibling::div[@data-field='__check__']//input)" # 列表页Object Group 的CheckBoxs(不包含single Object和锁定对象) listPage_object_urls_tableCheckbox_objectGroup_posXpaths_template = \ - '((//*[contains(@class,"table-status-item-id")]/preceding-sibling::div[2][not(*)]/ancestor::tr//*[contains(@class,"name-fontFamily")]/preceding-sibling::i[(contains(@class,"group"))]/ancestor::tr//span[@class="el-checkbox__inner"]))[{}]' # 列表页Object Group 的CheckBoxs(不包含single Object和锁定对象) + "((//i[@class='iconfont color-ip icon-IPgroup css-lp3td5']//parent::*//parent::*//preceding-sibling::div[@data-field='__check__']//input))[{}]" # 列表页Object Group 的CheckBoxs(不包含single Object和锁定对象) listPage_object_urls_tableCheckbox_notLocalVsys_objectOrGroup_posXpaths = '//div[@class="table-status-box"]/div[2]//*[contains(@class,"icon-lock")]/ancestor::tr//span[@class="el-checkbox__inner"]' # 列表页中不是本Vsys的对象或对象组的CheckBox listPage_object_urls_tableCheckbox_notLocalVsys_objectOrGroup_posXpaths_template = '(//div[@class="table-status-box"]/div[2]//*[contains(@class,"icon-lock")]/ancestor::tr//span[@class="el-checkbox__inner"])[{}]' # 列表页中不是本Vsys的对象或对象组的CheckBox listPage_object_urls_tableDetails_singleObject_posXpaths = '//span[contains(@class,"name-fontFamily")]/preceding-sibling::i[not(contains(@class,"icon-URLgroup"))]/ancestor::tr//div[@class="itemDetails cursor"]/..' # 列表页中所有对象(不包含对象组)的DetailsXpath # listPage_object_urls_tableDetails_firstSingleObject_posXpath = '(//span[contains(@class,"name-fontFamily")]/preceding-sibling::i[not(contains(@class,"group"))]/ancestor::tr//span[@class="el-checkbox__inner"])[1]' # 列表页中第一个Object 的CheckBox listPage_object_urls_tableCheckbox_singleObject_posXpaths = \ - '(//*[contains(@class,"table-status-item-id")]/preceding-sibling::div[2][not(*)]/ancestor::tr//*[contains(@class,"name-fontFamily")]/preceding-sibling::i[not(contains(@class,"group"))]/ancestor::tr//span[@class="el-checkbox__inner"])' # 列表页中Object 的CheckBoxs(不包含Group和锁定对象) + "(//i[@class='iconfont color-ip icon-ip css-lp3td5']//parent::*//parent::*//preceding-sibling::div[@data-field='__check__']//input)" # 列表页中Object 的CheckBoxs(不包含Group和锁定对象) listPage_object_urls_tableCheckbox_singleObject_posXpaths_template = \ - '((//*[contains(@class,"table-status-item-id")]/preceding-sibling::div[2][not(*)]/ancestor::tr//*[contains(@class,"name-fontFamily")]/preceding-sibling::i[not(contains(@class,"group"))]/ancestor::tr//span[@class="el-checkbox__inner"]))[{}]' # 列表页中Object 的CheckBoxs(不包含Group和锁定对象) + "((//i[@class='iconfont color-ip icon-ip css-lp3td5']//parent::*//parent::*//preceding-sibling::div[@data-field='__check__']//input))[{}]" # 列表页中Object 的CheckBoxs(不包含Group和锁定对象) listPage_object_urls_tableDetails_firstSingleObject_posXpath = \ - '(//*[contains(@class,"table-status-item-id")]/preceding-sibling::div[2][not(*)]/ancestor::tr//*[contains(@class,"name-fontFamily")]/preceding-sibling::i[not(contains(@class,"group"))]/ancestor::tr//span[@class="el-checkbox__inner"])[1]' # 列表页中第一个Object 的CheckBox(不包含Group和锁定对象) + "(//i[@class='iconfont color-ip icon-ip css-lp3td5']//parent::*//parent::*//preceding-sibling::div[@data-field='__check__']//input)[1]" # 列表页中第一个Object 的CheckBox(不包含Group和锁定对象) # listPage_object_urls_tableDetails_firstObjectGroup_posXpath = '(//i[contains(@class,"group")]/ancestor::tr//span[@class="el-checkbox__inner"][1])' # 列表页中第一个Object Group 的CheckBox listPage_object_urls_tableDetails_firstObjectGroup_posXpath = \ - '(//*[contains(@class,"table-status-item-id")]/preceding-sibling::div[2][not(*)]/ancestor::tr//*[contains(@class,"name-fontFamily")]/preceding-sibling::i[(contains(@class,"group"))]/ancestor::tr//span[@class="el-checkbox__inner"])[1]' # 列表页中第一个Object Group 的CheckBox(不包含single Object和锁定对象) + "(//i[@class='iconfont color-ip icon-IPgroup css-lp3td5']//parent::*//parent::*//preceding-sibling::div[@data-field='__check__']//input)[1]" # 列表页中第一个Object Group 的CheckBox(不包含single Object和锁定对象) listPage_object_urls_tableCheckbox_firstNotLocalVsys_objectOrGroup_posXpath = '(//i[@class="iconfont icon-lock text-[18px] text-[--color-text-decoration]"]/ancestor::div[@class="css-16m40q9 MuiDataGrid-cell MuiDataGrid-cell--textLeft"]/preceding-sibling::div[@data-field="__check__"]//input)[1]' # 列表页中第一个不是本Vsys的对象或对象组的CheckBox listPage_object_urls_tableCheckbox_localVsys_objectOrGroup_posXpaths = '//*[contains(@class,"table-status-item-id")]/preceding-sibling::div[2][not(*)]/ancestor::tr//span[@class="el-checkbox__inner"]' # 列表页中本Vsys的Object 或Group(不包含其他Vsys) diff --git a/page_element/profiles_element_position.py b/page_element/profiles_element_position.py index 4a26c2c1..c73581a3 100644 --- a/page_element/profiles_element_position.py +++ b/page_element/profiles_element_position.py @@ -13,11 +13,11 @@ leave_this_page_ok_elem_Xpath = '//div[@class="el-message-box tsg-message"]//but # main页面 ##上导航栏及语言切换按钮 mainPage_navigationBar_logo_posCss = ".tsg-img-logo" -mainPage_input_language_posXpath = "//input[@id='anonymousComponent_Home_App_anonymousComponent_language']" -mainPage_language_change_posXpath = "//span[@class='el-input__prefix']//i" +mainPage_input_language_posXpath = "//div[@class='flex mr-[20px]']/div//i" +mainPage_language_change_posXpath = "//div[@class='flex mr-[20px]']/div/button" mainPage_language_chinese_posXpath = "//div/ul/li/span[contains(text(),'简体中文')]" mainPage_language_russian_posXpath = "//div/ul/li/span[contains(text(),'Pусский')]" # Pусский -mainPage_language_english_posXpath = "//div/ul/li/span[contains(text(),'English')]" +mainPage_language_english_posXpath = "//ul[@class='MuiList-root MuiList-padding MuiMenu-list css-r8u8y9']//span[text()='English']" mainPage_button_menu_posXCss = ".menu-btn span" # menu按钮定位 mainPage_button_menu_posXpath = '//button[@class="MuiButtonBase-root MuiIconButton-root MuiIconButton-colorInherit MuiIconButton-edgeStart MuiIconButton-sizeLarge ml-[20px!important] font-bold cursor-pointer css-134pika"]' mainPage_currentPage_vsysName_posXpath = '//*[@id="root"]/div/div/div/div/div[1]/div' # 当前页面中vsys name |
