You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reverts feat(electron): move Electron API to a separate package #40184. Restores the server-side Electron architecture (client/electron.ts, server/electron/*, server/dispatchers/electronDispatcher.ts) because the CDP-based replacement broke _electron.launch({ executablePath }) for packaged apps such as VS Code (the loader can't be injected, so __playwright_electron is never set in the Node debugger context).
Drops packages/playwright-electron/ and packages/playwright-core/src/electron/.
Re-adds Electron protocol entries to packages/protocol/spec/electron.yml and the electron initializer to packages/protocol/spec/playwright.yml (monolithic protocol.yml was split into per-interface files in chore: split protocol.yml #40645).
Restores tests/electron/electron-options-app.js so the migration tests added in feat(electron): move Electron API to a separate package #40184 (should set timezone via process.env.TZ, should ignore https errors via --ignore-certificate-errors switch) keep passing, and re-adds acceptDownloads: true to should report downloads.
Follow-up to the revert of PR microsoft#40184 that brings the tree to a working
state on top of the main-branch changes that landed after the PR:
- Re-add Electron protocol entries to packages/protocol/spec/electron.yml
and the Electron initializer to packages/protocol/spec/playwright.yml
(protocol.yml was split into per-interface spec/*.yml files in microsoft#40645).
- Keep Electron docs in docs/src/electron-api/ but restore their pre-PR
full content (the PR had truncated docs to match the trimmed-down
CDP-only API). doclint cli.js merges electron-api docs.
- Drop the leftover docs/src/electron/loader bundling step from
utils/build/build.js (loader is back at server/electron/loader.ts).
- Update the restored server/electron/electron.ts import after the
toConsoleMessageLocation -> stackTraceToLocation rename in microsoft#39767.
- Drop the explicit _electron registration from inprocess.ts; with the
server-side dispatcher restored, _electron is wired through the
Playwright initializer again.
- Remove duplicate _electron exports in index.mjs and overrides.d.ts.
- Restore the pre-PR ElectronApplication evaluate/evaluateHandle
override signatures so the generated types are consistent.
…soft#40184
The revert of microsoft#40184 deleted tests/electron/electron-options-app.js but
left the spec changes that reference it ('should set timezone via
process.env.TZ' and 'should ignore https errors via
--ignore-certificate-errors switch' tests added in microsoft#40184). Restore the
helper so those tests pass again.
Also re-add `acceptDownloads: true` to the 'should report downloads'
test — microsoft#40184 had dropped it because the new architecture made it the
default, but the reverted server-side flow still requires it.
19 flaky⚠️ [electron-page] › page/page-goto.spec.ts:462 › should fail when replaced by another navigation `@electron-ubuntu-latest` ⚠️ [electron-page] › page/page-navigation.spec.ts:28 › should work with cross-process _blank target `@electron-ubuntu-latest` ⚠️ [electron-page] › page/page-navigation.spec.ts:36 › should work with _blank target in form `@electron-ubuntu-latest` ⚠️ [electron-page] › page/page-request-continue.spec.ts:398 › should respect set-cookie in redirect response `@electron-ubuntu-latest` ⚠️ [electron-page] › page/page-route.spec.ts:74 › should not support ? in glob pattern `@electron-ubuntu-latest` ⚠️ [electron-page] › page/page-route.spec.ts:169 › should not override cookie header `@electron-ubuntu-latest` ⚠️ [electron-page] › page/page-goto.spec.ts:462 › should fail when replaced by another navigation `@electron-macos-latest` ⚠️ [electron-page] › page/page-navigation.spec.ts:28 › should work with cross-process _blank target `@electron-macos-latest` ⚠️ [electron-page] › page/page-navigation.spec.ts:36 › should work with _blank target in form `@electron-macos-latest` ⚠️ [electron-page] › page/page-request-continue.spec.ts:398 › should respect set-cookie in redirect response `@electron-macos-latest` ⚠️ [electron-page] › page/page-route.spec.ts:74 › should not support ? in glob pattern `@electron-macos-latest` ⚠️ [electron-page] › page/page-route.spec.ts:169 › should not override cookie header `@electron-macos-latest` ⚠️ [chromium-library] › library/video.spec.ts:647 › screencast › should capture full viewport `@realtime-time-library-chromium-linux` ⚠️ [electron-page] › page/page-goto.spec.ts:462 › should fail when replaced by another navigation `@electron-windows-latest` ⚠️ [electron-page] › page/page-navigation.spec.ts:28 › should work with cross-process _blank target `@electron-windows-latest` ⚠️ [electron-page] › page/page-navigation.spec.ts:36 › should work with _blank target in form `@electron-windows-latest` ⚠️ [electron-page] › page/page-request-continue.spec.ts:398 › should respect set-cookie in redirect response `@electron-windows-latest` ⚠️ [electron-page] › page/page-route.spec.ts:74 › should not support ? in glob pattern `@electron-windows-latest` ⚠️ [electron-page] › page/page-route.spec.ts:169 › should not override cookie header `@electron-windows-latest`
8 fatal errors, not part of any test 16 failed
❌ [firefox-library] › library/screencast.spec.ts:28 › screencast.start delivers frames via onFrame callback @firefox-headed-macos-15-xlarge
❌ [firefox-page] › page/page-emulate-media.spec.ts:196 › should report hover and fine pointer for desktop @firefox-beta-ubuntu-22.04
❌ [firefox-page] › page/page-network-response.spec.ts:67 › should return uncompressed text for brotli encoding @firefox-beta-ubuntu-22.04
❌ [firefox-library] › library/capabilities.spec.ts:105 › should support webgl Radoslav Kirilov (@smoke)@firefox-beta-windows-latest
❌ [firefox-page] › page/page-network-response.spec.ts:67 › should return uncompressed text for brotli encoding @firefox-beta-windows-latest
❌ [firefox-page] › page/page-screenshot.spec.ts:321 › page screenshot › should work for webgl @firefox-beta-windows-latest
❌ [firefox-library] › library/defaultbrowsercontext-2.spec.ts:140 › should create userDataDir if it does not exist @firefox-macos-26-large
❌ [firefox-library] › library/capabilities.spec.ts:105 › should support webgl Radoslav Kirilov (@smoke)@firefox-beta-macos-latest
❌ [firefox-library] › library/capabilities.spec.ts:113 › should support webgl 2 Radoslav Kirilov (@smoke)@firefox-beta-macos-latest
❌ [firefox-page] › page/page-network-response.spec.ts:67 › should return uncompressed text for brotli encoding @firefox-beta-macos-latest
❌ [firefox-page] › page/page-screenshot.spec.ts:321 › page screenshot › should work for webgl @firefox-beta-macos-latest
❌ [firefox-library] › library/defaultbrowsercontext-2.spec.ts:140 › should create userDataDir if it does not exist @firefox-macos-15-large
❌ [firefox-library] › library/proxy.spec.ts:199 › should exclude patterns @firefox-macos-15-large
❌ [webkit-library] › library/trace-viewer.spec.ts:195 › should filter actions by text @webkit-macos-26-large
❌ [webkit-library] › library/tracing.spec.ts:432 › should produce screencast frames crop @webkit-macos-26-large
❌ [webkit-library] › library/tracing.spec.ts:432 › should produce screencast frames scale @webkit-macos-26-large
78 flaky⚠️ [chromium-library] › library/video.spec.ts:682 › screencast › should capture full viewport on hidpi `@tracing-chromium` ⚠️ [chromium-library] › library/browsertype-connect.spec.ts:173 › launchServer › should ignore page.pause when headed `@chromium-macos-26-large` ⚠️ [chromium-library] › library/chromium/connect-to-worker.spec.ts:19 › should connect, evaluate, receive console and disconnect `@chromium-macos-26-large` ⚠️ [chromium-library] › library/browsertype-connect.spec.ts:141 › launchServer › should be able to reconnect to a browser `@chromium-tip-of-tree-macos-15--headed` ⚠️ [chromium-library] › library/browsertype-connect.spec.ts:278 › launchServer › disconnected event should be emitted when browser is closed or server is closed `@chromium-tip-of-tree-macos-15--headed` ⚠️ [chromium-library] › library/browsertype-connect.spec.ts:358 › launchServer › should reject navigation when browser closes `@chromium-tip-of-tree-macos-15--headed` ⚠️ [chromium-library] › library/browsertype-connect.spec.ts:415 › launchServer › should reject waitForEvent before browser.close finishes `@chromium-tip-of-tree-macos-15--headed` ⚠️ [chromium-library] › library/browsertype-connect.spec.ts:173 › launchServer › should ignore page.pause when headed `@chromium-headed-macos-15-xlarge` ⚠️ [chromium-library] › library/browsertype-connect.spec.ts:278 › launchServer › disconnected event should be emitted when browser is closed or server is closed `@chromium-headed-macos-15-xlarge` ⚠️ [chromium-library] › library/browsertype-connect.spec.ts:616 › launchServer › should properly disconnect when connection closes from the client side `@chromium-headed-macos-15-xlarge` ⚠️ [chromium-library] › library/browsertype-connect.spec.ts:637 › launchServer › should be able to connect when the wsEndpoint is passed as an option `@chromium-headed-macos-15-xlarge` ⚠️ [chromium-library] › library/browsertype-launch.spec.ts:22 › should reject all promises when browser is closed `@chromium-headed-macos-15-xlarge` ⚠️ [chromium-library] › library/video.spec.ts:133 › screencast › should continue recording main page after popup closes `@chromium-headed-macos-15-xlarge` ⚠️ [chromium-library] › library/video.spec.ts:719 › screencast › should work with video+trace `@chromium-tip-of-tree-windows-latest` ⚠️ [chromium-library] › library/inspector/cli-codegen-python-async.spec.ts:107 › should print load/save storage_state `@chrome-ubuntu-22.04` ⚠️ [chromium-library] › library/global-fetch-cookie.spec.ts:185 › should remove cookie with negative max-age `@chromium-tip-of-tree-macos-15` ⚠️ [chromium-library] › library/inspector/cli-codegen-3.spec.ts:897 › cli codegen › should keep dialog open when clicking inside `@msedge-beta-windows-latest` ⚠️ [chromium-library] › library/video.spec.ts:476 › screencast › should capture static page in persistent context Radoslav Kirilov (@smoke) `@msedge-beta-windows-latest` ⚠️ [chromium-library] › library/selector-generator.spec.ts:121 › selector generator › should fall back to nth when name and description are both not unique `@channel-chromium-ubuntu-latest` ⚠️ [chromium-library] › library/browsertype-connect.spec.ts:141 › launchServer › should be able to reconnect to a browser `@channel-chromium-macos-latest` ⚠️ [chromium-library] › library/browsertype-connect.spec.ts:173 › launchServer › should ignore page.pause when headed `@channel-chromium-macos-latest` ⚠️ [chromium-library] › library/browsertype-connect.spec.ts:278 › launchServer › disconnected event should be emitted when browser is closed or server is closed `@channel-chromium-macos-latest` ⚠️ [chromium-library] › library/video.spec.ts:719 › screencast › should work with video+trace `@chromium-windows-latest` ⚠️ [chromium-library] › library/beforeunload.spec.ts:130 › should support dismissing the dialog multiple times `@chromium-macos-15-large` ⚠️ [chromium-library] › library/browsertype-connect.spec.ts:173 › launchServer › should ignore page.pause when headed `@chromium-macos-15-large` ⚠️ [chromium-library] › library/trace-viewer.spec.ts:195 › should filter actions by text `@chromium-macos-15-large` ⚠️ [chromium-page] › page/expect-timeout.spec.ts:114 › should not miss element that appears between retries before the deadline `@chromium-macos-15-large` ⚠️ [chromium-page] › page/page-request-continue.spec.ts:756 › propagate headers cross origin redirect after interception `@chromium-macos-15-large` ⚠️ [chromium-library] › library/video.spec.ts:647 › screencast › should capture full viewport `@chromium-macos-14-xlarge` ⚠️ [chromium-library] › library/browsercontext-user-agent.spec.ts:110 › should work for navigator.userAgentData and sec-ch-ua headers `@msedge-beta-macos-latest` ⚠️ [chromium-library] › library/browsertype-connect.spec.ts:141 › launchServer › should be able to reconnect to a browser `@msedge-dev-macos-latest` ⚠️ [chromium-library] › library/browsertype-connect.spec.ts:370 › launchServer › should reject waitForSelector when browser closes `@msedge-dev-macos-latest` ⚠️ [chromium-library] › library/browsertype-connect.spec.ts:415 › launchServer › should reject waitForEvent before browser.close finishes `@msedge-dev-macos-latest` ⚠️ [chromium-library] › library/browsertype-connect.spec.ts:616 › launchServer › should properly disconnect when connection closes from the client side `@msedge-dev-macos-latest` ⚠️ [chromium-library] › library/browsertype-connect.spec.ts:1101 › launchServer only › should be able to reconnect to a browser 12 times without warnings `@msedge-dev-macos-latest` ⚠️ [chromium-library] › library/chromium/connect-over-cdp.spec.ts:639 › should skip default overrides with noDefaults `@msedge-dev-macos-latest` ⚠️ [chromium-library] › library/browsertype-connect.spec.ts:141 › launchServer › should be able to reconnect to a browser `@chrome-beta-macos-latest` ⚠️ [chromium-library] › library/browsertype-connect.spec.ts:1101 › launchServer only › should be able to reconnect to a browser 12 times without warnings `@chrome-beta-macos-latest` ⚠️ [chromium-library] › library/video.spec.ts:647 › screencast › should capture full viewport `@chromium-macos-26-xlarge` ⚠️ [chromium-page] › page/page-mouse.spec.ts:200 › should select the text with mouse `@chromium-tip-of-tree-ubuntu-22.04--headed` ⚠️ [chromium-page] › page/page-set-input-files.spec.ts:203 › should upload large file with relative path `@chrome-macos-latest` ⚠️ [firefox-library] › library/browsercontext-basic.spec.ts:163 › should propagate default viewport to the page `@firefox-macos-26-xlarge` ⚠️ [firefox-library] › library/page-close.spec.ts:152 › should not treat navigations as new popups `@firefox-headed-macos-15-xlarge` ⚠️ [firefox-library] › library/screencast.spec.ts:55 › onFrame receives viewport size `@firefox-headed-macos-15-xlarge` ⚠️ [firefox-page] › page/page-emulate-media.spec.ts:144 › should keep reduced motion and color emulation after reload `@firefox-headed-ubuntu-24.04` ⚠️ [firefox-library] › library/inspector/cli-codegen-3.spec.ts:224 › cli codegen › should generate frame locators (4) `@firefox-beta-ubuntu-22.04` ⚠️ [firefox-library] › library/browsercontext-network-event.spec.ts:21 › BrowserContext.Events.Request `@firefox-headed-windows-latest` ⚠️ [firefox-library] › library/browsercontext-viewport.spec.ts:59 › should emulate device width `@firefox-headed-windows-latest` ⚠️ [firefox-library] › library/hit-target.spec.ts:398 › should click in iframe with padding `@firefox-headed-windows-latest` ⚠️ [firefox-library] › library/inspector/cli-codegen-csharp.spec.ts:221 › should work with --save-har in mstest `@firefox-headed-windows-latest` ⚠️ [firefox-library] › library/beforeunload.spec.ts:130 › should support dismissing the dialog multiple times `@firefox-macos-26-large` ⚠️ [firefox-library] › library/inspector/cli-codegen-csharp.spec.ts:202 › should not print context options method override in xunit if no options were passed `@firefox-macos-26-large` ⚠️ [firefox-library] › library/trace-viewer.spec.ts:195 › should filter actions by text `@firefox-macos-26-large` ⚠️ [firefox-library] › library/tracing.spec.ts:370 › should survive browser.close with auto-created traces dir `@firefox-macos-26-large` ⚠️ [firefox-page] › page/page-check.spec.ts:71 › should check the box by aria role `@firefox-macos-26-large` ⚠️ [firefox-page] › page/page-add-locator-handler.spec.ts:19 › should work `@firefox-beta-macos-latest` ⚠️ [firefox-page] › page/page-leaks.spec.ts:85 › click should not leak `@firefox-beta-macos-latest` ⚠️ [firefox-library] › library/defaultbrowsercontext-2.spec.ts:147 › should have default URL when launching browser `@firefox-macos-15-large` ⚠️ [firefox-library] › library/defaultbrowsercontext-2.spec.ts:161 › should have passed URL when launching with ignoreDefaultArgs: true `@firefox-macos-15-large` ⚠️ [firefox-library] › library/inspector/cli-codegen-1.spec.ts:817 › cli codegen › should attribute navigation to click `@firefox-macos-15-large` ⚠️ [firefox-library] › library/inspector/cli-codegen-aria.spec.ts:21 › should generate aria snapshot `@firefox-macos-15-large` ⚠️ [firefox-library] › library/inspector/cli-codegen-python-async.spec.ts:80 › should save the codegen output to a file if specified `@firefox-macos-15-large` ⚠️ [firefox-library] › library/inspector/recorder-api.spec.ts:72 › should double click `@firefox-macos-15-large` ⚠️ [firefox-library] › library/proxy.spec.ts:280 › should use socks proxy in second page `@firefox-macos-15-large` ⚠️ [firefox-library] › library/trace-viewer.spec.ts:195 › should filter actions by text `@firefox-macos-15-large` ⚠️ [firefox-page] › page/page-leaks.spec.ts:85 › click should not leak `@firefox-windows-latest` ⚠️ [webkit-library] › library/browsertype-connect.spec.ts:776 › run-server › should upload a folder `@webkit-macos-26-large` ⚠️ [webkit-library] › library/selector-generator.spec.ts:415 › selector generator › should prioritize attributes correctly › type `@webkit-macos-26-large` ⚠️ [webkit-library] › library/trace-viewer-scrub.spec.ts:158 › should update scrubber aria-valuenow `@webkit-macos-26-large` ⚠️ [webkit-library] › library/trace-viewer.spec.ts:115 › should show tracing.group in the action list with location `@webkit-macos-26-large` ⚠️ [webkit-library] › library/tracing.spec.ts:400 › should not stall on dialogs `@webkit-macos-26-large` ⚠️ [webkit-library] › library/video.spec.ts:113 › screencast › should capture static page `@webkit-macos-26-large` ⚠️ [webkit-library] › library/video.spec.ts:526 › screencast › should throw on browser close `@webkit-headed-ubuntu-24.04` ⚠️ [webkit-library] › library/inspector/cli-codegen-javascript.spec.ts:84 › should save the codegen output to a file if specified `@webkit-headed-windows-latest` ⚠️ [webkit-page] › page/elementhandle-misc.spec.ts:27 › should hover when Node is removed `@webkit-headed-ubuntu-22.04` ⚠️ [webkit-page] › page/wheel.spec.ts:135 › should set the modifiers `@webkit-macos-26-xlarge` ⚠️ [webkit-library] › library/trace-viewer.spec.ts:195 › should filter actions by text `@webkit-macos-15-large` ⚠️ [webkit-page] › page/page-request-continue.spec.ts:194 › post data › should compute content-length from post data `@webkit-macos-15-large`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
client/electron.ts,server/electron/*,server/dispatchers/electronDispatcher.ts) because the CDP-based replacement broke_electron.launch({ executablePath })for packaged apps such as VS Code (the loader can't be injected, so__playwright_electronis never set in the Node debugger context).packages/playwright-electron/andpackages/playwright-core/src/electron/.packages/protocol/spec/electron.ymland theelectroninitializer topackages/protocol/spec/playwright.yml(monolithicprotocol.ymlwas split into per-interface files in chore: split protocol.yml #40645).timezoneId,ignoreHTTPSErrors,recordVideo,recordHar,acceptDownloads,artifactsDir,bypassCSP.electronApp.close({ timeout })API), so this branch ships a clean revert with no timeout option.tests/electron/electron-options-app.jsso the migration tests added in feat(electron): move Electron API to a separate package #40184 (should set timezone via process.env.TZ,should ignore https errors via --ignore-certificate-errors switch) keep passing, and re-addsacceptDownloads: truetoshould report downloads.