Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@
* since: v1.9
* langs: js

Playwright has **experimental** support for Electron automation. You can access electron namespace via:
Playwright has **experimental** support for Electron automation, shipped as a
separate package:

```js
const { _electron } = require('playwright');
```sh
npm i -D @playwright/experimental-electron
```

An example of the Electron automation script would be:

```js
const { _electron: electron } = require('playwright');
import { electron } from '@playwright/experimental-electron';

(async () => {
// Launch Electron app.
Expand Down Expand Up @@ -89,59 +90,5 @@ Specifies environment variables that will be visible to Electron. Defaults to `p

Maximum time in milliseconds to wait for the application to start. Defaults to `30000` (30 seconds). Pass `0` to disable timeout.

### option: Electron.launch.acceptdownloads = %%-context-option-acceptdownloads-%%
* since: v1.12

### option: Electron.launch.bypassCSP = %%-context-option-bypasscsp-%%
* since: v1.12

### option: Electron.launch.colorScheme = %%-context-option-colorscheme-%%
* since: v1.12

### option: Electron.launch.extraHTTPHeaders = %%-context-option-extrahttpheaders-%%
* since: v1.12

### option: Electron.launch.geolocation = %%-context-option-geolocation-%%
* since: v1.12

### option: Electron.launch.httpcredentials = %%-context-option-httpcredentials-%%
* since: v1.12

### option: Electron.launch.ignoreHTTPSErrors = %%-context-option-ignorehttpserrors-%%
* since: v1.12

### option: Electron.launch.locale = %%-context-option-locale-%%
* since: v1.12

### option: Electron.launch.offline = %%-context-option-offline-%%
* since: v1.12

### option: Electron.launch.recordhar = %%-context-option-recordhar-%%
* since: v1.12

### option: Electron.launch.recordharpath = %%-context-option-recordhar-path-%%
* since: v1.12

### option: Electron.launch.recordHarOmitContent = %%-context-option-recordhar-omit-content-%%
* since: v1.12

### option: Electron.launch.recordvideo = %%-context-option-recordvideo-%%
* since: v1.12

### option: Electron.launch.recordvideodir = %%-context-option-recordvideo-dir-%%
* since: v1.12

### option: Electron.launch.recordvideosize = %%-context-option-recordvideo-size-%%
* since: v1.12

### option: Electron.launch.timezoneId = %%-context-option-timezoneid-%%
* since: v1.12

### option: Electron.launch.tracesDir = %%-browser-option-tracesdir-%%
* since: v1.36

### option: Electron.launch.artifactsDir = %%-browser-option-artifactsdir-%%
* since: v1.59

### option: Electron.launch.chromiumSandbox = %%-browser-option-chromiumsandbox-%%
* since: v1.59
15 changes: 15 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions packages/isomorphic/protocolMetainfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ export const methodMetainfo = new Map<string, MethodMetainfo>([
['Worker.waitForEventInfo', { title: 'Wait for event "{info.event}"', snapshot: true, }],
['WebSocket.waitForEventInfo', { title: 'Wait for event "{info.event}"', snapshot: true, }],
['Debugger.waitForEventInfo', { title: 'Wait for event "{info.event}"', snapshot: true, }],
['ElectronApplication.waitForEventInfo', { title: 'Wait for event "{info.event}"', snapshot: true, }],
['AndroidDevice.waitForEventInfo', { title: 'Wait for event "{info.event}"', snapshot: true, }],
['BrowserContext.addCookies', { title: 'Add cookies', group: 'configuration', }],
['BrowserContext.addInitScript', { title: 'Add init script', group: 'configuration', }],
Expand Down Expand Up @@ -304,11 +303,6 @@ export const methodMetainfo = new Map<string, MethodMetainfo>([
['WritableStream.close', { internal: true, }],
['CDPSession.send', { title: 'Send CDP command', group: 'configuration', }],
['CDPSession.detach', { title: 'Detach CDP session', group: 'configuration', }],
['Electron.launch', { title: 'Launch electron', }],
['ElectronApplication.browserWindow', { internal: true, }],
['ElectronApplication.evaluateExpression', { title: 'Evaluate', }],
['ElectronApplication.evaluateExpressionHandle', { title: 'Evaluate', }],
['ElectronApplication.updateSubscription', { internal: true, }],
['Android.devices', { internal: true, }],
['AndroidSocket.write', { internal: true, }],
['AndroidSocket.close', { internal: true, }],
Expand Down
Loading
Loading