diff options
| -rw-r--r-- | cases/object/test_applications.py | 1 | ||||
| -rw-r--r-- | common/ui_common/objects/applications.py | 136 | ||||
| -rw-r--r-- | page_element/ln_objects_element_position.py | 22 |
3 files changed, 85 insertions, 74 deletions
diff --git a/cases/object/test_applications.py b/cases/object/test_applications.py index 818fb7b3..6b6ab2cb 100644 --- a/cases/object/test_applications.py +++ b/cases/object/test_applications.py @@ -24,6 +24,7 @@ class Testapp: app = App(demo_fixture) app.select_set_case(data) + # 24.10无法导入 @pytest.mark.parametrize( "data", [ diff --git a/common/ui_common/objects/applications.py b/common/ui_common/objects/applications.py index 6fcd92c9..34ccaf38 100644 --- a/common/ui_common/objects/applications.py +++ b/common/ui_common/objects/applications.py @@ -127,7 +127,7 @@ class App: self._goto_subObjectPage() time.sleep(10) self.import_app(data) - self._delete_02({"Search_type": "ID", "ID": self.app_id}) + self._delete_02({"Search_type": "Name", "ID": self.app_id}) time.sleep(3) def turn_page_case(self, data: {}): @@ -290,6 +290,10 @@ class App: # self.driver.find_element(By.XPATH, '//*[@id="ApplicationSignaturesAdd_ok"]').click() # self.driver.find_element(By.XPATH, '//*[@id="ApplicationSignaturesAdd_ok_component"]').click() # self.driver.find_element(By.XPATH, '//button[@class="el-button el-button--default el-button--small el-button--primary operation-confirm"]').click() + self.driver.find_element(By.XPATH,'//div[@class="application-object-signature_sequence"]//button/i').click() + time.sleep(1) + self.driver.find_element(By.XPATH, '//ul[@class="MuiList-root MuiList-vertical MuiList-variantPlain MuiList-colorNeutral MuiList-sizeMd css-1cklc3"]/li[1]').click() + self.driver.find_element(By.XPATH, '//i[@class="iconfont icon-Clear_aNormal close-icon"]').click() time.sleep(2) # save App self.driver.find_element(By.XPATH, application_ok_button_posXpath).click() # 点击OK @@ -479,10 +483,10 @@ class App: elif search_type == "Name": self.driver.find_element(By.XPATH, listpage_search_box_posXpath).click() # 选中查询框 time.sleep(1) - self.driver.find_element(By.XPATH, listPage_objectSearch_select_Name_posXpath).click() # 选中Name - time.sleep(1) self.driver.find_element(By.XPATH, listpage_search_input_posXpath).send_keys(self.random_name) # 输入Name time.sleep(1) + self.driver.find_element(By.XPATH, listPage_objectSearch_select_Name_posXpath).click() # 选中Name + time.sleep(1) # 不支持全局查询 self.driver.find_element(By.XPATH, listpage_search_button_posXpath).click() @@ -500,10 +504,10 @@ class App: self.random_name = self.my_random.random_name() self.driver.find_element(By.XPATH, application_inputname_xpath).send_keys(self.random_name) # 重新输入name #重新选择必选项……………… - i1 = random.choice(range(0, 5)) + i1 = random.choice(range(1, 5)) self.driver.find_element(By.XPATH, application_select_category_dropwmn_posXpath).click() # category self.driver.find_element(By.XPATH, app_category_xpath.format(i1)).click() # - i2 = random.choice(range(0, 4)) + i2 = random.choice(range(1, 4)) print(i2) self.driver.find_element(By.XPATH, application_select_subcategory_dropwmn_posXpath).click() # subcategory time.sleep(1) @@ -560,13 +564,14 @@ class App: # 公共方法 Detail特殊,需要使用时特殊提取 # ID self.key11 = self.driver.find_element(By.XPATH,'//div[text()="App ID"]').text - self.value12 = self.driver.find_element(By.XPATH, '(//div[@data-field="app_id"]/span[@class="flex"])[1]').get_attribute("innerHtml")[-5:] + print(self.driver.find_element(By.XPATH, '(//div[@data-field="app_id"]/span[@class="flex"])[1]').text) + self.value12 = self.driver.find_element(By.XPATH, '(//div[@data-field="app_id"]/span[@class="flex"])[1]').text # Vsy_ID # self.key12 = self.driver.find_element(By.XPATH, '//table/thead/tr/th[3]/div/div').text # self.value22 = self.driver.find_element(By.XPATH,'//div[3]/table/tbody/tr[1]/td[3]/div').text # Name self.key13 = self.driver.find_element(By.XPATH,'//div[text()="Name"]').text - self.value23 = self.driver.find_element(By.XPATH, '(//div[@data-field="name" and @aria-colindex="3"])[3]').text + self.value23 = self.driver.find_element(By.XPATH, '(//div[@data-field="name" and @aria-colindex="3"])[2]').text # 字典 self.table_dict = {self.key11: self.value12, self.key13: self.value23} print(self.table_dict) @@ -622,7 +627,7 @@ class App: #列设置 def select_set(self,data:{}): - + self._goto_subObjectPage() #随机选中一个自定义列 if data["model"] == 1: coloum = [1, 2, 3, 4, 5, 6, 7,8] @@ -655,7 +660,7 @@ class App: # 取消现有所有已经勾选上的列 self.driver.find_element(By.XPATH,mainPage_ObjectSearch_Column_settings_select_allCheckBox_posXpath).click() # 点击ok保存 - self.driver.find_element(By.XPATH,'//div[contains(text(), "Usage")]').click() + self.driver.find_element(By.XPATH,'//div[contains(text(), "Name")]').click() time.sleep(2) element = self.driver.find_elements(By.XPATH, Object_Application_column_default.format(6)) text = 0 @@ -672,9 +677,10 @@ class App: # 选中所有的列 #点击all勾选所有自定义列 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() # 点击ok保存 - self.driver.find_element(By.XPATH,Object_Application_select_Ok).click() + self.driver.find_element(By.XPATH,'//div[contains(text(), "Name")]').click() time.sleep(2) text = [] # print(11212) @@ -739,31 +745,34 @@ class App: def turn_page(self, data: {}): if data["moudle"] == 1: j = 3 - for i in range(2, 13): + for i in range(2, 3): if i < 6: self.driver.find_element(By.XPATH,Object_Application_page_number.format(j)).click() - self.text = self.driver.find_element(By.XPATH, Object_Application_page_number.format(j)).get_attribute("class") + self.text = self.driver.find_element(By.XPATH, Object_Application_page_number.format(j)).get_attribute("aria-label") + print(self.text) else: self.driver.find_element(By.XPATH, Object_Application_page_number.format(6)).click() - self.text = self.driver.find_element(By.XPATH,Object_Application_page_number.format(5)).get_attribute("class") + self.text = self.driver.find_element(By.XPATH,Object_Application_page_number.format(5)).get_attribute("aria-label") j += 1 - assert "number active" == self.text + assert "page 2" == self.text elif data["moudle"] == 2: - for i in range(2, 12): + for i in range(2, 3): time.sleep(1) self.driver.find_element(By.XPATH,Object_Application_next_page).click() if i <= 5: - self.text = self.driver.find_element(By.XPATH,Object_Application_page_number.format(i)).get_attribute("class") + self.text = self.driver.find_element(By.XPATH,Object_Application_page_number.format(i)).get_attribute("aria-label") else: - self.text = self.driver.find_element(By.XPATH,Object_Application_page_number.format(5)).get_attribute("class") - assert "number active" == self.text + self.text = self.driver.find_element(By.XPATH,Object_Application_page_number.format(5)).get_attribute("aria-label") + print(self.text) + assert "Go to page 1" == self.text elif data["moudle"] == 3: - self.driver.find_element(By.XPATH,Object_Application_page_number.format(7)).click() - self.text = self.driver.find_element(By.XPATH,Object_Application_page_number.format(5)).get_attribute("class") - assert "number active" == self.text + self.driver.find_element(By.XPATH,Object_Application_page_number.format(6)).click() + self.text = self.driver.find_element(By.XPATH,Object_Application_page_number.format(5)).get_attribute("aria-label") + print(self.text) + assert "page 5" == self.text elif data["moudle"] == 4: element = self.driver.find_element(By.XPATH,Object_Application_page_input_xpath) - for i in range(2, 10): + for i in range(2, 4): element.clear() element.clear() time.sleep(2) @@ -771,10 +780,11 @@ class App: element.send_keys(Keys.ENTER) time.sleep(2) if i <= 5: - self.text = self.driver.find_element(By.XPATH,Object_Application_page_number.format(i)).get_attribute("aria-label") + self.text = self.driver.find_element(By.XPATH,Object_Application_page_number.format(i+1)).get_attribute("aria-label") else: self.text = self.driver.find_element(By.XPATH,Object_Application_page_number.format(5)).get_attribute("aria-label") - assert f"page {i-1}" == self.text + print(self.text) + assert f"page {i}" == self.text def open_Audit_Logs(self,data): self.import_app(data) @@ -844,23 +854,23 @@ class App: def checkout_edit_and_create(self): self._create({"Search_type":"Name","ids":""}) time.sleep(8) - id = self.driver.find_element(By.XPATH, '//table/tbody/tr[1]/td[2]/div/div/div[3]/div').text - self.driver.isElementExist( - Element='((//div[@class!="itemDetails cursor"]//table[@class="el-table__body"])[1]//tr)[1]') # 查看第一行是否存在数据 - if self.driver.Exist: - # 展示所有列 - self.driver.find_element(By.XPATH, mainPage_ObjectSearch_Column_settings_posXpath).click() # 点击列设置 - all_checked_xpath = '//*[@class="all-btn"]//*[@class="el-checkbox__input is-checked"]' - if self.driver.element_isExist(By.XPATH, all_checked_xpath): # 如果全选被选中 - self.driver.find_element(By.XPATH, - mainPage_ObjectSearch_Column_settings_click_Cancel_Button_posXpath).click() # 点击Cancel按钮 - else: - 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按钮 + name = self.driver.find_element(By.XPATH, '//*[@id="root"]/div/div/main/div[1]/div[3]/div[2]/div[1]/div[2]/div/div[1]/div[4]').text + # self.driver.isElementExist( + # Element='((//div[@class!="itemDetails cursor"]//table[@class="el-table__body"])[1]//tr)[1]') # 查看第一行是否存在数据 + # if self.driver.Exist: + # # 展示所有列 + # self.driver.find_element(By.XPATH, mainPage_ObjectSearch_Column_settings_posXpath).click() # 点击列设置 + # all_checked_xpath = '//*[@class="all-btn"]//*[@class="el-checkbox__input is-checked"]' + # if self.driver.element_isExist(By.XPATH, all_checked_xpath): # 如果全选被选中 + # self.driver.find_element(By.XPATH, + # mainPage_ObjectSearch_Column_settings_click_Cancel_Button_posXpath).click() # 点击Cancel按钮 + # else: + # 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按钮 text = [] - for i in range(7, 11): + for i in range(6, 10): # if i == 9: # text.append(self.driver.find_element(By.XPATH,'//*[@id="app-table-_AppTable_Application_Home_App_anonymousComponent"]/div[3]/table/tbody/tr[1]/td[9]/div/span').text) # continue @@ -894,12 +904,12 @@ class App: self.driver.find_element(By.XPATH, Object_Application_create_cancel).click() # 点击cancel time.sleep(3) #通过id搜索 - self._delete_02({"Search_type": "ID", "ID": id}) + self._delete_02({"Search_type": "Name", "Name": name}) time.sleep(3) def input_error_name(self): self.driver.find_element(By.XPATH, listpage_create_button_posXpath).click() # Create按鈕 - self.driver.find_element(By.XPATH, application_inputname_xpath).send_keys() + self.driver.find_element(By.XPATH, application_inputname_xpath).send_keys("ab") self.driver.find_element(By.XPATH, Object_Application_create_blank).click() time.sleep(1) text = [] @@ -908,7 +918,7 @@ class App: self.driver.find_element(By.XPATH, Object_Application_create_blank).click() time.sleep(1) text.append(self.driver.find_element(By.XPATH, Object_Application_input_error_name).text) - assert ['The length of the name is at most 128 character and cannot be empty', 'The length of the name is at most 128 character and cannot be empty'] == text + assert ['The length of the name is at most 128 characters and cannot be less than 4 characters', 'The length of the name is at most 128 characters and cannot be less than 4 characters'] == text def upload_error_file(self): text = [] @@ -930,9 +940,9 @@ class App: self.driver.find_element(By.XPATH, application_ok_button_posXpath).click() # 点击OK text = [] time.sleep(1) - for i in range(1,5): + for i in range(1,7): text.append(self.driver.find_element(By.XPATH,Object_Application_properties_error_xpath.format(i)).text) - assert ['Please select', 'Please select', 'Please select', 'Please select'] == text + assert ['Category cannot be empty', 'Subcategory cannot be empty', 'Content cannot be empty', 'Risk cannot be empty', 'cannot be empty', 'Signature cannot be empty'] == text def upload_repeat_file(self): #第一次导入 @@ -949,11 +959,11 @@ class App: self.driver.find_element(By.XPATH, Object_Application_create_blank).click() text = [] text.append(self.driver.find_element(By.XPATH,Object_Application_create_drop_input_error).text) - self.driver.find_element(By.XPATH,'//*[@id="Rate-limitingrate_limit"]/span').click() - self.driver.find_element(By.XPATH,'//*[@id="proxy-_AppOperate_Home_App_anonymousComponent"]//input[@placeholder="The value range is [1,8000000]"]').send_keys("88888888888888888888888") + self.driver.find_element(By.XPATH,'//button[contains(text(),"Rate")]').click() + self.driver.find_element(By.XPATH,'//input[@placeholder="The value range is [1,8000000]"]').send_keys("888888888888888") self.driver.find_element(By.XPATH, Object_Application_create_blank).click() text.append(self.driver.find_element(By.XPATH,Object_Application_create_limit_error).text) - assert ['The value range is [0,64]', 'The value range is [1,8000000]'] == text + assert ['Range: [0,64]', 'Range: [1,8000000]'] == text def timeout_over_limit(self): self.driver.find_element(By.XPATH, listpage_create_button_posXpath).click() @@ -961,13 +971,13 @@ class App: self.driver.find_element(By.XPATH,'//div[@class="application-object-tcp_timeout"]//input').send_keys("999999999999999") self.driver.find_element(By.XPATH, Object_Application_create_blank).click() text = [] - text.append(self.driver.find_element(By.XPATH,'//div[@class="application-object-tcp_timeout"]//div[@class="MuiFormHelperText-root css-koslx8"]').text) + text.append(self.driver.find_element(By.XPATH,'//div[@class="application-object-tcp_timeout"]/div[2]').text) assert ['Maximum value exceeded'] == text self.driver.find_element(By.XPATH,'//div[@class="application-object-udp_timeout"]//input').clear() self.driver.find_element(By.XPATH, '//div[@class="application-object-udp_timeout"]//input').send_keys("999999999999999") self.driver.find_element(By.XPATH, Object_Application_create_blank).click() text2 = [] - text2.append(self.driver.find_element(By.XPATH,'//div[@class="application-object-udp_timeout"]//div[@class="MuiFormHelperText-root css-koslx8"]').text) + text2.append(self.driver.find_element(By.XPATH,'//div[@class="application-object-udp_timeout"]/div[2]').text) assert ['Maximum value exceeded'] == text2 def generate_random_ip(self): @@ -979,7 +989,6 @@ class App: def New_Signature(self): - self._goto_subObjectPage() time.sleep(8) self.random_name = self.my_random.random_name() # 创建App,点击Create @@ -989,14 +998,15 @@ class App: self.random_name) # input long name self.driver.find_element(By.XPATH, application_description_input_xpath).send_keys( "Your description") # input description - self.driver.find_element(By.XPATH, object_page_ln_select_statistics_input_posXpath).click() # 选择statistics + self.driver.find_element(By.XPATH, '//button[@class="MuiSelect-button css-1qmzz5g"]').click() # 选择statistics time.sleep(1) self.driver.find_element(By.XPATH, object_page_ln_select_statistics_brief_posXpath).click() + time.sleep(1) # select the must - i1 = random.choice(range(0, 5)) + i1 = random.choice(range(1, 6)) self.driver.find_element(By.XPATH, application_select_category_dropwmn_posXpath).click() # category self.driver.find_element(By.XPATH, app_category_xpath.format(i1)).click() # - i2 = random.choice(range(0, 4)) + i2 = random.choice(range(1, 5)) print(i2) self.driver.find_element(By.XPATH, application_select_subcategory_dropwmn_posXpath).click() # subcategory self.driver.find_element(By.XPATH, app_sub_category_xpath.format(i2)).click() # @@ -1009,9 +1019,9 @@ class App: #点击Signature中的编辑按钮 #self.driver.find_element(By.XPATH,Object_Application_create_first_signature_edit).click() #添加Signature,➕ - self.driver.find_element(By.XPATH,'//*[@id="application_signature"]/i').click() + self.driver.find_element(By.XPATH,'//div[@class="application-object-signature_sequence"]//button/i').click() #右上角➕ - self.driver.find_element(By.XPATH,'//*[@id="check_list_proaddadd"]/i').click() + self.driver.find_element(By.XPATH,'//i[@class="iconfont icon-Create1"]').click() time.sleep(2) #Edit Signature页面的操作 #Name输入框 @@ -1021,18 +1031,19 @@ class App: time.sleep(1) element1.send_keys("test-serveip") #点击添加Condition按钮 - self.driver.find_element(By.XPATH,Object_Application_create_edit_signature_add_condition_button).click() + self.driver.find_element(By.XPATH,Signatures_ObjectPage_inputParentSignature_posXpath).click() #点击Add To按钮 self.driver.find_element(By.XPATH,addto_condition_button_xpath).click() #选择Conditon New条件 self.driver.find_element(By.XPATH,new_condition_button_xpath).click() #点击Attribute Name按钮 - self.driver.find_element(By.XPATH,attribute_name_input_id).click() + self.driver.find_element(By.XPATH,'(//div[@class="flex flex-col items-center px-[4px] select-picker"]/button)[3]').click() #选择ip - self.driver.find_element(By.XPATH,Edit_signature_Condition_Attribute_ip.format(4)).click() + self.driver.find_element(By.XPATH,Edit_signature_Condition_Attribute_ip).click() #选择ip.src项 self.driver.find_element(By.XPATH,Edit_signature_Condition_Attribute_ip_src).click() + self.driver.find_element(By.XPATH, '(//i[@class="iconfont icon-Clear_aNormal close-icon"])[4]').click() #点击添加ip self.driver.find_element(By.XPATH,Edit_signature_Condition_Add_IP_button).click() time.sleep(1) @@ -3051,11 +3062,10 @@ if __name__ == '__main__': # 实例化类 r = App(a) data={ - "ids":"App的增删改查", - "CreatType":"App", - "Search_type":"Name" + "ids": "one_by_one", + "moudle": 1 } - r.app_case(data) + r.New_Signatures_case() # r.check_built_default_drop({"model":4}) # data={ # "ids": "5.Application在本vsys中导入,在另一个vsys中无法查看到导入文件", diff --git a/page_element/ln_objects_element_position.py b/page_element/ln_objects_element_position.py index 69fd1b88..266f1701 100644 --- a/page_element/ln_objects_element_position.py +++ b/page_element/ln_objects_element_position.py @@ -411,9 +411,9 @@ Object_Application_upload_button_xpath = '//input[@class="el-upload__input"]' Object_Application_file_ok = '(//button[@class="el-button right-menu-button-close el-button--info el-button--small"])[4]' Object_Application_success_detail_css = '.el-message__content' Object_Application_Name_column = '//table/tbody/tr[{}]/td[4]/div/div[1]' -Object_Application_page_number = '//ul[@class="MuiPagination-ul css-nhb8h9"]/li[{}]' +Object_Application_page_number = '//ul[@class="MuiPagination-ul css-nhb8h9"]/li[{}]/button' Object_Application_next_page = '//button[@class="MuiButtonBase-root MuiPaginationItem-root MuiPaginationItem-sizeMedium MuiPaginationItem-text MuiPaginationItem-rounded MuiPaginationItem-colorPrimary MuiPaginationItem-textPrimary MuiPaginationItem-previousNext css-x4rueb"]' -Object_Application_page_input_xpath = '//div[@id="pagination-_pagination_AppTable_Application_Home_App_anonymousComponent"]/div[1]/span/div/input' +Object_Application_page_input_xpath = '//input[@type="number"]' Object_Application_Audit_Logs_xpath ='//i[@class="iconfont icon-a-Adminlogs icon-style"]' Object_Application_Audit_Logs_page_xpath = '//div[@class="LocalationDraswer lstsub right-show-edit right-show-edit-other"]/div/div/div[@class="rm-top"]/span[1]' Object_Application_create_cancel = '//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"]' @@ -423,27 +423,27 @@ Object_Application_create_blank = '//*[text()="Properties"]' Object_Application_create_Subcategory_first = '(//ul[@class="base-Popper-root MuiSelect-listbox css-icfck1"]/li[@aria-selected="true"])[2]' Object_Application_create_Content_first = '(//ul[@class="base-Popper-root MuiSelect-listbox css-icfck1"]/li[@aria-selected="true"])[3]' Object_Application_create_Risk_first = '(//ul[@class="base-Popper-root MuiSelect-listbox css-icfck1"]/li[@aria-selected="true"])[4]' -Object_Application_input_error_name = '//div[@class="MuiFormHelperText-root css-koslx8"]' +Object_Application_input_error_name = '//div[@class="application-object-app_name"]/div[2]' Object_Application_upload_error_detail_xpath = '//div[@class="importTips"]/p' -Object_Application_properties_error_xpath = '(//div[@class="el-form-item__error"])[{}]' +Object_Application_properties_error_xpath = '(//div[@class="MuiFormHelperText-root css-1y20gt9"])[{}]' Object_Application_upload_repeat_error_xpath = '(//div[@class="el-table__body-wrapper is-scrolling-none"]/table[@class="el-table__body"]/tbody/tr[@class="el-table__row"]/td[3]/div[@class="cell"])[3]' Object_Application_upload_cancel = '(//button[@class="el-button right-menu-button-close el-button--info el-button--small"])[4]' Object_Application_clear_search_input = '//*[@id="searchClear"]' Object_Application_create_drop_input_xpath = '//input[@class="MuiInputBase-input MuiOutlinedInput-input MuiInputBase-inputSizeSmall css-yush35"]' -Object_Application_create_drop_input_error = '//*[@id="proxy-_AppOperate_Home_App_anonymousComponent"]//div[@class="el-form-item__error"]' -Object_Application_create_limit_error = '//*[@id="proxy-_AppOperate_Home_App_anonymousComponent"]//div[@class="el-form-item__error"]' +Object_Application_create_drop_input_error = '//div[@class="application-object-after_n_packets"]/div[2]' +Object_Application_create_limit_error = '//div[@class="application-object-bps"]/div[2]' Object_Application_create_first_signature_edit = '(//i[@id="application_proadd10"])[1]' #编辑Application页面Signature的按钮 -Object_Application_create_signature_name_input = '//input[@id="ApplicationSignaturesAdd_signatureName1"]' +Object_Application_create_signature_name_input = '(//input[@class="MuiInput-input css-fqt4w4"])[3]' Object_Application_create_edit_signature_add_condition_button = '//div[@id="openSideslipOrCondition"]/i' #Object_Application_create_edit_signature_add_to_input = '(//form/div[1]/div/div/div/input)[2]' #Object_Application_create_edit_signature_add_to_Condition1_selector ='//ul[@class="el-scrollbar__view el-select-dropdown__list"]/li/span[text()="New Condition"]' #Add to下拉框的Condition1的xpath路径 #Object_Application_create_edit_signature_Attribute_name_input = '//div[@id="Attribute_Name"]' #edit_signature模块下Condition中Attribute添加按钮xpath路径 -Edit_signature_Condition_Attribute_ip = '(//div[@class="el-collapse-item__header"])[{}]' #Traffic Attribute下的ip项路径 -Edit_signature_Condition_Attribute_ip_src = '//div[@class="el-collapse-item is-active"]/div[@class="el-collapse-item__wrap"]/div/div[contains(text(),"ip.src")]' #ip.src项 -Edit_signature_Condition_Add_IP_button = '//div[@id="orCondition_id"]/i[@class="iconfont icon-Create1"]' #添加IP按钮 +Edit_signature_Condition_Attribute_ip = '//div[text()="ip"]' #Traffic Attribute下的ip项路径 +Edit_signature_Condition_Attribute_ip_src = '//span[text()="ip.src"]' #ip.src项 +Edit_signature_Condition_Add_IP_button = '//div[@class="app-signature-object-object_uuids"]//button' #添加IP按钮 Edit_signature_Condition_Add_IP_choose = '(//div[@class="el-checkbox-group"]/ul/li/label[1]/span/div/span/div/span)[{}]' Edit_signature_Condition_OK_button = '//button[@id="ApplicationSignaturesAdd_ok"]' Edit_signature_OK_button = '//button[@id="ApplicationSignaturesAdd_ok_component"]' @@ -506,7 +506,7 @@ application_search_by_name="2-_FilteredSearch_ElCol_ElRow_Application_Home_App_a application_search_by_id="1-_FilteredSearch_ElCol_ElRow_Application_Home_App_anonymousComponent" application_search_by_id_posXpath = "//*[@id='1-_FilteredSearch_ElCol_ElRow_Application_Home_App_anonymousComponent']" application_search_id_xpath = '//ul[@class="el-scrollbar__view el-select-dropdown__list"]/li/span[text()="ID"]' -Application_create_ip = '//div[@class="CreateBtn rm-search-button"]/div/button' +Application_create_ip = '(//i[@class="iconfont icon-Create1"])[2]' Application_create_ip_address = '(//ul[@class="el-dropdown-menu el-popper el-dropdown-menu--small"]/li)[1]' #application 新建页或编辑页添加parent app |
