make sure claim_bonus_points waits for the sidebar to render

This commit is contained in:
Carl Furtado
2026-08-21 10:27:53 -04:00
parent f31d0cd711
commit 320a6de8cd
+3 -3
View File
@@ -8,7 +8,7 @@ from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.keys import Keys
from selenium.webdriver.remote.webelement import WebElement from selenium.webdriver.remote.webelement import WebElement
from selenium.webdriver.common.action_chains import ActionChains 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 tab_utils
import llm_utils import llm_utils
import mouse_trajectory import mouse_trajectory
@@ -202,8 +202,8 @@ class RewardsTaskUtils:
self.wait_for_then_click(self.elements.get_bonus_button_on_dashboard) self.wait_for_then_click(self.elements.get_bonus_button_on_dashboard)
try: try:
self.move_to_and_click(self.elements.get_claim_bonus_points_button()) self.wait_for_then_click(self.elements.get_claim_bonus_points_button)
except IndexError: except TimeoutException:
print("[WARNING] Could not find the 'Claim Bonus Points' button. There are likely no bonus points to claim at this time.") 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): def complete_all_tasks(self):