patchright-core 1.55.3 → 1.56.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/install_webkit_wsl.ps1 +35 -0
- package/browsers.json +13 -13
- package/lib/browserServerImpl.js +3 -6
- package/lib/client/browser.js +0 -10
- package/lib/client/browserContext.js +2 -8
- package/lib/client/channelOwner.js +0 -7
- package/lib/client/consoleMessage.js +2 -3
- package/lib/client/electron.js +1 -1
- package/lib/client/events.js +1 -0
- package/lib/client/network.js +3 -0
- package/lib/client/page.js +13 -1
- package/lib/generated/bindingsControllerSource.js +1 -1
- package/lib/generated/injectedScriptSource.js +1 -1
- package/lib/generated/pollingRecorderSource.js +1 -1
- package/lib/generated/utilityScriptSource.js +1 -1
- package/lib/protocol/validator.js +26 -15
- package/lib/remote/playwrightServer.js +12 -14
- package/lib/server/bidi/bidiBrowser.js +54 -10
- package/lib/server/bidi/bidiChromium.js +1 -1
- package/lib/server/bidi/bidiConnection.js +31 -6
- package/lib/server/bidi/bidiExecutionContext.js +4 -4
- package/lib/server/bidi/bidiFirefox.js +16 -1
- package/lib/server/bidi/bidiNetworkManager.js +82 -16
- package/lib/server/bidi/bidiPage.js +84 -18
- package/lib/server/browserType.js +3 -3
- package/lib/server/chromium/chromium.js +1 -1
- package/lib/server/chromium/chromiumSwitches.js +3 -1
- package/lib/server/chromium/crBrowser.js +4 -34
- package/lib/server/chromium/crPage.js +22 -31
- package/lib/server/codegen/csharp.js +19 -26
- package/lib/server/codegen/java.js +4 -0
- package/lib/server/codegen/javascript.js +3 -1
- package/lib/server/codegen/python.js +2 -0
- package/lib/server/debugController.js +8 -36
- package/lib/server/deviceDescriptorsSource.json +62 -62
- package/lib/server/dispatchers/androidDispatcher.js +17 -0
- package/lib/server/dispatchers/browserContextDispatcher.js +1 -15
- package/lib/server/dispatchers/networkDispatchers.js +6 -3
- package/lib/server/dispatchers/pageDispatcher.js +24 -0
- package/lib/server/dom.js +8 -3
- package/lib/server/firefox/ffPage.js +1 -2
- package/lib/server/firefox/firefox.js +1 -1
- package/lib/server/frames.js +8 -3
- package/lib/server/har/harTracer.js +7 -8
- package/lib/server/network.js +12 -0
- package/lib/server/page.js +39 -17
- package/lib/server/recorder/chat.js +2 -2
- package/lib/server/recorder/recorderRunner.js +4 -0
- package/lib/server/registry/browserFetcher.js +3 -3
- package/lib/server/registry/index.js +27 -0
- package/lib/server/trace/recorder/snapshotter.js +13 -2
- package/lib/server/trace/recorder/snapshotterInjected.js +3 -1
- package/lib/server/utils/comparators.js +2 -2
- package/lib/server/utils/env.js +7 -2
- package/lib/server/utils/wsServer.js +2 -7
- package/lib/server/webkit/webkit.js +24 -8
- package/lib/server/webkit/wkBrowser.js +7 -3
- package/lib/server/webkit/wkPage.js +7 -8
- package/lib/server/webkit/wsl/webkit-wsl-transport-client.js +74 -0
- package/lib/server/webkit/wsl/webkit-wsl-transport-server.js +113 -0
- package/lib/utils/isomorphic/ariaSnapshot.js +12 -10
- package/lib/utils/isomorphic/protocolMetainfo.js +3 -0
- package/lib/utils/isomorphic/urlMatch.js +3 -8
- package/lib/utilsBundle.js +3 -0
- package/lib/utilsBundleImpl/index.js +80 -80
- package/lib/vite/htmlReport/index.html +37 -28
- package/lib/vite/recorder/assets/codeMirrorModule-RJCXzfmE.js +24 -0
- package/lib/vite/recorder/assets/index-Ri0uHF7I.css +1 -0
- package/lib/vite/recorder/assets/index-Y-X2TGJv.js +193 -0
- package/lib/vite/recorder/index.html +2 -2
- package/lib/vite/traceViewer/assets/codeMirrorModule-rbQPefq7.js +24 -0
- package/lib/vite/traceViewer/assets/defaultSettingsView-CLbol9XR.js +265 -0
- package/lib/vite/traceViewer/assets/xtermModule-CsJ4vdCR.js +9 -0
- package/lib/vite/traceViewer/defaultSettingsView.TQ8_7ybu.css +1 -0
- package/lib/vite/traceViewer/index.I8N9v4jT.css +1 -0
- package/lib/vite/traceViewer/index.html +4 -4
- package/lib/vite/traceViewer/index.zIVi6mN9.js +2 -0
- package/lib/vite/traceViewer/sw.bundle.js +3 -3
- package/lib/vite/traceViewer/uiMode.B_CpmIpF.js +5 -0
- package/lib/vite/traceViewer/uiMode.Btcz36p_.css +1 -0
- package/lib/vite/traceViewer/uiMode.html +4 -4
- package/lib/vite/traceViewer/{xtermModule.Beg8tuEN.css → xtermModule.DYP7pi_n.css} +1 -1
- package/package.json +2 -4
- package/types/protocol.d.ts +7084 -6870
- package/types/types.d.ts +59 -53
- package/lib/vite/recorder/assets/codeMirrorModule-DzQ0k89p.js +0 -24
- package/lib/vite/recorder/assets/index-CI4HQ-Zb.css +0 -1
- package/lib/vite/recorder/assets/index-D7C7daHH.js +0 -184
- package/lib/vite/traceViewer/assets/codeMirrorModule-DsmF_DpA.js +0 -24
- package/lib/vite/traceViewer/assets/defaultSettingsView-Cd59AFK5.js +0 -256
- package/lib/vite/traceViewer/assets/xtermModule-BoAIEibi.js +0 -9
- package/lib/vite/traceViewer/defaultSettingsView.DVJHpiGt.css +0 -1
- package/lib/vite/traceViewer/index.BFsek2M6.css +0 -1
- package/lib/vite/traceViewer/index.BivEwfRr.js +0 -2
- package/lib/vite/traceViewer/uiMode.BDvz7Y9W.js +0 -5
- package/lib/vite/traceViewer/uiMode.BatfzHMG.css +0 -1
package/types/types.d.ts
CHANGED
|
@@ -2284,6 +2284,12 @@ export interface Page {
|
|
|
2284
2284
|
runBeforeUnload?: boolean;
|
|
2285
2285
|
}): Promise<void>;
|
|
2286
2286
|
|
|
2287
|
+
/**
|
|
2288
|
+
* Returns up to (currently) 200 last console messages from this page. See
|
|
2289
|
+
* [page.on('console')](https://playwright.dev/docs/api/class-page#page-event-console) for more details.
|
|
2290
|
+
*/
|
|
2291
|
+
consoleMessages(): Promise<Array<ConsoleMessage>>;
|
|
2292
|
+
|
|
2287
2293
|
/**
|
|
2288
2294
|
* Gets the full HTML contents of the page, including the doctype.
|
|
2289
2295
|
*/
|
|
@@ -3598,6 +3604,12 @@ export interface Page {
|
|
|
3598
3604
|
*/
|
|
3599
3605
|
opener(): Promise<null|Page>;
|
|
3600
3606
|
|
|
3607
|
+
/**
|
|
3608
|
+
* Returns up to (currently) 200 last page errors from this page. See
|
|
3609
|
+
* [page.on('pageerror')](https://playwright.dev/docs/api/class-page#page-event-page-error) for more details.
|
|
3610
|
+
*/
|
|
3611
|
+
pageErrors(): Promise<Array<Error>>;
|
|
3612
|
+
|
|
3601
3613
|
/**
|
|
3602
3614
|
* Pauses script execution. Playwright will stop executing the script and wait for the user to either press the
|
|
3603
3615
|
* 'Resume' button in the page overlay or to call `playwright.resume()` in the DevTools console.
|
|
@@ -3914,6 +3926,21 @@ export interface Page {
|
|
|
3914
3926
|
*/
|
|
3915
3927
|
requestGC(): Promise<void>;
|
|
3916
3928
|
|
|
3929
|
+
/**
|
|
3930
|
+
* Returns up to (currently) 100 last network request from this page. See
|
|
3931
|
+
* [page.on('request')](https://playwright.dev/docs/api/class-page#page-event-request) for more details.
|
|
3932
|
+
*
|
|
3933
|
+
* Returned requests should be accessed immediately, otherwise they might be collected to prevent unbounded memory
|
|
3934
|
+
* growth as new requests come in. Once collected, retrieving most information about the request is impossible.
|
|
3935
|
+
*
|
|
3936
|
+
* Note that requests reported through the
|
|
3937
|
+
* [page.on('request')](https://playwright.dev/docs/api/class-page#page-event-request) request are not collected, so
|
|
3938
|
+
* there is a trade off between efficient memory usage with
|
|
3939
|
+
* [page.requests()](https://playwright.dev/docs/api/class-page#page-requests) and the amount of available information
|
|
3940
|
+
* reported through [page.on('request')](https://playwright.dev/docs/api/class-page#page-event-request).
|
|
3941
|
+
*/
|
|
3942
|
+
requests(): Promise<Array<Request>>;
|
|
3943
|
+
|
|
3917
3944
|
/**
|
|
3918
3945
|
* Routing provides the capability to modify network requests that are made by a page.
|
|
3919
3946
|
*
|
|
@@ -8181,14 +8208,7 @@ export interface BrowserContext {
|
|
|
8181
8208
|
behavior?: 'wait'|'ignoreErrors'|'default'
|
|
8182
8209
|
}): Promise<void>;
|
|
8183
8210
|
/**
|
|
8184
|
-
*
|
|
8185
|
-
*
|
|
8186
|
-
* Emitted when new background page is created in the context.
|
|
8187
|
-
*
|
|
8188
|
-
* ```js
|
|
8189
|
-
* const backgroundPage = await context.waitForEvent('backgroundpage');
|
|
8190
|
-
* ```
|
|
8191
|
-
*
|
|
8211
|
+
* This event is not emitted.
|
|
8192
8212
|
*/
|
|
8193
8213
|
on(event: 'backgroundpage', listener: (page: Page) => any): this;
|
|
8194
8214
|
|
|
@@ -8380,14 +8400,7 @@ export interface BrowserContext {
|
|
|
8380
8400
|
once(event: 'weberror', listener: (webError: WebError) => any): this;
|
|
8381
8401
|
|
|
8382
8402
|
/**
|
|
8383
|
-
*
|
|
8384
|
-
*
|
|
8385
|
-
* Emitted when new background page is created in the context.
|
|
8386
|
-
*
|
|
8387
|
-
* ```js
|
|
8388
|
-
* const backgroundPage = await context.waitForEvent('backgroundpage');
|
|
8389
|
-
* ```
|
|
8390
|
-
*
|
|
8403
|
+
* This event is not emitted.
|
|
8391
8404
|
*/
|
|
8392
8405
|
addListener(event: 'backgroundpage', listener: (page: Page) => any): this;
|
|
8393
8406
|
|
|
@@ -8634,14 +8647,7 @@ export interface BrowserContext {
|
|
|
8634
8647
|
off(event: 'weberror', listener: (webError: WebError) => any): this;
|
|
8635
8648
|
|
|
8636
8649
|
/**
|
|
8637
|
-
*
|
|
8638
|
-
*
|
|
8639
|
-
* Emitted when new background page is created in the context.
|
|
8640
|
-
*
|
|
8641
|
-
* ```js
|
|
8642
|
-
* const backgroundPage = await context.waitForEvent('backgroundpage');
|
|
8643
|
-
* ```
|
|
8644
|
-
*
|
|
8650
|
+
* This event is not emitted.
|
|
8645
8651
|
*/
|
|
8646
8652
|
prependListener(event: 'backgroundpage', listener: (page: Page) => any): this;
|
|
8647
8653
|
|
|
@@ -8840,9 +8846,8 @@ export interface BrowserContext {
|
|
|
8840
8846
|
}>): Promise<void>;
|
|
8841
8847
|
|
|
8842
8848
|
/**
|
|
8843
|
-
*
|
|
8844
|
-
*
|
|
8845
|
-
* All existing background pages in the context.
|
|
8849
|
+
* Returns an empty list.
|
|
8850
|
+
* @deprecated Background pages have been removed from Chromium together with Manifest V2 extensions.
|
|
8846
8851
|
*/
|
|
8847
8852
|
backgroundPages(): Array<Page>;
|
|
8848
8853
|
|
|
@@ -8986,6 +8991,8 @@ export interface BrowserContext {
|
|
|
8986
8991
|
* - `'clipboard-write'`
|
|
8987
8992
|
* - `'geolocation'`
|
|
8988
8993
|
* - `'gyroscope'`
|
|
8994
|
+
* - `'local-fonts'`
|
|
8995
|
+
* - `'local-network-access'`
|
|
8989
8996
|
* - `'magnetometer'`
|
|
8990
8997
|
* - `'microphone'`
|
|
8991
8998
|
* - `'midi-sysex'` (system-exclusive midi)
|
|
@@ -8993,7 +9000,6 @@ export interface BrowserContext {
|
|
|
8993
9000
|
* - `'notifications'`
|
|
8994
9001
|
* - `'payment-handler'`
|
|
8995
9002
|
* - `'storage-access'`
|
|
8996
|
-
* - `'local-fonts'`
|
|
8997
9003
|
* @param options
|
|
8998
9004
|
*/
|
|
8999
9005
|
grantPermissions(permissions: ReadonlyArray<string>, options?: {
|
|
@@ -9359,14 +9365,7 @@ export interface BrowserContext {
|
|
|
9359
9365
|
}): Promise<void>;
|
|
9360
9366
|
|
|
9361
9367
|
/**
|
|
9362
|
-
*
|
|
9363
|
-
*
|
|
9364
|
-
* Emitted when new background page is created in the context.
|
|
9365
|
-
*
|
|
9366
|
-
* ```js
|
|
9367
|
-
* const backgroundPage = await context.waitForEvent('backgroundpage');
|
|
9368
|
-
* ```
|
|
9369
|
-
*
|
|
9368
|
+
* This event is not emitted.
|
|
9370
9369
|
*/
|
|
9371
9370
|
waitForEvent(event: 'backgroundpage', optionsOrPredicate?: { predicate?: (page: Page) => boolean | Promise<boolean>, timeout?: number } | ((page: Page) => boolean | Promise<boolean>)): Promise<Page>;
|
|
9372
9371
|
|
|
@@ -14918,10 +14917,7 @@ export interface BrowserType<Unused = {}> {
|
|
|
14918
14917
|
*/
|
|
14919
14918
|
downloadsPath?: string;
|
|
14920
14919
|
|
|
14921
|
-
|
|
14922
|
-
* Specify environment variables that will be visible to the browser. Defaults to `process.env`.
|
|
14923
|
-
*/
|
|
14924
|
-
env?: { [key: string]: string|number|boolean; };
|
|
14920
|
+
env?: { [key: string]: string|undefined; };
|
|
14925
14921
|
|
|
14926
14922
|
/**
|
|
14927
14923
|
* Path to a browser executable to run instead of the bundled one. If
|
|
@@ -15351,10 +15347,7 @@ export interface BrowserType<Unused = {}> {
|
|
|
15351
15347
|
*/
|
|
15352
15348
|
downloadsPath?: string;
|
|
15353
15349
|
|
|
15354
|
-
|
|
15355
|
-
* Specify environment variables that will be visible to the browser. Defaults to `process.env`.
|
|
15356
|
-
*/
|
|
15357
|
-
env?: { [key: string]: string|number|boolean; };
|
|
15350
|
+
env?: { [key: string]: string|undefined; };
|
|
15358
15351
|
|
|
15359
15352
|
/**
|
|
15360
15353
|
* Path to a browser executable to run instead of the bundled one. If
|
|
@@ -16235,18 +16228,16 @@ export type AndroidKey =
|
|
|
16235
16228
|
'Home' |
|
|
16236
16229
|
'Back' |
|
|
16237
16230
|
'Call' | 'EndCall' |
|
|
16238
|
-
'0' |
|
|
16239
|
-
'Star' | '
|
|
16231
|
+
'0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' |
|
|
16232
|
+
'Star' | '*' | 'Pound' | '#' |
|
|
16240
16233
|
'DialUp' | 'DialDown' | 'DialLeft' | 'DialRight' | 'DialCenter' |
|
|
16241
16234
|
'VolumeUp' | 'VolumeDown' |
|
|
16242
|
-
'ChannelUp' | 'ChannelDown' |
|
|
16243
16235
|
'Power' |
|
|
16244
16236
|
'Camera' |
|
|
16245
16237
|
'Clear' |
|
|
16246
16238
|
'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' |
|
|
16247
16239
|
'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z' |
|
|
16248
|
-
'Comma' | ',' |
|
|
16249
|
-
'Period' | '.' |
|
|
16240
|
+
'Comma' | ',' | 'Period' | '.' |
|
|
16250
16241
|
'AltLeft' | 'AltRight' |
|
|
16251
16242
|
'ShiftLeft' | 'ShiftRight' |
|
|
16252
16243
|
'Tab' | '\t' |
|
|
@@ -16274,8 +16265,26 @@ export type AndroidKey =
|
|
|
16274
16265
|
'Notification' |
|
|
16275
16266
|
'Search' |
|
|
16276
16267
|
'RecentApps' |
|
|
16268
|
+
'MediaPlayPause' |
|
|
16269
|
+
'MediaStop' |
|
|
16270
|
+
'MediaNext' |
|
|
16271
|
+
'MediaPrevious' |
|
|
16272
|
+
'MediaRewind' |
|
|
16273
|
+
'MediaFastForward' |
|
|
16274
|
+
'MediaPlay' |
|
|
16275
|
+
'MediaPause' |
|
|
16276
|
+
'MediaClose' |
|
|
16277
|
+
'MediaEject' |
|
|
16278
|
+
'MediaRecord' |
|
|
16279
|
+
'ChannelUp' | 'ChannelDown' |
|
|
16277
16280
|
'AppSwitch' |
|
|
16278
16281
|
'Assist' |
|
|
16282
|
+
'MediaAudioTrack' |
|
|
16283
|
+
'MediaTopMenu' |
|
|
16284
|
+
'MediaSkipForward' |
|
|
16285
|
+
'MediaSkipBackward' |
|
|
16286
|
+
'MediaStepForward' |
|
|
16287
|
+
'MediaStepBackward' |
|
|
16279
16288
|
'Cut' |
|
|
16280
16289
|
'Copy' |
|
|
16281
16290
|
'Paste';
|
|
@@ -21766,10 +21775,7 @@ export interface LaunchOptions {
|
|
|
21766
21775
|
*/
|
|
21767
21776
|
downloadsPath?: string;
|
|
21768
21777
|
|
|
21769
|
-
|
|
21770
|
-
* Specify environment variables that will be visible to the browser. Defaults to `process.env`.
|
|
21771
|
-
*/
|
|
21772
|
-
env?: { [key: string]: string|number|boolean; };
|
|
21778
|
+
env?: { [key: string]: string|undefined; };
|
|
21773
21779
|
|
|
21774
21780
|
/**
|
|
21775
21781
|
* Path to a browser executable to run instead of the bundled one. If
|