Skip to content

3.3.2

Choose a tag to compare

@edulazaro edulazaro released this 31 Jul 11:28
· 17 commits to main since this release
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).