From 95b41f98797f3b07950920b9fbf6c9ef57d0f25a Mon Sep 17 00:00:00 2001 From: OlehStefanyshyn Date: Mon, 28 Oct 2024 15:13:29 +0200 Subject: [PATCH] jsm10/fix-add-comment-action --- app/selenium_ui/jsm/pages/agent_pages.py | 2 +- app/selenium_ui/jsm/pages/agent_selectors.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/selenium_ui/jsm/pages/agent_pages.py b/app/selenium_ui/jsm/pages/agent_pages.py index cc6b94b0c..dcb6fe226 100644 --- a/app/selenium_ui/jsm/pages/agent_pages.py +++ b/app/selenium_ui/jsm/pages/agent_pages.py @@ -113,7 +113,7 @@ def check_comment_text_is_displayed(self, text, rte_status=None): def add_request_comment(self, rte_status): comment_text = f"Add comment from selenium - {self.generate_random_string(30)}" - self.wait_until_visible(ViewCustomerRequestLocators.customers_sidebar_selector) + self.wait_until_visible(ViewCustomerRequestLocators.comment_area) textarea = self.get_element(ViewCustomerRequestLocators.comment_collapsed_textarea) self.driver.execute_script("arguments[0].scrollIntoView(true);", textarea) textarea.click() diff --git a/app/selenium_ui/jsm/pages/agent_selectors.py b/app/selenium_ui/jsm/pages/agent_selectors.py index b0729f6c2..8dfec362f 100644 --- a/app/selenium_ui/jsm/pages/agent_selectors.py +++ b/app/selenium_ui/jsm/pages/agent_selectors.py @@ -110,6 +110,7 @@ class BrowseCustomersLocators: class ViewCustomerRequestLocators: bread_crumbs = (By.CSS_SELECTOR, ".aui-nav.aui-nav-breadcrumbs") + comment_area = (By.CLASS_NAME, 'sd-comment-collapse') comment_collapsed_textarea = (By.ID, "sd-comment-collapsed-textarea") comment_text_field_RTE = (By.XPATH, "//div[textarea[@id='comment']]//iframe") comment_text_field = (By.XPATH, "//textarea[@id='comment']")