Commit graph

48 commits

Author SHA1 Message Date
Pavel Feldman 4a7f6a6ef0
chore: organize imports in playwright-core (#34680) 2025-02-07 13:54:01 -08:00
Dmitry Gozman f713d3adaf
chore: simplify page initialization logic across browser types (#34002) 2024-12-14 20:15:58 +00:00
Max Schmitt e3629dc1df
fix: validate ffmpeg on context creation (#33903) 2024-12-11 23:07:03 -08:00
Dmitry Gozman 94776ad18a
docs: note that permissions list may change (#33690) 2024-11-20 06:08:34 -08:00
Max Schmitt 79cba7d704
chore: introduce option overrides on context/browser (#32606) 2024-09-13 17:34:34 +02: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
Yury Semikhatsky e269092ef9
Revert "fix: add 'window-management' to chromium browser (#31687)" (#31801)
This reverts commit 0aa2f06f68.

Discussed the new permission in the API review and decided not to
proceed with the feature as we are not ready to commit to supporting it
yet:
* the API is Chromium specific
* the API is still experimental
* there is no clarity to what extend the screen manipulation APIs will
work in old headless which is our main test environment

We'll keep an eye on the demand for the feature and may get back to
implementing it in the future.

Reference: https://github.com/microsoft/playwright/issues/27198
2024-07-22 11:27:12 -07:00
Ismael Onilearan 0aa2f06f68
fix: add 'window-management' to chromium browser (#31687) 2024-07-15 14:34:57 -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
Yury Semikhatsky c08000b967
feat(chromium): storage-access permission (#31239)
Fixes https://github.com/microsoft/playwright/issues/31227
2024-06-11 09:18:45 -07:00
Dmitry Gozman a6a44a07a7
chore: align crServiceWorker with crPage (#30367)
Simplify network-related methods because crNetworkManager already
handles initial/non-initial calls.
2024-04-15 11:09:38 -07:00
Pavel Feldman 2de8a6b002
chore: move filter params into the clearCookies (#30111) 2024-03-26 08:12:26 -07:00
Dmitry Gozman aedd7ca0be
chore: make CRNetworkManager handle multiple sessions (#29721)
It was already handling worker sessions, but not OOPIFs. As a result,
some functionality was properly implemented only for OOPIFs and not for
workers.

This change removes OOPIFs fanout for network-related calls from CRPage
and moves that to the CRNetworkManager, now also covering workers.
2024-02-28 15:51:27 -08:00
Pavel Feldman 9d0430fa26
chore: strengthen linting (#29669) 2024-02-26 16:52:28 -08:00
Max Schmitt e788c711c6
fix: electron video tests (#28004) 2023-11-07 23:42:17 +01:00
Yury Semikhatsky 36c4c24f8a
fix: only convert input files for browser collocated with server (#27873)
Reference #27452
Fixes #27792
2023-11-01 08:40:12 -07:00
Pavel Feldman d4296dbff4
chore: break dowload.path() to throw (#27662) 2023-10-17 12:56:56 -07:00
Pavel Feldman a54dbfdadf
chore: plumb the target close reason when test fails (#27640) 2023-10-16 20:32:13 -07:00
Jim Hays dcc8dcca73
Fix various typos (Fixes #27396) (#27391)
Fixes https://github.com/microsoft/playwright/issues/27396
2023-10-04 19:56:42 -07:00
Dmitry Gozman 55c4bb97af
chore: extract CDPSession on the server side, remove duplicate code (#27349)
This makes sure that protocol calls after target close are rejected
correctly.
2023-09-29 12:50:02 -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
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
Pavel Feldman 4949cef09c
chore: save chrome trace on the client side (#24414) 2023-07-26 14:11:26 -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 3c724c2498
fix: do not crash upon download in unknown page (#22774)
Fixes #22551.
2023-05-02 18:49:04 -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 190ed9465f
fix(chromium): detach from shared workers (#18976)
This prevents shared workers from stalling upon restart.

We receive `Inspector.targetCrashed` and
`Inspector.targetReloadedAfterCrash` events that assume
`Runtime.runIfWaitingForDebugger` from any attached client. It is easier
and more stable to just detach from shared workers, because we do not
inspect them.

For service workers, we should actually issue
`Runtime.runIfWaitingForDebugger` in such cases, because we attach to
them.

Fixes #18932.
2022-11-22 15:20:42 -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 df143031e7
chore: move protocol and trace types into the top-level packages (#17486) 2022-09-20 18:41:51 -07:00
Max Schmitt 7e2aec7454
chore: align more ESLint rules with VSCode formatting (#16647) 2022-08-18 20:12:33 +02:00
Pavel Feldman 74f7005c02
chore: preserve window while reusing window (#16225) 2022-08-03 16:14:28 -07:00
Pavel Feldman cc6f415933
chore: share grant permissions init among browser types (#15457) 2022-07-07 11:39:05 -07:00
Ross Wollman 6cb3236acd
feat(chromium): Service Worker Network Instrumentation and Inspection (#14716)
Adds Chromium support for Service Worker Networking (interception/routing, Request/Response events, and HAR).

Resolves #1090.
Depends on #14714 and #14714.
Supercedes #14321.
Follow up #14711.

Landed upstream patches:
- https://chromium-review.googlesource.com/c/chromium/src/+/3510917
- https://chromium-review.googlesource.com/c/chromium/src/+/3526571
- https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3566669
- https://chromium-review.googlesource.com/c/chromium/src/+/3544685
- https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3610924
- https://chromium-review.googlesource.com/c/chromium/src/+/3689949
2022-07-01 12:49:43 -07:00
Pavel Feldman 464cbb7457
feat(chromium): allow attaching to other targets as to pages (#14873) 2022-06-15 09:31:32 -07:00
Dmitry Gozman 06c8d8e31c
chore: use channels types instead of a copy in server (#14874)
This is to avoid duplicating types for no reason.
2022-06-14 22:02:15 -07:00
Pavel Feldman 40d5e3a3c9
chore: use utils via index export (3) (#13403) 2022-04-07 13:55:44 -07:00
Pavel Feldman 5ae2017a5b
chore: always import type (#13365) 2022-04-06 14:57:14 -07:00
Pavel Feldman 1bebc28aed
chore: reset page/context for reuse in component tests (#13264) 2022-04-04 12:39:43 -07:00
Pavel Feldman bcb12fcf7f
chore: mark public methods on server as such (#13271) 2022-04-02 19:02:27 -07:00
Pavel Feldman 98ed81dc00
chore: do not initialize full sessions for pages used in session restore (#12886) 2022-03-18 18:17:37 -07:00
Pavel Feldman c7d6f96328
chore: disambiguate internal flags (#12866) 2022-03-17 18:27:33 -07:00
Yury Semikhatsky abd7084bcc
fix: match default font families in headless chromium (#11340) 2022-02-11 09:06:17 -08:00
Pavel Feldman 9f35a97a55
chore(chrome): tolerate unknown target types (#11936) 2022-02-08 09:46:05 -08:00
Andrey Lushnikov 6a7a2971f2
fix(chromium): close all javascript dialogs when closing context (#11614)
Fixes #11581
2022-01-25 13:52:18 -08:00
Ross Wollman fde427d890
feat(proxy): unify local network proxy behavior (#10719)
When configuring a proxy, Chromium requires a magic tokens to get some
local network requests to go through the proxy. This has tripped up a
few users, so we make the behavior default to the expected: proxy
everything including the local requests. This matches the other vendors
as well.

NB: This can be disabled via
`PLAYWRIGHT_DISABLE_FORCED_CHROMIUM_PROXIED_LOOPBACK=1`

Supercedes: #8345
Fixes: #10631
2021-12-10 14:01:56 -08:00
Dmitry Gozman c373986ca0
fix(evaluate): reject all context operations when frame detaches (#9987) 2021-11-03 10:44:50 -07:00
Joel Einbinder c89d5a50dd
chore: migrate to monorepo (#9421) 2021-10-11 16:52:17 +02:00
Renamed from src/server/chromium/crBrowser.ts (Browse further)