Commit Graph

85 Commits

Author SHA1 Message Date
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
Max Schmitt c4862c022c
chore: client certificates api review (#31826) 2024-07-23 22:56:36 +02:00
Max Schmitt 453e3bdf9d
test: fix client-certificates tests on Windows (#31750) 2024-07-18 13:43:56 +02:00
Max Schmitt 9569cb5c1e
feat: support client certificates (#31529)
Signed-off-by: Max Schmitt <max@schmitt.mx>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2024-07-12 11:42:24 +02:00
Dmitry Gozman 229000501e
chore: introduce helpers for non-stalling eval on page/context (#31658) 2024-07-12 02:26:16 -07:00
Pavel Feldman c9e673c6dc
fix(utility): create utility world when web security is disabled (#31458)
Reverts previous attempt at #31096

Fixes: https://github.com/microsoft/playwright/issues/31431
Fixes: https://github.com/microsoft/playwright/issues/31442
2024-06-27 09:29:20 -07:00
Max Schmitt 6ed3b374a8
fix(electron): allow downloads (#31390) 2024-06-21 00:35:14 +02:00
Max Schmitt f05b4daa2f
fix(clock): under reused context (#31357)
We uninstall all the setInitScript but forgot to mark `installed` as
`false`.

Fixes https://github.com/microsoft/playwright/issues/31353
2024-06-18 18:21:33 +02:00
Pavel Feldman 170c457a61
feat(timers): a stab at fake timers (#31075) 2024-05-30 09:38:27 -07:00
Pavel Feldman 2de8a6b002
chore: move filter params into the clearCookies (#30111) 2024-03-26 08:12:26 -07:00
Dmitry Gozman 349b25e61a
fix(storageState): try to collect storage state on existing pages first (#29915)
This helps in a case where navigating to an origin fails for some
reason, for example because a registered service worker loads some
content into the supposedly blank page.

Fixes #29402.
2024-03-12 19:20:35 -07:00
PaulTriandafilov 8e48ee714d
feat(playwright-core): add remove cookies api (#29698) 2024-03-02 07:27:01 -08:00
Pavel Feldman 0f2de59b7c
chore: remove graceful browser.close cleanup (#27916) 2023-11-01 20:17:10 -07:00
Pavel Feldman a54dbfdadf
chore: plumb the target close reason when test fails (#27640) 2023-10-16 20:32:13 -07:00
Pavel Feldman fd6bf8aa2c
chrome: improve error messages on vscode side (#27521) 2023-10-09 19:55:24 -07:00
Dmitry Gozman c8143748e6
chore: remove `Page._didDisconnect` (#27317)
Instead of having `didClose` based on page creation/destruction and
`didDisconnect` based on session lifetime, we make session lifetime
being managed by the `CRPage`/`FFPage`/`WKPage` instead.
2023-09-27 14:09:56 -07:00
Vignesh Shanmugam adc9b2d390
feat: add support for browserContext.on('pageerror') (#24452)
+ fix #24466
+ Adds support for exposing the `pageerror` events via `browserContext`
API.
+ Helps with capturing the overall exceptions that are thrown outside of
the the current page and also captures the exceptions happens on other
windows/popups.
+ Keeps the API in sync with `context.on('request)',
context.on('console'), etc..`
2023-08-17 09:10:03 -07:00
Max Schmitt 75ed251c9e
fix: download of attachments in UI Mode (#26407)
Fixes https://github.com/microsoft/playwright/issues/26326.
2023-08-17 10:57:28 +02:00
Dmitry Gozman 9509c300e4
fix(reuse): make sure newly created page is not "server-side-only" (#26332)
This page is going to be the "page for reuse", so it should not be
marked as "server-side-only" and should issue all required events.

Fixes #24574.
2023-08-07 16:26:30 -07:00
Dmitry Gozman 2cb0622c39
chore: rename ScopedRace to LongStandingScope, preserve Error instance in reject() (#24361) 2023-07-23 21:00:07 -07:00
Pavel Feldman 067faa50d7
chore: migrate Promise.race to scopes to prevent leaks (#24160) 2023-07-11 10:38:08 -07:00
Max Schmitt 8bc26a2b44
chore: wait for downloads getting removed on context.close() (#23500)
Before there was a race, that we ran into this code:


9cd49d5dd5/packages/playwright-core/src/server/browserContext.ts (L236-L237)

and then into this code:


9cd49d5dd5/packages/playwright-core/src/server/browserContext.ts (L429-L431)

which had the side effect, that the first call did not wait. Then
immediately clears the downloads Set and then the second call is a NOOP.
This ends up that the the removal of the downloads can happen after the
context is closed, hence the test is flaky.

Relates to https://github.com/microsoft/playwright/pull/6151 where it
got introduced. So something for @yury-s.

Fixes https://github.com/microsoft/playwright/issues/22525
2023-06-06 20:38:36 +02:00
Pavel Feldman 5a14619bab
chore: render route markers in the trace network panel (#23476)
Fixes https://github.com/microsoft/playwright/issues/23040


![net](https://github.com/microsoft/playwright/assets/883973/5191163e-63f9-4999-9197-d10dcd09a665)
2023-06-02 13:00:27 -07:00
Dmitry Gozman 14a1eaa474
chore: add Playwright to attribution (#23447)
This makes it easier to plumb all kinds of options around.
2023-06-01 17:54:43 -07:00
Dmitry Gozman 6bb5c0a549
fix: make `evaluate` not wait for scheduled navigations (#23402)
Fixes #23141.
2023-05-31 14:08:44 -07:00
Dmitry Gozman 236c329ea9
feat: browserContext.on('dialog'/'console') (#22805)
Relanding #22033 and #21943.
2023-05-04 15:11:46 -07:00
Dmitry Gozman d7b3836752
chore: revert console and dialog events on BrowserContext (#22195)
This reverts #22033 and #21943, since there will be no immediate
benefits in v1.33.
2023-04-04 13:13:52 -07:00
Dmitry Gozman 3b359e27b7
feat: BrowserContext.on('dialog') (#22033)
Dialogs created early during page initialization are only reported on
the context, with `page()` being `null`.
2023-03-28 13:15:55 -07:00
Dmitry Gozman f502c72f2b
feat: browserContext.on('console') (#21943) 2023-03-27 16:35:05 -07:00
Pavel Feldman d4e0ef7f1a
chore: explicitly send route's requestUrl for tracing (#21940) 2023-03-23 14:57:03 -07:00
Max Schmitt 778f8e65d2
chore: do not cache between reused context (#20052)
Fixes https://github.com/microsoft/playwright/issues/19926
2023-03-03 12:37:44 +01:00
Dmitry Gozman c69a7424b4
chore: split off FrameSelectors helper class (#21042)
This class manages everything related to querying selector for the
frame.
2023-02-21 14:08:51 -08:00
Dmitry Gozman 3180bc9804
fix(types): make most fixtures non-undefined (#20573)
Fixes #20416.
2023-02-02 13:11:50 -08:00
Dmitry Gozman d458e84f5b
feat(route): match pattern on the server side (#20410)
This avoids client-side roundtrip for requests that are not handled by
any route.

Fixes #19607.
2023-01-27 10:43:19 -08:00
Alex b984bb9ad6
fix: serviceWorker.register function (#20072) 2023-01-12 10:47:45 -08:00
Dmitry Gozman 6193e6d8ea
fix(reuse): reset tracing (#19876)
References #19059.
2023-01-04 13:19:05 -08:00
Max Schmitt 1d3feba578
chore: do not set bypassCSP when inspector is used (#19190)
Fixes https://github.com/microsoft/playwright/issues/19186
2022-12-01 12:39:40 -08:00
Dmitry Gozman 503f8f51dc
fix(reuse): stop pending operations upon reuse/disconnect (#18997) 2022-11-22 15:21:20 -08:00
Pavel Feldman a0ea9b5fba
chore: simplify slowmo implementation (#18990) 2022-11-22 11:06:45 -08:00
Dmitry Gozman c56877032d
fix(persistent): close browser instead of pages (#18485)
Previously, we closed pages one by one before closing the browser when
shutting down the persistent context. This logic was introduced in
https://github.com/microsoft/playwright/pull/4040 to properly finish
video recordings in persistent context.

Such a process makes it unnecessary brittle to close the persistent
context. For example, Chromium headless is sometimes unable to close the
last persistent page for unknown reasons.

Instead, we can just stop video recordings manually and close the
browser right away.

Fixes #18229.
2022-11-01 14:26:38 -07:00
Pavel Feldman 1505a952fe
chore: make handle beforeunload when reusing the context (#18357)
Fixes: https://github.com/microsoft/playwright/issues/17903
2022-10-26 15:17:40 -07:00
Pavel Feldman d3948d1308
chore: enable debug controller testing (#18270) 2022-10-24 16:19:58 -07:00
Pavel Feldman df143031e7
chore: move protocol and trace types into the top-level packages (#17486) 2022-09-20 18:41:51 -07:00
Pavel Feldman 80e9c5dc55
fix(reuse): restore storage state (#17175) 2022-09-07 19:15:04 -07:00
Yury Semikhatsky 5d6253f743
fix: stop har recording when APIRequestContext is disposed (#17007) 2022-08-31 21:51:38 -07:00
Pavel Feldman ba722a2580
fix(selectors): make them work in the browser reuse mode (#16691) 2022-08-19 13:48:33 -07:00
Max Schmitt 7e2aec7454
chore: align more ESLint rules with VSCode formatting (#16647) 2022-08-18 20:12:33 +02:00
Pavel Feldman c84fbc2e4e
feat(driver): add reuse and navigate commands (#16420) 2022-08-10 10:57:28 -07:00
Pavel Feldman 97fa2518e9
fix(reuse): clear storage after stopping all scripts (#16275) 2022-08-04 16:39:18 -07:00
Pavel Feldman b3d30a808f
fix(reuse): reset sw, db, storages (#16265) 2022-08-04 15:01:34 -07:00