fix(browser): harden waitFor event handling
Closed
MA
4mo ago+248+248+012345678901234567890123456789-24-24-01234567890123456789
Summary
- add a typed
{ predicate?, timeoutMs? }form while preserving the positionalwaitForAPI - reject predicate failures and scope page events to the active CDP session
- add
session.navigate(url)so the agent uses one simple call while the implementation registers the load waiter beforePage.navigate - return immediately for same-document navigations and downloads, surface
Page.navigate.errorText, and wait only for real cross-document loads - add deterministic coverage for options, timeout, predicate failures, compatibility, active-session filtering, early load events, same-document navigation, downloads, and navigation errors
Closes #110
Validation
- targeted browser package tests: 18 pass, 8 environment-gated skips
- package and root filtered typechecks pass
- changed
cdp-sessiontest file is lint-clean