Skip to content

Feat/fetch wait options#1927

Merged
karlseguin merged 4 commits intomainfrom
feat/fetch-wait-options
Mar 20, 2026
Merged

Feat/fetch wait options#1927
karlseguin merged 4 commits intomainfrom
feat/fetch-wait-options

Conversation

@karlseguin
Copy link
Collaborator

Small tweak/fixes to #1896

shaewe180 and others added 4 commits March 18, 2026 15:08
Add `--wait_until` and `--wait_ms` CLI arguments to configure session wait behavior. Updates `Session.wait` to evaluate specific page load states (`load`, `domcontentloaded`, `networkidle`, `fixed`) before completing the wait loop.
- Refactor `wait` and `_wait` to handle `page` as `*Page` instead of `**Page`, preventing stale references during navigations.
- Update `networkidle` wait condition to use `_notified_network_idle == .done`.
- Document `--wait_ms` and `--wait_until` options in `Config.zig` help text.
Small tweaks to #1896

Improve the wait ergonomics with an Option with default parameter. Revert
page pointer logic to original (don't think that change was necessary).
@krichprollsch
Copy link
Member

LGTM, the options are helpful.
I also think we will have soon an option to wait until a given css selector returns something.

@karlseguin karlseguin merged commit a5378fe into main Mar 20, 2026
12 checks passed
@karlseguin karlseguin deleted the feat/fetch-wait-options branch March 20, 2026 23:19
@github-actions github-actions bot locked and limited conversation to collaborators Mar 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants