patchright-core 1.52.4 → 1.55.0
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/ThirdPartyNotices.txt +65 -123
- package/bin/reinstall_chrome_beta_mac.sh +1 -1
- package/bin/reinstall_chrome_stable_mac.sh +1 -1
- package/bin/reinstall_msedge_beta_mac.sh +1 -1
- package/bin/reinstall_msedge_dev_mac.sh +1 -1
- package/bin/reinstall_msedge_stable_mac.sh +1 -1
- package/browsers.json +14 -14
- package/index.js +1 -1
- package/lib/androidServerImpl.js +4 -2
- package/lib/browserServerImpl.js +47 -12
- package/lib/cli/program.js +116 -50
- package/lib/cli/programWithTestStub.js +1 -1
- package/lib/client/android.js +30 -34
- package/lib/client/browser.js +54 -17
- package/lib/client/browserContext.js +67 -71
- package/lib/client/browserType.js +25 -34
- package/lib/client/channelOwner.js +20 -24
- package/lib/client/connection.js +6 -10
- package/lib/client/electron.js +8 -3
- package/lib/client/elementHandle.js +18 -21
- package/lib/client/fetch.js +5 -3
- package/lib/client/frame.js +57 -35
- package/lib/client/input.js +3 -1
- package/lib/client/jsHandle.js +4 -0
- package/lib/client/localUtils.js +0 -1
- package/lib/client/locator.js +32 -28
- package/lib/client/network.js +5 -12
- package/lib/client/page.js +32 -32
- package/lib/client/playwright.js +6 -16
- package/lib/client/selectors.js +18 -38
- package/lib/client/timeoutSettings.js +12 -8
- package/lib/client/tracing.js +24 -20
- package/lib/client/waiter.js +2 -2
- package/lib/client/webSocket.js +4 -22
- package/lib/generated/bindingsControllerSource.js +28 -0
- package/lib/generated/clockSource.js +1 -1
- package/lib/generated/injectedScriptSource.js +1 -1
- package/lib/generated/pollingRecorderSource.js +1 -1
- package/lib/generated/storageScriptSource.js +28 -0
- package/lib/generated/utilityScriptSource.js +1 -1
- package/lib/generated/webSocketMockSource.js +12 -50
- package/lib/inProcessFactory.js +9 -6
- package/lib/outofprocess.js +0 -2
- package/lib/protocol/validator.js +423 -346
- package/lib/protocol/validatorPrimitives.js +18 -4
- package/lib/remote/playwrightConnection.js +29 -166
- package/lib/remote/playwrightServer.js +233 -35
- package/lib/server/android/android.js +97 -83
- package/lib/server/android/backendAdb.js +0 -2
- package/lib/server/bidi/bidiBrowser.js +139 -73
- package/lib/server/bidi/bidiChromium.js +23 -22
- package/lib/server/bidi/bidiExecutionContext.js +2 -1
- package/lib/server/bidi/bidiFirefox.js +17 -14
- package/lib/server/bidi/bidiInput.js +22 -22
- package/lib/server/bidi/bidiNetworkManager.js +8 -11
- package/lib/server/bidi/bidiPage.js +42 -86
- package/lib/server/bidi/third_party/bidiProtocol.js +5 -133
- package/lib/server/bidi/third_party/bidiProtocolCore.js +179 -0
- package/lib/server/{dispatchers/selectorsDispatcher.js → bidi/third_party/bidiProtocolPermissions.js} +20 -18
- package/lib/server/browser.js +30 -21
- package/lib/server/browserContext.js +203 -165
- package/lib/server/browserType.js +109 -107
- package/lib/server/chromium/chromium.js +84 -69
- package/lib/server/chromium/chromiumSwitches.js +13 -20
- package/lib/server/chromium/crBrowser.js +74 -40
- package/lib/server/chromium/crConnection.js +8 -9
- package/lib/server/chromium/crCoverage.js +11 -8
- package/lib/server/chromium/crDragDrop.js +25 -20
- package/lib/server/chromium/crExecutionContext.js +2 -1
- package/lib/server/chromium/crInput.js +32 -29
- package/lib/server/chromium/crNetworkManager.js +45 -33
- package/lib/server/chromium/crPage.js +98 -73
- package/lib/server/chromium/crServiceWorker.js +13 -18
- package/lib/server/chromium/videoRecorder.js +10 -18
- package/lib/server/clock.js +51 -39
- package/lib/server/codegen/csharp.js +10 -5
- package/lib/server/codegen/java.js +1 -1
- package/lib/server/codegen/javascript.js +1 -1
- package/lib/server/codegen/jsonl.js +2 -1
- package/lib/server/codegen/language.js +22 -1
- package/lib/server/codegen/languages.js +4 -4
- package/lib/server/codegen/python.js +1 -1
- package/lib/server/cookieStore.js +3 -1
- package/lib/server/debugController.js +105 -71
- package/lib/server/debugger.js +6 -23
- package/lib/server/deviceDescriptorsSource.json +237 -127
- package/lib/server/dialog.js +50 -6
- package/lib/server/dispatchers/androidDispatcher.js +77 -62
- package/lib/server/dispatchers/artifactDispatcher.js +18 -18
- package/lib/server/dispatchers/browserContextDispatcher.js +141 -91
- package/lib/server/dispatchers/browserDispatcher.js +55 -88
- package/lib/server/dispatchers/browserTypeDispatcher.js +18 -9
- package/lib/server/dispatchers/cdpSessionDispatcher.js +4 -4
- package/lib/server/dispatchers/debugControllerDispatcher.js +12 -21
- package/lib/server/dispatchers/dialogDispatcher.js +4 -4
- package/lib/server/dispatchers/dispatcher.js +78 -53
- package/lib/server/dispatchers/electronDispatcher.js +19 -20
- package/lib/server/dispatchers/elementHandlerDispatcher.js +83 -93
- package/lib/server/dispatchers/frameDispatcher.js +99 -102
- package/lib/server/dispatchers/jsHandleDispatcher.js +21 -16
- package/lib/server/dispatchers/jsonPipeDispatcher.js +4 -4
- package/lib/server/dispatchers/localUtilsDispatcher.js +53 -59
- package/lib/server/dispatchers/networkDispatchers.js +41 -35
- package/lib/server/dispatchers/pageDispatcher.js +156 -107
- package/lib/server/dispatchers/playwrightDispatcher.js +37 -25
- package/lib/server/dispatchers/streamDispatcher.js +15 -8
- package/lib/server/dispatchers/tracingDispatcher.js +22 -13
- package/lib/server/dispatchers/webSocketRouteDispatcher.js +46 -35
- package/lib/server/dispatchers/writableStreamDispatcher.js +16 -10
- package/lib/server/dom.js +198 -266
- package/lib/server/download.js +3 -3
- package/lib/server/electron/electron.js +96 -103
- package/lib/server/electron/loader.js +1 -1
- package/lib/server/fetch.js +22 -41
- package/lib/server/fileUploadUtils.js +1 -1
- package/lib/server/firefox/ffBrowser.js +79 -55
- package/lib/server/firefox/ffExecutionContext.js +2 -1
- package/lib/server/firefox/ffInput.js +23 -23
- package/lib/server/firefox/ffNetworkManager.js +8 -6
- package/lib/server/firefox/ffPage.js +39 -36
- package/lib/server/firefox/firefox.js +9 -10
- package/lib/server/frameSelectors.js +65 -22
- package/lib/server/frames.js +516 -544
- package/lib/server/har/harRecorder.js +1 -1
- package/lib/server/har/harTracer.js +4 -2
- package/lib/server/helper.js +3 -7
- package/lib/server/index.js +0 -3
- package/lib/server/input.js +47 -54
- package/lib/server/instrumentation.js +8 -14
- package/lib/server/javascript.js +9 -17
- package/lib/server/launchApp.js +48 -30
- package/lib/server/localUtils.js +45 -38
- package/lib/server/network.js +44 -10
- package/lib/server/page.js +233 -178
- package/lib/server/pageBinding.js +6 -7
- package/lib/server/playwright.js +4 -14
- package/lib/server/progress.js +57 -49
- package/lib/server/recorder/recorderApp.js +298 -95
- package/lib/server/recorder/recorderRunner.js +23 -24
- package/lib/server/recorder/recorderSignalProcessor.js +83 -0
- package/lib/server/recorder/recorderUtils.js +67 -10
- package/lib/server/recorder.js +284 -146
- package/lib/server/registry/index.js +83 -48
- package/lib/server/registry/nativeDeps.js +175 -0
- package/lib/server/registry/oopDownloadBrowserMain.js +1 -1
- package/lib/server/screenshotter.js +84 -83
- package/lib/server/selectors.js +12 -12
- package/lib/server/socksClientCertificatesInterceptor.js +198 -136
- package/lib/server/trace/recorder/snapshotter.js +12 -19
- package/lib/server/trace/recorder/tracing.js +36 -27
- package/lib/server/trace/viewer/traceViewer.js +11 -20
- package/lib/server/transport.js +20 -22
- package/lib/server/utils/comparators.js +2 -2
- package/lib/server/utils/debug.js +3 -8
- package/lib/server/utils/debugLogger.js +8 -0
- package/lib/server/utils/hostPlatform.js +3 -1
- package/lib/server/utils/network.js +35 -25
- package/lib/server/utils/nodePlatform.js +1 -1
- package/lib/server/utils/processLauncher.js +4 -1
- package/lib/server/utils/wsServer.js +11 -17
- package/lib/server/webkit/webkit.js +5 -2
- package/lib/server/webkit/wkBrowser.js +51 -28
- package/lib/server/webkit/wkExecutionContext.js +2 -1
- package/lib/server/webkit/wkInput.js +25 -25
- package/lib/server/webkit/wkInterceptableRequest.js +1 -1
- package/lib/server/webkit/wkPage.js +80 -59
- package/lib/server/webkit/wkProvisionalPage.js +1 -1
- package/lib/server/webkit/wkWorkers.js +7 -7
- package/lib/utils/isomorphic/ariaSnapshot.js +13 -7
- package/lib/utils/isomorphic/cssParser.js +1 -2
- package/lib/utils/isomorphic/locatorGenerators.js +18 -0
- package/lib/utils/isomorphic/manualPromise.js +1 -2
- package/lib/utils/isomorphic/mimeType.js +1 -2
- package/lib/utils/isomorphic/multimap.js +1 -2
- package/lib/utils/isomorphic/oldUtilityScriptSerializers.js +248 -0
- package/lib/utils/isomorphic/protocolFormatter.js +78 -0
- package/lib/utils/isomorphic/protocolMetainfo.js +318 -0
- package/lib/utils/isomorphic/selectorParser.js +3 -4
- package/lib/utils/isomorphic/stringUtils.js +3 -24
- package/lib/utils/isomorphic/time.js +9 -4
- package/lib/utils/isomorphic/timeoutRunner.js +3 -4
- package/lib/utils/isomorphic/traceUtils.js +2 -3
- package/lib/utils/isomorphic/urlMatch.js +21 -7
- package/lib/utils/isomorphic/utilityScriptSerializers.js +208 -205
- package/lib/utils.js +8 -2
- package/lib/utilsBundleImpl/index.js +160 -150
- package/lib/vite/htmlReport/index.html +17 -17
- package/lib/vite/recorder/assets/{codeMirrorModule-CXVeovup.js → codeMirrorModule-DzQ0k89p.js} +1 -1
- package/lib/vite/recorder/assets/{index-eHBmevrY.css → index-CI4HQ-Zb.css} +1 -1
- package/lib/vite/recorder/assets/index-D7C7daHH.js +184 -0
- package/lib/vite/recorder/index.html +3 -3
- package/lib/vite/traceViewer/assets/{codeMirrorModule-_GLjJL-7.js → codeMirrorModule-Di48jgWx.js} +1 -1
- package/lib/vite/traceViewer/assets/defaultSettingsView-szBn8781.js +256 -0
- package/lib/vite/traceViewer/defaultSettingsView.DVJHpiGt.css +1 -0
- package/lib/vite/traceViewer/index.BFsek2M6.css +1 -0
- package/lib/vite/traceViewer/index.DQvXoPLL.js +2 -0
- package/lib/vite/traceViewer/index.html +6 -6
- package/lib/vite/traceViewer/sw.bundle.js +3 -3
- package/lib/vite/traceViewer/uiMode.dBV3oN9h.js +5 -0
- package/lib/vite/traceViewer/uiMode.html +4 -4
- package/lib/zipBundleImpl.js +4 -4
- package/package.json +1 -1
- package/types/protocol.d.ts +712 -107
- package/types/types.d.ts +148 -37
- package/lib/generated/consoleApiSource.js +0 -28
- package/lib/protocol/debug.js +0 -211
- package/lib/server/recorder/contextRecorder.js +0 -286
- package/lib/server/recorder/recorderCollection.js +0 -116
- package/lib/server/recorder/recorderFrontend.js +0 -16
- package/lib/server/storageScript.js +0 -154
- package/lib/server/timeoutSettings.js +0 -89
- package/lib/utils/isomorphic/builtins.js +0 -86
- package/lib/vite/recorder/assets/index-BsWQsSGl.js +0 -184
- package/lib/vite/traceViewer/assets/defaultSettingsView-DtCQiGHe.js +0 -265
- package/lib/vite/traceViewer/defaultSettingsView.QdHITyLI.css +0 -1
- package/lib/vite/traceViewer/index.CFOW-Ezb.css +0 -1
- package/lib/vite/traceViewer/index.cFZzK9RN.js +0 -2
- package/lib/vite/traceViewer/uiMode.XVPIqBeS.js +0 -5
package/types/types.d.ts
CHANGED
|
@@ -121,7 +121,7 @@ export interface Page {
|
|
|
121
121
|
* @param arg Optional argument to pass to
|
|
122
122
|
* [`pageFunction`](https://playwright.dev/docs/api/class-page#page-evaluate-option-expression).
|
|
123
123
|
*/
|
|
124
|
-
evaluate<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg): Promise<R>;
|
|
124
|
+
evaluate<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg, isolatedContext?: boolean): Promise<R>;
|
|
125
125
|
/**
|
|
126
126
|
* Returns the value of the
|
|
127
127
|
* [`pageFunction`](https://playwright.dev/docs/api/class-page#page-evaluate-option-expression) invocation.
|
|
@@ -172,7 +172,7 @@ export interface Page {
|
|
|
172
172
|
* @param arg Optional argument to pass to
|
|
173
173
|
* [`pageFunction`](https://playwright.dev/docs/api/class-page#page-evaluate-option-expression).
|
|
174
174
|
*/
|
|
175
|
-
evaluate<R>(pageFunction: PageFunction<void, R>, arg?: any): Promise<R>;
|
|
175
|
+
evaluate<R>(pageFunction: PageFunction<void, R>, arg?: any, isolatedContext?: boolean): Promise<R>;
|
|
176
176
|
|
|
177
177
|
/**
|
|
178
178
|
* Returns the value of the
|
|
@@ -218,7 +218,7 @@ export interface Page {
|
|
|
218
218
|
* @param arg Optional argument to pass to
|
|
219
219
|
* [`pageFunction`](https://playwright.dev/docs/api/class-page#page-evaluate-handle-option-expression).
|
|
220
220
|
*/
|
|
221
|
-
evaluateHandle<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg): Promise<SmartHandle<R>>;
|
|
221
|
+
evaluateHandle<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg, isolatedContext?: boolean): Promise<SmartHandle<R>>;
|
|
222
222
|
/**
|
|
223
223
|
* Returns the value of the
|
|
224
224
|
* [`pageFunction`](https://playwright.dev/docs/api/class-page#page-evaluate-handle-option-expression) invocation as a
|
|
@@ -263,7 +263,7 @@ export interface Page {
|
|
|
263
263
|
* @param arg Optional argument to pass to
|
|
264
264
|
* [`pageFunction`](https://playwright.dev/docs/api/class-page#page-evaluate-handle-option-expression).
|
|
265
265
|
*/
|
|
266
|
-
evaluateHandle<R>(pageFunction: PageFunction<void, R>, arg?: any): Promise<SmartHandle<R>>;
|
|
266
|
+
evaluateHandle<R>(pageFunction: PageFunction<void, R>, arg?: any, isolatedContext?: boolean): Promise<SmartHandle<R>>;
|
|
267
267
|
|
|
268
268
|
/**
|
|
269
269
|
* Adds a script which would be evaluated in one of the following scenarios:
|
|
@@ -3599,8 +3599,8 @@ export interface Page {
|
|
|
3599
3599
|
opener(): Promise<null|Page>;
|
|
3600
3600
|
|
|
3601
3601
|
/**
|
|
3602
|
-
* Pauses script execution. Playwright will stop executing the script and wait for the user to either press
|
|
3603
|
-
* button in the page overlay or to call `playwright.resume()` in the DevTools console.
|
|
3602
|
+
* Pauses script execution. Playwright will stop executing the script and wait for the user to either press the
|
|
3603
|
+
* 'Resume' button in the page overlay or to call `playwright.resume()` in the DevTools console.
|
|
3604
3604
|
*
|
|
3605
3605
|
* User can inspect selectors or perform manual steps while paused. Resume will continue running the original script
|
|
3606
3606
|
* from the place it was paused.
|
|
@@ -5260,7 +5260,7 @@ export interface Frame {
|
|
|
5260
5260
|
* @param arg Optional argument to pass to
|
|
5261
5261
|
* [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-evaluate-option-expression).
|
|
5262
5262
|
*/
|
|
5263
|
-
evaluate<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg): Promise<R>;
|
|
5263
|
+
evaluate<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg, isolatedContext?: boolean): Promise<R>;
|
|
5264
5264
|
/**
|
|
5265
5265
|
* Returns the return value of
|
|
5266
5266
|
* [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-evaluate-option-expression).
|
|
@@ -5307,7 +5307,7 @@ export interface Frame {
|
|
|
5307
5307
|
* @param arg Optional argument to pass to
|
|
5308
5308
|
* [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-evaluate-option-expression).
|
|
5309
5309
|
*/
|
|
5310
|
-
evaluate<R>(pageFunction: PageFunction<void, R>, arg?: any): Promise<R>;
|
|
5310
|
+
evaluate<R>(pageFunction: PageFunction<void, R>, arg?: any, isolatedContext?: boolean): Promise<R>;
|
|
5311
5311
|
|
|
5312
5312
|
/**
|
|
5313
5313
|
* Returns the return value of
|
|
@@ -5355,7 +5355,7 @@ export interface Frame {
|
|
|
5355
5355
|
* @param arg Optional argument to pass to
|
|
5356
5356
|
* [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle-option-expression).
|
|
5357
5357
|
*/
|
|
5358
|
-
evaluateHandle<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg): Promise<SmartHandle<R>>;
|
|
5358
|
+
evaluateHandle<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg, isolatedContext?: boolean): Promise<SmartHandle<R>>;
|
|
5359
5359
|
/**
|
|
5360
5360
|
* Returns the return value of
|
|
5361
5361
|
* [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle-option-expression) as a
|
|
@@ -5402,7 +5402,7 @@ export interface Frame {
|
|
|
5402
5402
|
* @param arg Optional argument to pass to
|
|
5403
5403
|
* [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle-option-expression).
|
|
5404
5404
|
*/
|
|
5405
|
-
evaluateHandle<R>(pageFunction: PageFunction<void, R>, arg?: any): Promise<SmartHandle<R>>;
|
|
5405
|
+
evaluateHandle<R>(pageFunction: PageFunction<void, R>, arg?: any, isolatedContext?: boolean): Promise<SmartHandle<R>>;
|
|
5406
5406
|
|
|
5407
5407
|
/**
|
|
5408
5408
|
* **NOTE** Use locator-based [frame.locator(selector[, options])](https://playwright.dev/docs/api/class-frame#frame-locator)
|
|
@@ -8830,6 +8830,13 @@ export interface BrowserContext {
|
|
|
8830
8830
|
* Optional.
|
|
8831
8831
|
*/
|
|
8832
8832
|
sameSite?: "Strict"|"Lax"|"None";
|
|
8833
|
+
|
|
8834
|
+
/**
|
|
8835
|
+
* For partitioned third-party cookies (aka
|
|
8836
|
+
* [CHIPS](https://developer.mozilla.org/en-US/docs/Web/Privacy/Guides/Privacy_sandbox/Partitioned_cookies)), the
|
|
8837
|
+
* partition key. Optional.
|
|
8838
|
+
*/
|
|
8839
|
+
partitionKey?: string;
|
|
8833
8840
|
}>): Promise<void>;
|
|
8834
8841
|
|
|
8835
8842
|
/**
|
|
@@ -8840,7 +8847,8 @@ export interface BrowserContext {
|
|
|
8840
8847
|
backgroundPages(): Array<Page>;
|
|
8841
8848
|
|
|
8842
8849
|
/**
|
|
8843
|
-
*
|
|
8850
|
+
* Gets the browser instance that owns the context. Returns `null` if the context is created outside of normal
|
|
8851
|
+
* browser, e.g. Android or Electron.
|
|
8844
8852
|
*/
|
|
8845
8853
|
browser(): null|Browser;
|
|
8846
8854
|
|
|
@@ -8985,6 +8993,7 @@ export interface BrowserContext {
|
|
|
8985
8993
|
* - `'notifications'`
|
|
8986
8994
|
* - `'payment-handler'`
|
|
8987
8995
|
* - `'storage-access'`
|
|
8996
|
+
* - `'local-fonts'`
|
|
8988
8997
|
* @param options
|
|
8989
8998
|
*/
|
|
8990
8999
|
grantPermissions(permissions: ReadonlyArray<string>, options?: {
|
|
@@ -9729,6 +9738,10 @@ export interface Browser {
|
|
|
9729
9738
|
* `passphrase` property should be provided if the certificate is encrypted. The `origin` property should be provided
|
|
9730
9739
|
* with an exact match to the request origin that the certificate is valid for.
|
|
9731
9740
|
*
|
|
9741
|
+
* Client certificate authentication is only active when at least one client certificate is provided. If you want to
|
|
9742
|
+
* reject all client certificates sent by the server, you need to provide a client certificate with an `origin` that
|
|
9743
|
+
* does not match any of the domains you plan to visit.
|
|
9744
|
+
*
|
|
9732
9745
|
* **NOTE** When using WebKit on macOS, accessing `localhost` will not pick up client certificates. You can make it
|
|
9733
9746
|
* work by replacing `localhost` with `local.playwright`.
|
|
9734
9747
|
*
|
|
@@ -9882,6 +9895,7 @@ export interface Browser {
|
|
|
9882
9895
|
|
|
9883
9896
|
/**
|
|
9884
9897
|
* Logger sink for Playwright logging.
|
|
9898
|
+
* @deprecated The logs received by the logger are incomplete. Please use tracing instead.
|
|
9885
9899
|
*/
|
|
9886
9900
|
logger?: Logger;
|
|
9887
9901
|
|
|
@@ -10239,7 +10253,7 @@ export interface Worker {
|
|
|
10239
10253
|
* @param arg Optional argument to pass to
|
|
10240
10254
|
* [`pageFunction`](https://playwright.dev/docs/api/class-worker#worker-evaluate-option-expression).
|
|
10241
10255
|
*/
|
|
10242
|
-
evaluate<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg): Promise<R>;
|
|
10256
|
+
evaluate<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg, isolatedContext?: boolean): Promise<R>;
|
|
10243
10257
|
/**
|
|
10244
10258
|
* Returns the return value of
|
|
10245
10259
|
* [`pageFunction`](https://playwright.dev/docs/api/class-worker#worker-evaluate-option-expression).
|
|
@@ -10260,7 +10274,7 @@ export interface Worker {
|
|
|
10260
10274
|
* @param arg Optional argument to pass to
|
|
10261
10275
|
* [`pageFunction`](https://playwright.dev/docs/api/class-worker#worker-evaluate-option-expression).
|
|
10262
10276
|
*/
|
|
10263
|
-
evaluate<R>(pageFunction: PageFunction<void, R>, arg?: any): Promise<R>;
|
|
10277
|
+
evaluate<R>(pageFunction: PageFunction<void, R>, arg?: any, isolatedContext?: boolean): Promise<R>;
|
|
10264
10278
|
|
|
10265
10279
|
/**
|
|
10266
10280
|
* Returns the return value of
|
|
@@ -10283,7 +10297,7 @@ export interface Worker {
|
|
|
10283
10297
|
* @param arg Optional argument to pass to
|
|
10284
10298
|
* [`pageFunction`](https://playwright.dev/docs/api/class-worker#worker-evaluate-handle-option-expression).
|
|
10285
10299
|
*/
|
|
10286
|
-
evaluateHandle<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg): Promise<SmartHandle<R>>;
|
|
10300
|
+
evaluateHandle<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg, isolatedContext?: boolean): Promise<SmartHandle<R>>;
|
|
10287
10301
|
/**
|
|
10288
10302
|
* Returns the return value of
|
|
10289
10303
|
* [`pageFunction`](https://playwright.dev/docs/api/class-worker#worker-evaluate-handle-option-expression) as a
|
|
@@ -10305,7 +10319,7 @@ export interface Worker {
|
|
|
10305
10319
|
* @param arg Optional argument to pass to
|
|
10306
10320
|
* [`pageFunction`](https://playwright.dev/docs/api/class-worker#worker-evaluate-handle-option-expression).
|
|
10307
10321
|
*/
|
|
10308
|
-
evaluateHandle<R>(pageFunction: PageFunction<void, R>, arg?: any): Promise<SmartHandle<R>>;
|
|
10322
|
+
evaluateHandle<R>(pageFunction: PageFunction<void, R>, arg?: any, isolatedContext?: boolean): Promise<SmartHandle<R>>;
|
|
10309
10323
|
/**
|
|
10310
10324
|
* Emitted when this dedicated [WebWorker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API) is
|
|
10311
10325
|
* terminated.
|
|
@@ -10383,7 +10397,7 @@ export interface JSHandle<T = any> {
|
|
|
10383
10397
|
* @param arg Optional argument to pass to
|
|
10384
10398
|
* [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-option-expression).
|
|
10385
10399
|
*/
|
|
10386
|
-
evaluate<R, Arg, O extends T = T>(pageFunction: PageFunctionOn<O, Arg, R>, arg: Arg): Promise<R>;
|
|
10400
|
+
evaluate<R, Arg, O extends T = T>(pageFunction: PageFunctionOn<O, Arg, R>, arg: Arg, isolatedContext?: boolean): Promise<R>;
|
|
10387
10401
|
/**
|
|
10388
10402
|
* Returns the return value of
|
|
10389
10403
|
* [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-option-expression).
|
|
@@ -10405,7 +10419,7 @@ export interface JSHandle<T = any> {
|
|
|
10405
10419
|
* @param arg Optional argument to pass to
|
|
10406
10420
|
* [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-option-expression).
|
|
10407
10421
|
*/
|
|
10408
|
-
evaluate<R, O extends T = T>(pageFunction: PageFunctionOn<O, void, R>, arg?: any): Promise<R>;
|
|
10422
|
+
evaluate<R, O extends T = T>(pageFunction: PageFunctionOn<O, void, R>, arg?: any, isolatedContext?: boolean): Promise<R>;
|
|
10409
10423
|
|
|
10410
10424
|
/**
|
|
10411
10425
|
* Returns the return value of
|
|
@@ -10427,7 +10441,7 @@ export interface JSHandle<T = any> {
|
|
|
10427
10441
|
* @param arg Optional argument to pass to
|
|
10428
10442
|
* [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-handle-option-expression).
|
|
10429
10443
|
*/
|
|
10430
|
-
evaluateHandle<R, Arg, O extends T = T>(pageFunction: PageFunctionOn<O, Arg, R>, arg: Arg): Promise<SmartHandle<R>>;
|
|
10444
|
+
evaluateHandle<R, Arg, O extends T = T>(pageFunction: PageFunctionOn<O, Arg, R>, arg: Arg, isolatedContext?: boolean): Promise<SmartHandle<R>>;
|
|
10431
10445
|
/**
|
|
10432
10446
|
* Returns the return value of
|
|
10433
10447
|
* [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-handle-option-expression)
|
|
@@ -10448,7 +10462,7 @@ export interface JSHandle<T = any> {
|
|
|
10448
10462
|
* @param arg Optional argument to pass to
|
|
10449
10463
|
* [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-handle-option-expression).
|
|
10450
10464
|
*/
|
|
10451
|
-
evaluateHandle<R, O extends T = T>(pageFunction: PageFunctionOn<O, void, R>, arg?: any): Promise<SmartHandle<R>>;
|
|
10465
|
+
evaluateHandle<R, O extends T = T>(pageFunction: PageFunctionOn<O, void, R>, arg?: any, isolatedContext?: boolean): Promise<SmartHandle<R>>;
|
|
10452
10466
|
|
|
10453
10467
|
/**
|
|
10454
10468
|
* Returns a JSON representation of the object. If the object has a `toJSON` function, it **will not be called**.
|
|
@@ -12197,6 +12211,17 @@ export interface Locator {
|
|
|
12197
12211
|
* rejects, this method throws.
|
|
12198
12212
|
*
|
|
12199
12213
|
* **Usage**
|
|
12214
|
+
*
|
|
12215
|
+
* Passing argument to
|
|
12216
|
+
* [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-expression):
|
|
12217
|
+
*
|
|
12218
|
+
* ```js
|
|
12219
|
+
* const result = await page.getByTestId('myId').evaluate((element, [x, y]) => {
|
|
12220
|
+
* return element.textContent + ' ' + x * y;
|
|
12221
|
+
* }, [7, 8]);
|
|
12222
|
+
* console.log(result); // prints "myId text 56"
|
|
12223
|
+
* ```
|
|
12224
|
+
*
|
|
12200
12225
|
* @param pageFunction Function to be evaluated in the page context.
|
|
12201
12226
|
* @param arg Optional argument to pass to
|
|
12202
12227
|
* [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-expression).
|
|
@@ -12204,7 +12229,7 @@ export interface Locator {
|
|
|
12204
12229
|
*/
|
|
12205
12230
|
evaluate<R, Arg, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(pageFunction: PageFunctionOn<E, Arg, R>, arg: Arg, options?: {
|
|
12206
12231
|
timeout?: number;
|
|
12207
|
-
}): Promise<R>;
|
|
12232
|
+
}, isolatedContext?: boolean): Promise<R>;
|
|
12208
12233
|
/**
|
|
12209
12234
|
* Execute JavaScript code in the page, taking the matching element as an argument.
|
|
12210
12235
|
*
|
|
@@ -12222,6 +12247,17 @@ export interface Locator {
|
|
|
12222
12247
|
* rejects, this method throws.
|
|
12223
12248
|
*
|
|
12224
12249
|
* **Usage**
|
|
12250
|
+
*
|
|
12251
|
+
* Passing argument to
|
|
12252
|
+
* [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-expression):
|
|
12253
|
+
*
|
|
12254
|
+
* ```js
|
|
12255
|
+
* const result = await page.getByTestId('myId').evaluate((element, [x, y]) => {
|
|
12256
|
+
* return element.textContent + ' ' + x * y;
|
|
12257
|
+
* }, [7, 8]);
|
|
12258
|
+
* console.log(result); // prints "myId text 56"
|
|
12259
|
+
* ```
|
|
12260
|
+
*
|
|
12225
12261
|
* @param pageFunction Function to be evaluated in the page context.
|
|
12226
12262
|
* @param arg Optional argument to pass to
|
|
12227
12263
|
* [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-expression).
|
|
@@ -12229,7 +12265,7 @@ export interface Locator {
|
|
|
12229
12265
|
*/
|
|
12230
12266
|
evaluate<R, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(pageFunction: PageFunctionOn<E, void, R>, options?: {
|
|
12231
12267
|
timeout?: number;
|
|
12232
|
-
}): Promise<R>;
|
|
12268
|
+
}, isolatedContext?: boolean): Promise<R>;
|
|
12233
12269
|
/**
|
|
12234
12270
|
* Execute JavaScript code in the page, taking the matching element as an argument, and return a
|
|
12235
12271
|
* [JSHandle](https://playwright.dev/docs/api/class-jshandle) with the result.
|
|
@@ -12262,7 +12298,7 @@ export interface Locator {
|
|
|
12262
12298
|
* [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle-option-expression).
|
|
12263
12299
|
* @param options
|
|
12264
12300
|
*/
|
|
12265
|
-
evaluateHandle<R, Arg, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(pageFunction: PageFunctionOn<E, Arg, R>, arg: Arg): Promise<SmartHandle<R>>;
|
|
12301
|
+
evaluateHandle<R, Arg, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(pageFunction: PageFunctionOn<E, Arg, R>, arg: Arg, isolatedContext?: boolean): Promise<SmartHandle<R>>;
|
|
12266
12302
|
/**
|
|
12267
12303
|
* Execute JavaScript code in the page, taking the matching element as an argument, and return a
|
|
12268
12304
|
* [JSHandle](https://playwright.dev/docs/api/class-jshandle) with the result.
|
|
@@ -12295,7 +12331,7 @@ export interface Locator {
|
|
|
12295
12331
|
* [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle-option-expression).
|
|
12296
12332
|
* @param options
|
|
12297
12333
|
*/
|
|
12298
|
-
evaluateHandle<R, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(pageFunction: PageFunctionOn<E, void, R
|
|
12334
|
+
evaluateHandle<R, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(pageFunction: PageFunctionOn<E, void, R>, isolatedContext?: boolean): Promise<SmartHandle<R>>;
|
|
12299
12335
|
/**
|
|
12300
12336
|
* Execute JavaScript code in the page, taking all matching elements as an argument.
|
|
12301
12337
|
*
|
|
@@ -12478,12 +12514,6 @@ export interface Locator {
|
|
|
12478
12514
|
* @param options
|
|
12479
12515
|
*/
|
|
12480
12516
|
ariaSnapshot(options?: {
|
|
12481
|
-
/**
|
|
12482
|
-
* Generate symbolic reference for each element. One can use `aria-ref=<ref>` locator immediately after capturing the
|
|
12483
|
-
* snapshot to perform actions on the element.
|
|
12484
|
-
*/
|
|
12485
|
-
ref?: boolean;
|
|
12486
|
-
|
|
12487
12517
|
/**
|
|
12488
12518
|
* Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
|
|
12489
12519
|
* option in the config, or by using the
|
|
@@ -12893,6 +12923,21 @@ export interface Locator {
|
|
|
12893
12923
|
trial?: boolean;
|
|
12894
12924
|
}): Promise<void>;
|
|
12895
12925
|
|
|
12926
|
+
/**
|
|
12927
|
+
* Describes the locator, description is used in the trace viewer and reports. Returns the locator pointing to the
|
|
12928
|
+
* same element.
|
|
12929
|
+
*
|
|
12930
|
+
* **Usage**
|
|
12931
|
+
*
|
|
12932
|
+
* ```js
|
|
12933
|
+
* const button = page.getByTestId('btn-sub').describe('Subscribe button');
|
|
12934
|
+
* await button.click();
|
|
12935
|
+
* ```
|
|
12936
|
+
*
|
|
12937
|
+
* @param description Locator description.
|
|
12938
|
+
*/
|
|
12939
|
+
describe(description: string): Locator;
|
|
12940
|
+
|
|
12896
12941
|
/**
|
|
12897
12942
|
* Programmatically dispatch an event on the matching element.
|
|
12898
12943
|
*
|
|
@@ -14716,6 +14761,13 @@ export interface BrowserType<Unused = {}> {
|
|
|
14716
14761
|
* **parent** directory of the "Profile Path" seen at `chrome://version`.
|
|
14717
14762
|
*
|
|
14718
14763
|
* Note that browsers do not allow launching multiple instances with the same User Data Directory.
|
|
14764
|
+
*
|
|
14765
|
+
* **NOTE** Chromium/Chrome: Due to recent Chrome policy changes, automating the default Chrome user profile is not
|
|
14766
|
+
* supported. Pointing `userDataDir` to Chrome's main "User Data" directory (the profile used for your regular
|
|
14767
|
+
* browsing) may result in pages not loading or the browser exiting. Create and use a separate directory (for example,
|
|
14768
|
+
* an empty folder) as your automation profile instead. See https://developer.chrome.com/blog/remote-debugging-port
|
|
14769
|
+
* for details.
|
|
14770
|
+
*
|
|
14719
14771
|
* @param options
|
|
14720
14772
|
*/
|
|
14721
14773
|
launchPersistentContext(userDataDir: string, options?: {
|
|
@@ -14780,6 +14832,10 @@ export interface BrowserType<Unused = {}> {
|
|
|
14780
14832
|
* `passphrase` property should be provided if the certificate is encrypted. The `origin` property should be provided
|
|
14781
14833
|
* with an exact match to the request origin that the certificate is valid for.
|
|
14782
14834
|
*
|
|
14835
|
+
* Client certificate authentication is only active when at least one client certificate is provided. If you want to
|
|
14836
|
+
* reject all client certificates sent by the server, you need to provide a client certificate with an `origin` that
|
|
14837
|
+
* does not match any of the domains you plan to visit.
|
|
14838
|
+
*
|
|
14783
14839
|
* **NOTE** When using WebKit on macOS, accessing `localhost` will not pick up client certificates. You can make it
|
|
14784
14840
|
* work by replacing `localhost` with `local.playwright`.
|
|
14785
14841
|
*
|
|
@@ -14883,6 +14939,9 @@ export interface BrowserType<Unused = {}> {
|
|
|
14883
14939
|
/**
|
|
14884
14940
|
* Firefox user preferences. Learn more about the Firefox user preferences at
|
|
14885
14941
|
* [`about:config`](https://support.mozilla.org/en-US/kb/about-config-editor-firefox).
|
|
14942
|
+
*
|
|
14943
|
+
* You can also provide a path to a custom [`policies.json` file](https://mozilla.github.io/policy-templates/) via
|
|
14944
|
+
* `PLAYWRIGHT_FIREFOX_POLICIES_JSON` environment variable.
|
|
14886
14945
|
*/
|
|
14887
14946
|
firefoxUserPrefs?: { [key: string]: string|number|boolean; };
|
|
14888
14947
|
|
|
@@ -14999,6 +15058,7 @@ export interface BrowserType<Unused = {}> {
|
|
|
14999
15058
|
|
|
15000
15059
|
/**
|
|
15001
15060
|
* Logger sink for Playwright logging.
|
|
15061
|
+
* @deprecated The logs received by the logger are incomplete. Please use tracing instead.
|
|
15002
15062
|
*/
|
|
15003
15063
|
logger?: Logger;
|
|
15004
15064
|
|
|
@@ -15307,6 +15367,9 @@ export interface BrowserType<Unused = {}> {
|
|
|
15307
15367
|
/**
|
|
15308
15368
|
* Firefox user preferences. Learn more about the Firefox user preferences at
|
|
15309
15369
|
* [`about:config`](https://support.mozilla.org/en-US/kb/about-config-editor-firefox).
|
|
15370
|
+
*
|
|
15371
|
+
* You can also provide a path to a custom [`policies.json` file](https://mozilla.github.io/policy-templates/) via
|
|
15372
|
+
* `PLAYWRIGHT_FIREFOX_POLICIES_JSON` environment variable.
|
|
15310
15373
|
*/
|
|
15311
15374
|
firefoxUserPrefs?: { [key: string]: string|number|boolean; };
|
|
15312
15375
|
|
|
@@ -15350,6 +15413,7 @@ export interface BrowserType<Unused = {}> {
|
|
|
15350
15413
|
|
|
15351
15414
|
/**
|
|
15352
15415
|
* Logger sink for Playwright logging.
|
|
15416
|
+
* @deprecated The logs received by the logger are incomplete. Please use tracing instead.
|
|
15353
15417
|
*/
|
|
15354
15418
|
logger?: Logger;
|
|
15355
15419
|
|
|
@@ -15463,7 +15527,7 @@ export interface CDPSession {
|
|
|
15463
15527
|
*
|
|
15464
15528
|
* **Mocking**
|
|
15465
15529
|
*
|
|
15466
|
-
* By default, the routed WebSocket will not connect to the server. This way, you can mock entire
|
|
15530
|
+
* By default, the routed WebSocket will not connect to the server. This way, you can mock entire communication over
|
|
15467
15531
|
* the WebSocket. Here is an example that responds to a `"request"` with a `"response"`.
|
|
15468
15532
|
*
|
|
15469
15533
|
* ```js
|
|
@@ -16752,6 +16816,7 @@ export interface AndroidDevice {
|
|
|
16752
16816
|
|
|
16753
16817
|
/**
|
|
16754
16818
|
* Logger sink for Playwright logging.
|
|
16819
|
+
* @deprecated The logs received by the logger are incomplete. Please use tracing instead.
|
|
16755
16820
|
*/
|
|
16756
16821
|
logger?: Logger;
|
|
16757
16822
|
|
|
@@ -17484,6 +17549,10 @@ export interface APIRequest {
|
|
|
17484
17549
|
* `passphrase` property should be provided if the certificate is encrypted. The `origin` property should be provided
|
|
17485
17550
|
* with an exact match to the request origin that the certificate is valid for.
|
|
17486
17551
|
*
|
|
17552
|
+
* Client certificate authentication is only active when at least one client certificate is provided. If you want to
|
|
17553
|
+
* reject all client certificates sent by the server, you need to provide a client certificate with an `origin` that
|
|
17554
|
+
* does not match any of the domains you plan to visit.
|
|
17555
|
+
*
|
|
17487
17556
|
* **NOTE** When using WebKit on macOS, accessing `localhost` will not pick up client certificates. You can make it
|
|
17488
17557
|
* work by replacing `localhost` with `local.playwright`.
|
|
17489
17558
|
*
|
|
@@ -18800,12 +18869,7 @@ export interface ConsoleMessage {
|
|
|
18800
18869
|
*/
|
|
18801
18870
|
text(): string;
|
|
18802
18871
|
|
|
18803
|
-
|
|
18804
|
-
* One of the following values: `'log'`, `'debug'`, `'info'`, `'error'`, `'warning'`, `'dir'`, `'dirxml'`, `'table'`,
|
|
18805
|
-
* `'trace'`, `'clear'`, `'startGroup'`, `'startGroupCollapsed'`, `'endGroup'`, `'assert'`, `'profile'`,
|
|
18806
|
-
* `'profileEnd'`, `'count'`, `'timeEnd'`.
|
|
18807
|
-
*/
|
|
18808
|
-
type(): string;
|
|
18872
|
+
type(): "log"|"debug"|"info"|"error"|"warning"|"dir"|"dirxml"|"table"|"trace"|"clear"|"startGroup"|"startGroupCollapsed"|"endGroup"|"assert"|"profile"|"profileEnd"|"count"|"timeEnd";
|
|
18809
18873
|
}
|
|
18810
18874
|
|
|
18811
18875
|
/**
|
|
@@ -20110,6 +20174,10 @@ export interface Logger {
|
|
|
20110
20174
|
/**
|
|
20111
20175
|
* The Mouse class operates in main-frame CSS pixels relative to the top-left corner of the viewport.
|
|
20112
20176
|
*
|
|
20177
|
+
* **NOTE** If you want to debug where the mouse moved, you can use the [Trace viewer](https://playwright.dev/docs/trace-viewer-intro) or
|
|
20178
|
+
* [Playwright Inspector](https://playwright.dev/docs/running-tests). A red dot showing the location of the mouse will be shown for every
|
|
20179
|
+
* mouse action.
|
|
20180
|
+
*
|
|
20113
20181
|
* Every `page` object has its own Mouse, accessible with
|
|
20114
20182
|
* [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse).
|
|
20115
20183
|
*
|
|
@@ -21148,6 +21216,15 @@ export interface Touchscreen {
|
|
|
21148
21216
|
* API for collecting and saving Playwright traces. Playwright traces can be opened in
|
|
21149
21217
|
* [Trace Viewer](https://playwright.dev/docs/trace-viewer) after Playwright script runs.
|
|
21150
21218
|
*
|
|
21219
|
+
* **NOTE** You probably want to
|
|
21220
|
+
* [enable tracing in your config file](https://playwright.dev/docs/api/class-testoptions#test-options-trace) instead
|
|
21221
|
+
* of using `context.tracing`.
|
|
21222
|
+
*
|
|
21223
|
+
* The `context.tracing` API captures browser operations and network activity, but it doesn't record test assertions
|
|
21224
|
+
* (like `expect` calls). We recommend
|
|
21225
|
+
* [enabling tracing through Playwright Test configuration](https://playwright.dev/docs/api/class-testoptions#test-options-trace),
|
|
21226
|
+
* which includes those assertions and provides a more complete trace for debugging test failures.
|
|
21227
|
+
*
|
|
21151
21228
|
* Start recording a trace before performing actions. At the end, stop tracing and save it to a file.
|
|
21152
21229
|
*
|
|
21153
21230
|
* ```js
|
|
@@ -21156,6 +21233,7 @@ export interface Touchscreen {
|
|
|
21156
21233
|
* await context.tracing.start({ screenshots: true, snapshots: true });
|
|
21157
21234
|
* const page = await context.newPage();
|
|
21158
21235
|
* await page.goto('https://playwright.dev');
|
|
21236
|
+
* expect(page.url()).toBe('https://playwright.dev');
|
|
21159
21237
|
* await context.tracing.stop({ path: 'trace.zip' });
|
|
21160
21238
|
* ```
|
|
21161
21239
|
*
|
|
@@ -21203,12 +21281,22 @@ export interface Tracing {
|
|
|
21203
21281
|
/**
|
|
21204
21282
|
* Start tracing.
|
|
21205
21283
|
*
|
|
21284
|
+
* **NOTE** You probably want to
|
|
21285
|
+
* [enable tracing in your config file](https://playwright.dev/docs/api/class-testoptions#test-options-trace) instead
|
|
21286
|
+
* of using `Tracing.start`.
|
|
21287
|
+
*
|
|
21288
|
+
* The `context.tracing` API captures browser operations and network activity, but it doesn't record test assertions
|
|
21289
|
+
* (like `expect` calls). We recommend
|
|
21290
|
+
* [enabling tracing through Playwright Test configuration](https://playwright.dev/docs/api/class-testoptions#test-options-trace),
|
|
21291
|
+
* which includes those assertions and provides a more complete trace for debugging test failures.
|
|
21292
|
+
*
|
|
21206
21293
|
* **Usage**
|
|
21207
21294
|
*
|
|
21208
21295
|
* ```js
|
|
21209
21296
|
* await context.tracing.start({ screenshots: true, snapshots: true });
|
|
21210
21297
|
* const page = await context.newPage();
|
|
21211
21298
|
* await page.goto('https://playwright.dev');
|
|
21299
|
+
* expect(page.url()).toBe('https://playwright.dev');
|
|
21212
21300
|
* await context.tracing.stop({ path: 'trace.zip' });
|
|
21213
21301
|
* ```
|
|
21214
21302
|
*
|
|
@@ -21694,6 +21782,9 @@ export interface LaunchOptions {
|
|
|
21694
21782
|
/**
|
|
21695
21783
|
* Firefox user preferences. Learn more about the Firefox user preferences at
|
|
21696
21784
|
* [`about:config`](https://support.mozilla.org/en-US/kb/about-config-editor-firefox).
|
|
21785
|
+
*
|
|
21786
|
+
* You can also provide a path to a custom [`policies.json` file](https://mozilla.github.io/policy-templates/) via
|
|
21787
|
+
* `PLAYWRIGHT_FIREFOX_POLICIES_JSON` environment variable.
|
|
21697
21788
|
*/
|
|
21698
21789
|
firefoxUserPrefs?: { [key: string]: string|number|boolean; };
|
|
21699
21790
|
|
|
@@ -21730,6 +21821,7 @@ export interface LaunchOptions {
|
|
|
21730
21821
|
|
|
21731
21822
|
/**
|
|
21732
21823
|
* Logger sink for Playwright logging.
|
|
21824
|
+
* @deprecated The logs received by the logger are incomplete. Please use tracing instead.
|
|
21733
21825
|
*/
|
|
21734
21826
|
logger?: Logger;
|
|
21735
21827
|
|
|
@@ -21779,7 +21871,7 @@ export interface LaunchOptions {
|
|
|
21779
21871
|
|
|
21780
21872
|
export interface ConnectOverCDPOptions {
|
|
21781
21873
|
/**
|
|
21782
|
-
*
|
|
21874
|
+
* @deprecated Use the first argument instead.
|
|
21783
21875
|
*/
|
|
21784
21876
|
endpointURL?: string;
|
|
21785
21877
|
|
|
@@ -21790,6 +21882,7 @@ export interface ConnectOverCDPOptions {
|
|
|
21790
21882
|
|
|
21791
21883
|
/**
|
|
21792
21884
|
* Logger sink for Playwright logging. Optional.
|
|
21885
|
+
* @deprecated The logs received by the logger are incomplete. Please use tracing instead.
|
|
21793
21886
|
*/
|
|
21794
21887
|
logger?: Logger;
|
|
21795
21888
|
|
|
@@ -21831,6 +21924,7 @@ export interface ConnectOptions {
|
|
|
21831
21924
|
|
|
21832
21925
|
/**
|
|
21833
21926
|
* Logger sink for Playwright logging. Optional.
|
|
21927
|
+
* @deprecated The logs received by the logger are incomplete. Please use tracing instead.
|
|
21834
21928
|
*/
|
|
21835
21929
|
logger?: Logger;
|
|
21836
21930
|
|
|
@@ -21993,6 +22087,10 @@ export interface BrowserContextOptions {
|
|
|
21993
22087
|
* `passphrase` property should be provided if the certificate is encrypted. The `origin` property should be provided
|
|
21994
22088
|
* with an exact match to the request origin that the certificate is valid for.
|
|
21995
22089
|
*
|
|
22090
|
+
* Client certificate authentication is only active when at least one client certificate is provided. If you want to
|
|
22091
|
+
* reject all client certificates sent by the server, you need to provide a client certificate with an `origin` that
|
|
22092
|
+
* does not match any of the domains you plan to visit.
|
|
22093
|
+
*
|
|
21996
22094
|
* **NOTE** When using WebKit on macOS, accessing `localhost` will not pick up client certificates. You can make it
|
|
21997
22095
|
* work by replacing `localhost` with `local.playwright`.
|
|
21998
22096
|
*
|
|
@@ -22113,6 +22211,7 @@ export interface BrowserContextOptions {
|
|
|
22113
22211
|
|
|
22114
22212
|
/**
|
|
22115
22213
|
* Logger sink for Playwright logging.
|
|
22214
|
+
* @deprecated The logs received by the logger are incomplete. Please use tracing instead.
|
|
22116
22215
|
*/
|
|
22117
22216
|
logger?: Logger;
|
|
22118
22217
|
|
|
@@ -22433,6 +22532,8 @@ export interface Cookie {
|
|
|
22433
22532
|
secure: boolean;
|
|
22434
22533
|
|
|
22435
22534
|
sameSite: "Strict"|"Lax"|"None";
|
|
22535
|
+
|
|
22536
|
+
partitionKey?: string;
|
|
22436
22537
|
}
|
|
22437
22538
|
|
|
22438
22539
|
interface PageWaitForSelectorOptions {
|
|
@@ -22609,14 +22710,22 @@ type Devices = {
|
|
|
22609
22710
|
"Galaxy S8 landscape": DeviceDescriptor;
|
|
22610
22711
|
"Galaxy S9+": DeviceDescriptor;
|
|
22611
22712
|
"Galaxy S9+ landscape": DeviceDescriptor;
|
|
22713
|
+
"Galaxy S24": DeviceDescriptor;
|
|
22714
|
+
"Galaxy S24 landscape": DeviceDescriptor;
|
|
22715
|
+
"Galaxy A55": DeviceDescriptor;
|
|
22716
|
+
"Galaxy A55 landscape": DeviceDescriptor;
|
|
22612
22717
|
"Galaxy Tab S4": DeviceDescriptor;
|
|
22613
22718
|
"Galaxy Tab S4 landscape": DeviceDescriptor;
|
|
22719
|
+
"Galaxy Tab S9": DeviceDescriptor;
|
|
22720
|
+
"Galaxy Tab S9 landscape": DeviceDescriptor;
|
|
22614
22721
|
"iPad (gen 5)": DeviceDescriptor;
|
|
22615
22722
|
"iPad (gen 5) landscape": DeviceDescriptor;
|
|
22616
22723
|
"iPad (gen 6)": DeviceDescriptor;
|
|
22617
22724
|
"iPad (gen 6) landscape": DeviceDescriptor;
|
|
22618
22725
|
"iPad (gen 7)": DeviceDescriptor;
|
|
22619
22726
|
"iPad (gen 7) landscape": DeviceDescriptor;
|
|
22727
|
+
"iPad (gen 11)": DeviceDescriptor;
|
|
22728
|
+
"iPad (gen 11) landscape": DeviceDescriptor;
|
|
22620
22729
|
"iPad Mini": DeviceDescriptor;
|
|
22621
22730
|
"iPad Mini landscape": DeviceDescriptor;
|
|
22622
22731
|
"iPad Pro 11": DeviceDescriptor;
|
|
@@ -22635,6 +22744,8 @@ type Devices = {
|
|
|
22635
22744
|
"iPhone 8 Plus landscape": DeviceDescriptor;
|
|
22636
22745
|
"iPhone SE": DeviceDescriptor;
|
|
22637
22746
|
"iPhone SE landscape": DeviceDescriptor;
|
|
22747
|
+
"iPhone SE (3rd gen)": DeviceDescriptor;
|
|
22748
|
+
"iPhone SE (3rd gen) landscape": DeviceDescriptor;
|
|
22638
22749
|
"iPhone X": DeviceDescriptor;
|
|
22639
22750
|
"iPhone X landscape": DeviceDescriptor;
|
|
22640
22751
|
"iPhone XR": DeviceDescriptor;
|