read the search row before waiting on the panel's close button

read_search_points waited for the close button before reading anything, so a panel that rendered its content but not its button failed the whole search task while the number was already on screen. Traced to that wait with a stacktrace. Closing is best effort now.
This commit is contained in:
mardausdennis
2026-08-28 23:46:41 +02:00
parent 9e919e4ae2
commit dd92cface3
+10 -4
View File
@@ -214,12 +214,18 @@ class RewardsTaskUtils:
# here skipped the entire search task while points were still available.
self.wait_for_then_click(self.elements.get_points_breakdown_button, timeout=30)
close_btn = self.wait_for_element(self.elements.get_close_button_on_points_breakdown, timeout=15)
points_earned, max_pts = self.elements.get_points_earned_from_searches_on_points_breakdown()
# Wait for the search row, not for the panel's close button. The close
# button is incidental to reading the number, and waiting on it first
# meant a panel that rendered its content but not its button killed the
# whole search task while the number was already on screen.
points_earned, max_pts = self.wait_for_element(
self.elements.get_points_earned_from_searches_on_points_breakdown,
timeout=30
)
# Closing is best effort, the panel does not block the next navigation.
try:
self.move_to_and_click(close_btn)
self.move_to_and_click(self.elements.get_generic_sidebar_close_button())
except Exception:
pass