mirror of
https://github.com/User0332/rewards-farmer.git
synced 2026-09-16 01:31:36 +00:00
add a selector self check and stop reporting skipped tasks as done
check_selectors.py walks every selector and prints what resolved, what is absent and what broke, along with browser, driver, page language and the earn section ids. Absent is a normal result for a task a variant does not ship. It completes no activities and claims nothing, so it is safe to run for a bug report. complete_explore_on_bing_tasks now raises when the section is missing instead of returning quietly, which made complete_all_tasks print [OK] for a task that never ran. The visible labels the lookups match on are collected in one Labels class. The selectors are market independent but still language dependent, and this makes that explicit and fixable in one place.
This commit is contained in:
@@ -85,8 +85,11 @@ class RewardsTaskUtils:
|
||||
explore_on_bing_links = self.elements.get_explore_on_bing_elements()
|
||||
|
||||
if not explore_on_bing_links:
|
||||
print("[INFO] No Explore on Bing section in this UI variant, skipping.")
|
||||
return
|
||||
# Raise rather than return, so complete_all_tasks reports this as
|
||||
# [SKIP]. Returning quietly made it print [OK] for a task that never
|
||||
# ran, which is exactly the kind of false success a scheduled run
|
||||
# must not produce.
|
||||
raise NoSuchElementException("no Explore on Bing section in this UI variant")
|
||||
|
||||
for card in explore_on_bing_links:
|
||||
desc = self.elements.extract_card_descriptions(card)
|
||||
|
||||
Reference in New Issue
Block a user