You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Harden waitForSelector/repeatUntil error handling
Follow-up to the waitForSelector(optional/multi/timeout) + repeatUntil
throw-resilience change: close the footguns an adversarial review found.
- waitForSelector optional now swallows only a genuine TimeoutError; any
other error (e.g. an invalid selector) surfaces instead of being hidden.
- waitForSelector timeout uses `action.timeout || timeout`, so timeout:0
falls back to the global instead of becoming Puppeteer's wait-forever.
- waitForSelector rejects an empty/all-blank selector (list) at build time
with an InvalidArgumentException, and filters blank/null list elements.
- repeatUntil re-throws FATAL errors immediately instead of retrying or
swallowing them: every config/programming throw in the action path
(unknown action/condition/solver, missing OCR packages, missing OpenAI
key, captcha-solver 4xx) is marked { fatal: true }; transient page
errors (missing element, timeout, gotoAttr) still count as one failed
attempt and retry. The stale 'repeatUntil does not catch throws' comment
is corrected.
- repeatUntil's post-loop condition recheck is guarded so a context torn
down by an in-flight navigation cannot mask the real lastError.
Back-compat: single-selector waitForSelector and the happy-path
repeatUntil are behavior-identical. 112 tests green (+4).