From 54825c6735bc7dfd99997e2c6b98264a4a2d8120 Mon Sep 17 00:00:00 2001 From: Churikova Tetiana Date: Mon, 17 Apr 2023 17:45:46 +0200 Subject: [PATCH] e2e: more fixes --- test/appium/views/chat_view.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/appium/views/chat_view.py b/test/appium/views/chat_view.py index 29676f4843..4092575d7a 100644 --- a/test/appium/views/chat_view.py +++ b/test/appium/views/chat_view.py @@ -811,7 +811,7 @@ class ChatView(BaseView): self.set_community_image_button = Button(self.driver, translation_id='community-thumbnail-image', suffix='/following-sibling::android.view.ViewGroup') self.confirm_create_in_community_button = Button(self.driver, translation_id="create") - self.mentions_list = BaseElement(self.driver, accessibility_id="user-list") + self.mentions_list = BaseElement(self.driver, xpath="//*[@content-desc='user-list']") # New UI self.pinned_messages_count = Button(self.driver, @@ -1139,8 +1139,10 @@ class ChatView(BaseView): self.chat_message_input.click_inside() self.chat_message_input.send_keys("@") try: - mentions_list = self.mentions_list.wait_for_element() - mentions_list.find_element(MobileBy.XPATH, "//*[@text='%s']" % user_name).click() + self.mentions_list.wait_for_element() + user_in_list = BaseElement(self.driver, xpath="%s//*[@text='%s']" % (self.mentions_list.locator, user_name)) + user_in_list.click() + except TimeoutException: self.driver.fail("Mentions list is not shown")