From 613c013d665df78b973e9e32e5a0de79a849c0d0 Mon Sep 17 00:00:00 2001 From: Vinicius Oliveira Date: Wed, 1 Apr 2026 16:52:11 -0300 Subject: [PATCH 1/3] Add a fix for WaitShow to find text on the new browse screen --- tir/technologies/webapp_internal.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tir/technologies/webapp_internal.py b/tir/technologies/webapp_internal.py index 795b1c87..8b16731f 100644 --- a/tir/technologies/webapp_internal.py +++ b/tir/technologies/webapp_internal.py @@ -5126,15 +5126,20 @@ def WaitShow(self, string, timeout=None, throw_error=True, match_case=False): if not timeout: timeout = 1200 + optional_term = ".tsay, .tgroupbox, wa-text-view, .po-page-header-title" + main_container = self.containers_selectors["AllContainers"] + endtime = time.time() + timeout while(time.time() < endtime): element = None element = self.web_scrap(term=string, scrap_type=enum.ScrapType.MIXED, - optional_term=".tsay, .tgroupbox, wa-text-view", - main_container=self.containers_selectors["AllContainers"], - check_help=False, match_case=match_case) + optional_term=optional_term, main_container=main_container, + check_help=False, match_case=match_case) or \ + self.web_scrap(term=string, scrap_type=enum.ScrapType.MIXED, + optional_term=optional_term, main_container=main_container, + check_help=False, match_case=match_case, twebview=True) if element: logger().info(f"Text found! ") From d2b777092033a1bab6de68f53a257476c12197db Mon Sep 17 00:00:00 2001 From: Vinicius Oliveira Date: Wed, 1 Apr 2026 17:05:24 -0300 Subject: [PATCH 2/3] Toggle twebview flag in web_scrap method for improved text search functionality --- tir/technologies/webapp_internal.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tir/technologies/webapp_internal.py b/tir/technologies/webapp_internal.py index 8b16731f..d04bd429 100644 --- a/tir/technologies/webapp_internal.py +++ b/tir/technologies/webapp_internal.py @@ -5128,6 +5128,7 @@ def WaitShow(self, string, timeout=None, throw_error=True, match_case=False): optional_term = ".tsay, .tgroupbox, wa-text-view, .po-page-header-title" main_container = self.containers_selectors["AllContainers"] + twebview = False endtime = time.time() + timeout while(time.time() < endtime): @@ -5136,10 +5137,7 @@ def WaitShow(self, string, timeout=None, throw_error=True, match_case=False): element = self.web_scrap(term=string, scrap_type=enum.ScrapType.MIXED, optional_term=optional_term, main_container=main_container, - check_help=False, match_case=match_case) or \ - self.web_scrap(term=string, scrap_type=enum.ScrapType.MIXED, - optional_term=optional_term, main_container=main_container, - check_help=False, match_case=match_case, twebview=True) + check_help=False, match_case=match_case, twebview=twebview) if element: logger().info(f"Text found! ") @@ -5148,6 +5146,8 @@ def WaitShow(self, string, timeout=None, throw_error=True, match_case=False): if endtime - time.time() < 1180: time.sleep(0.5) + twebview = not twebview + if not throw_error: return False else: From 73c1186f539a08554a98c09431c5c4b6c4174f9c Mon Sep 17 00:00:00 2001 From: Vinicius Oliveira Date: Wed, 1 Apr 2026 17:10:15 -0300 Subject: [PATCH 3/3] Add comment to clarify twebview variable usage in element search loop --- tir/technologies/webapp_internal.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tir/technologies/webapp_internal.py b/tir/technologies/webapp_internal.py index d04bd429..05806418 100644 --- a/tir/technologies/webapp_internal.py +++ b/tir/technologies/webapp_internal.py @@ -5146,6 +5146,7 @@ def WaitShow(self, string, timeout=None, throw_error=True, match_case=False): if endtime - time.time() < 1180: time.sleep(0.5) + # Variable to search for the element with and without the twebview in each iteration of the loop. twebview = not twebview if not throw_error: