Skip to content

feat (Frame): Accept all supported options to goto#171

Merged
ftes merged 1 commit into
ftes:mainfrom
s3cur3:ty/goto-options
May 13, 2026
Merged

feat (Frame): Accept all supported options to goto#171
ftes merged 1 commit into
ftes:mainfrom
s3cur3:ty/goto-options

Conversation

@s3cur3
Copy link
Copy Markdown
Contributor

@s3cur3 s3cur3 commented May 12, 2026

The corresponding change to be able to use #49 from playwright_ex. The description from that PR:

This expands the list of selected options for PlaywrightEx.Frame.goto/2 to match those of the JavaScript API (docs).

I found that in CI, I was often hitting 30 second timeouts waiting for the load event—even though in the trace, I could clearly see the page had (at least conceptually!) loaded. When switching to waitUntil: 'commit' (rather than the default waitUntil: 'load'), not only did the flakiness of that initial page load get fixed, but the tests also got much faster: from an average of >5 seconds per test down to under 1.5 seconds/test.

(The Referer stuff isn't strictly necessary for my own work, but I figured while I was in here, I might as well make goto accept everything the JavaScript version does.)

It doesn't feel great having the docs copied and pasted between the two projects, but it seemed cleaner than, say, exposing a function from PlaywrightEx that would provide the options at compile-time.

The corresponding change to be able to use [ftes#49 from playwright_ex](ftes/playwright_ex#49). The description from that PR:

> This expands the list of selected options for `PlaywrightEx.Frame.goto/2` to match those of the JavaScript API ([docs](https://playwright.dev/docs/api/class-page#page-goto)).
>
> I found that in CI, I was often hitting 30 second timeouts waiting for the `load` event—even though in the trace, I could clearly see the page had (at least conceptually!) loaded. When switching to `waitUntil: 'commit'` (rather than the default `waitUntil: 'load'`), not only did the flakiness of that initial page load get fixed, but the tests also got _much_ faster: from an average of >5 seconds per test down to under 1.5 seconds/test.
>
> (The `Referer` stuff isn't strictly necessary for my own work, but I figured while I was in here, I might as well make `goto` accept everything the JavaScript version does.)

It doesn't feel _great_ having the docs copied and pasted between the two projects, but it seemed cleaner than, say, exposing a function from PlaywrightEx that would provide the options at compile-time.
@ftes
Copy link
Copy Markdown
Owner

ftes commented May 13, 2026

It doesn't feel great having the docs copied and pasted between the two projects, but it seemed cleaner than, say, exposing a function from PlaywrightEx that would provide the options at compile-time.

Agreed. For now there are few places where we pass through opts and hence duplicate the docs.
So good enough for now I reckon.

@ftes ftes enabled auto-merge (squash) May 13, 2026 06:29
@ftes
Copy link
Copy Markdown
Owner

ftes commented May 13, 2026

Thanks Tyler!

@ftes ftes merged commit 7f126e0 into ftes:main May 13, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants