Commit graph

2 commits

Author SHA1 Message Date
Dmitry Gozman af40eae13e chore: make noWaitAfter a default
This changes the last actions, namely `click` and `press`, to not wait
for the ongoing navigations after the action.

Maintaining this behavior becomes tricky, because browsers move away from
guaranteed synchronous navigations to optimized performance. See #34377
for more details.

This is technically a breaking change. Most of the time, this should
not be noticeable, because the next action will auto-wait the navigation
and for any required conditions anyway. However, there are some patterns
revealed by our tests that are affected:
- Calling `goBack/goForward` immediately after an action. This pattern
  requires `expect(page).toHaveURL()` or a similar check inbetween.
- Listening for network events during the action, and immediately
  asserting after the action. This pattern requires `waitForRequest()`
  or a similar promise-based waiter as recommended in best practices.

We maintain the opt-out `env.PLAYWRIGHT_WAIT_AFTER_CLICK` that reverts
to the old behavior for now.

Additionally, previous opt-out option `env.PLAYWRIGHT_SKIP_NAVIGATION_CHECK`
has been removed, because there have been just a single issue with it,
that was immediately addressed in a patch release.
2025-02-04 15:17:43 +00:00
Dmitry Gozman ea747afcdd
chore: use a single binding for all Playwright needs (#32039)
This makes it easier to manage bindings, being just init scripts.
Fixes the BFCache binding problem.
Makes bindings removable in Firefox.

Fixes #31515.
2024-08-07 06:20:12 -07:00