From 320a6de8cd9043e173b16af58f0bde642dfb1a9d Mon Sep 17 00:00:00 2001 From: Carl Furtado Date: Fri, 21 Aug 2026 10:27:53 -0400 Subject: [PATCH] make sure claim_bonus_points waits for the sidebar to render --- src/rewards_tasks.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rewards_tasks.py b/src/rewards_tasks.py index 783d37f..8ffcd26 100644 --- a/src/rewards_tasks.py +++ b/src/rewards_tasks.py @@ -8,7 +8,7 @@ from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.common.keys import Keys from selenium.webdriver.remote.webelement import WebElement from selenium.webdriver.common.action_chains import ActionChains -from selenium.common.exceptions import StaleElementReferenceException +from selenium.common.exceptions import StaleElementReferenceException, TimeoutException import tab_utils import llm_utils import mouse_trajectory @@ -202,8 +202,8 @@ class RewardsTaskUtils: self.wait_for_then_click(self.elements.get_bonus_button_on_dashboard) try: - self.move_to_and_click(self.elements.get_claim_bonus_points_button()) - except IndexError: + self.wait_for_then_click(self.elements.get_claim_bonus_points_button) + except TimeoutException: print("[WARNING] Could not find the 'Claim Bonus Points' button. There are likely no bonus points to claim at this time.") def complete_all_tasks(self):