diff options
| author | zhaokun <[email protected]> | 2024-11-28 16:50:57 +0800 |
|---|---|---|
| committer | zhaokun <[email protected]> | 2024-11-28 16:50:57 +0800 |
| commit | 83661e91f8abd64f6b0ecee8e9e69e784a72e5d8 (patch) | |
| tree | 1aa4b4365efdf9bed886056f3ba67c0941260b6b /support/ui_utils/profiles/create_response_page.py | |
| parent | 06fa53634037ae81bfb5b24e97a48697061cb083 (diff) | |
| parent | c9deae84b3d26ca19242a95d8a8c9a18974bdcc9 (diff) | |
Diffstat (limited to 'support/ui_utils/profiles/create_response_page.py')
| -rw-r--r-- | support/ui_utils/profiles/create_response_page.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/support/ui_utils/profiles/create_response_page.py b/support/ui_utils/profiles/create_response_page.py index 3899473b2..260954759 100644 --- a/support/ui_utils/profiles/create_response_page.py +++ b/support/ui_utils/profiles/create_response_page.py @@ -8,19 +8,19 @@ class CreateResponsePage: def __init__(self, driver): self.driver = driver - def create_response_page(self, data): + def create_response_page(self, policy_configuration): """ resposne page 创建函数 """ # 在create resposne page页面操作 - profile_name = data["name"] + data = policy_configuration["action_parameter"] + profile_name = data["html_profile"]["name"] self.driver.find_element(By.XPATH, responsePage_input_Name_posXpath).clear() self.driver.find_element(By.XPATH, responsePage_input_Name_posXpath).send_keys(profile_name) # 上传文件 - create_file = data["file"].split("->")[0] # 提取上传文件绝对路径 - profile_path = os.path.dirname(os.path.abspath(__file__)) # ...support\ui_utils\profile - file_abs = os.path.join(profile_path, "profile_file", "response_pages", create_file) - + create_file = data["html_profile"]["file_path"] # 提取上传文件绝对路径 + root_path = policy_configuration["parameter"]["root_path"]# ...support/configuration_management/profile + file_abs = os.path.join(root_path, "support" ,"configuration_management", "profile", create_file) self.driver.find_element(By.XPATH, responsePage_input_file_posXpath).send_keys(file_abs) self.driver.find_element(By.XPATH, responsePage_button_oK_posXpath).click() if self.driver.is_element_exist_by_value(By.XPATH, responsePage_button_warningSaveYes_posXpath): |
