rebrowser-playwright-core 1.49.0 → 1.52.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 +381 -55
- package/bin/reinstall_msedge_beta_linux.sh +6 -0
- package/bin/reinstall_msedge_dev_linux.sh +6 -0
- package/bin/reinstall_msedge_stable_linux.sh +6 -0
- package/browsers.json +28 -13
- package/index.js +0 -1
- package/lib/androidServerImpl.js +42 -48
- package/lib/browserServerImpl.js +60 -64
- package/lib/cli/driver.js +71 -69
- package/lib/cli/program.js +314 -354
- package/lib/cli/programWithTestStub.js +51 -44
- package/lib/client/accessibility.js +31 -32
- package/lib/client/android.js +146 -254
- package/lib/client/api.js +135 -283
- package/lib/client/artifact.js +39 -39
- package/lib/client/browser.js +59 -68
- package/lib/client/browserContext.js +302 -322
- package/lib/client/browserType.js +95 -143
- package/lib/client/cdpSession.js +29 -31
- package/lib/client/channelOwner.js +109 -139
- package/lib/client/clientHelper.js +49 -42
- package/lib/client/clientInstrumentation.js +40 -35
- package/lib/client/clientStackTrace.js +69 -0
- package/lib/client/clock.js +36 -36
- package/lib/client/connection.js +203 -218
- package/lib/client/consoleMessage.js +33 -33
- package/lib/client/coverage.js +25 -22
- package/lib/client/dialog.js +30 -31
- package/lib/client/download.js +25 -25
- package/lib/client/electron.js +74 -76
- package/lib/client/elementHandle.js +126 -163
- package/lib/client/errors.js +53 -53
- package/lib/client/eventEmitter.js +127 -127
- package/lib/client/events.js +72 -68
- package/lib/client/fetch.js +154 -178
- package/lib/client/fileChooser.js +25 -24
- package/lib/client/fileUtils.js +34 -0
- package/lib/client/frame.js +189 -307
- package/lib/client/harRouter.js +44 -56
- package/lib/client/input.js +40 -69
- package/lib/client/jsHandle.js +55 -71
- package/lib/client/jsonPipe.js +27 -23
- package/lib/client/localUtils.js +53 -28
- package/lib/client/locator.js +144 -230
- package/lib/client/network.js +285 -301
- package/lib/client/page.js +273 -312
- package/lib/client/platform.js +74 -0
- package/lib/client/playwright.js +62 -57
- package/lib/client/selectors.js +51 -43
- package/lib/client/stream.js +30 -45
- package/lib/client/timeoutSettings.js +75 -0
- package/lib/client/tracing.js +49 -82
- package/lib/client/types.js +26 -22
- package/lib/client/video.js +35 -27
- package/lib/client/waiter.js +71 -91
- package/lib/client/webError.js +25 -23
- package/lib/client/webSocket.js +111 -0
- package/lib/client/worker.js +48 -56
- package/lib/client/writableStream.js +28 -43
- package/lib/generated/clockSource.js +26 -5
- package/lib/generated/consoleApiSource.js +26 -5
- package/lib/generated/injectedScriptSource.js +26 -5
- package/lib/generated/pollingRecorderSource.js +26 -5
- package/lib/generated/utilityScriptSource.js +26 -5
- package/lib/generated/webSocketMockSource.js +375 -4
- package/lib/inProcessFactory.js +53 -48
- package/lib/inprocess.js +2 -19
- package/lib/outofprocess.js +53 -42
- package/lib/protocol/debug.js +209 -25
- package/lib/protocol/serializers.js +153 -134
- package/lib/protocol/validator.js +2712 -2667
- package/lib/protocol/validatorPrimitives.js +115 -75
- package/lib/remote/playwrightConnection.js +144 -152
- package/lib/remote/playwrightServer.js +106 -77
- package/lib/server/accessibility.js +44 -37
- package/lib/server/android/android.js +216 -206
- package/lib/server/android/backendAdb.js +89 -82
- package/lib/server/artifact.js +78 -55
- package/lib/server/bidi/bidiBrowser.js +227 -158
- package/lib/server/bidi/bidiChromium.js +106 -78
- package/lib/server/bidi/bidiConnection.js +66 -83
- package/lib/server/bidi/bidiExecutionContext.js +161 -97
- package/lib/server/bidi/bidiFirefox.js +76 -68
- package/lib/server/bidi/bidiInput.js +90 -102
- package/lib/server/bidi/bidiNetworkManager.js +141 -159
- package/lib/server/bidi/bidiOverCdp.js +57 -58
- package/lib/server/bidi/bidiPage.js +262 -261
- package/lib/server/bidi/bidiPdf.js +52 -86
- package/lib/server/bidi/third_party/bidiCommands.d.js +22 -0
- package/lib/server/bidi/third_party/bidiDeserializer.js +55 -50
- package/lib/server/bidi/third_party/bidiKeyboard.js +241 -223
- package/lib/server/bidi/third_party/bidiProtocol.js +144 -131
- package/lib/server/bidi/third_party/bidiSerializer.js +67 -63
- package/lib/server/bidi/third_party/firefoxPrefs.js +149 -111
- package/lib/server/browser.js +76 -84
- package/lib/server/browserContext.js +343 -360
- package/lib/server/browserType.js +169 -181
- package/lib/server/callLog.js +82 -0
- package/lib/server/chromium/chromium.js +212 -190
- package/lib/server/chromium/chromiumSwitches.js +99 -44
- package/lib/server/chromium/crAccessibility.js +157 -131
- package/lib/server/chromium/crBrowser.js +262 -280
- package/lib/server/chromium/crConnection.js +121 -178
- package/lib/server/chromium/crCoverage.js +113 -127
- package/lib/server/chromium/crDevTools.js +64 -55
- package/lib/server/chromium/crDragDrop.js +62 -79
- package/lib/server/chromium/crExecutionContext.js +100 -91
- package/lib/server/chromium/crInput.js +101 -88
- package/lib/server/chromium/crNetworkManager.js +269 -370
- package/lib/server/chromium/crPage.js +509 -595
- package/lib/server/chromium/crPdf.js +54 -86
- package/lib/server/chromium/crProtocolHelper.js +92 -80
- package/lib/server/chromium/crServiceWorker.js +85 -69
- package/lib/server/chromium/defaultFontFamilies.js +152 -135
- package/lib/server/chromium/protocol.d.js +16 -0
- package/lib/server/chromium/videoRecorder.js +65 -99
- package/lib/server/clock.js +58 -46
- package/lib/server/codegen/csharp.js +191 -156
- package/lib/server/codegen/java.js +163 -125
- package/lib/server/codegen/javascript.js +166 -143
- package/lib/server/codegen/jsonl.js +33 -29
- package/lib/server/codegen/language.js +75 -52
- package/lib/server/codegen/languages.js +65 -27
- package/lib/server/codegen/python.js +141 -125
- package/lib/server/codegen/types.js +15 -4
- package/lib/server/console.js +28 -32
- package/lib/server/cookieStore.js +105 -86
- package/lib/server/debugController.js +102 -154
- package/lib/server/debugger.js +82 -78
- package/lib/server/deviceDescriptors.js +37 -24
- package/lib/server/deviceDescriptorsSource.json +131 -131
- package/lib/server/dialog.js +36 -35
- package/lib/server/dispatchers/androidDispatcher.js +196 -107
- package/lib/server/dispatchers/artifactDispatcher.js +62 -62
- package/lib/server/dispatchers/browserContextDispatcher.js +177 -217
- package/lib/server/dispatchers/browserDispatcher.js +78 -97
- package/lib/server/dispatchers/browserTypeDispatcher.js +35 -35
- package/lib/server/dispatchers/cdpSessionDispatcher.js +32 -36
- package/lib/server/dispatchers/debugControllerDispatcher.js +48 -64
- package/lib/server/dispatchers/dialogDispatcher.js +30 -27
- package/lib/server/dispatchers/dispatcher.js +180 -229
- package/lib/server/dispatchers/electronDispatcher.js +54 -57
- package/lib/server/dispatchers/elementHandlerDispatcher.js +79 -116
- package/lib/server/dispatchers/frameDispatcher.js +93 -162
- package/lib/server/dispatchers/jsHandleDispatcher.js +49 -66
- package/lib/server/dispatchers/jsonPipeDispatcher.js +35 -36
- package/lib/server/dispatchers/localUtilsDispatcher.js +107 -365
- package/lib/server/dispatchers/networkDispatchers.js +92 -109
- package/lib/server/dispatchers/pageDispatcher.js +130 -169
- package/lib/server/dispatchers/playwrightDispatcher.js +69 -76
- package/lib/server/dispatchers/selectorsDispatcher.js +28 -24
- package/lib/server/dispatchers/streamDispatcher.js +42 -44
- package/lib/server/dispatchers/tracingDispatcher.js +36 -41
- package/lib/server/dispatchers/webSocketRouteDispatcher.js +100 -135
- package/lib/server/dispatchers/writableStreamDispatcher.js +54 -39
- package/lib/server/dom.js +424 -443
- package/lib/server/download.js +45 -35
- package/lib/server/electron/electron.js +156 -175
- package/lib/server/electron/loader.js +8 -36
- package/lib/server/errors.js +47 -46
- package/lib/server/fetch.js +302 -331
- package/lib/server/fileChooser.js +25 -24
- package/lib/server/fileUploadUtils.js +66 -57
- package/lib/server/firefox/ffAccessibility.js +153 -131
- package/lib/server/firefox/ffBrowser.js +218 -274
- package/lib/server/firefox/ffConnection.js +63 -84
- package/lib/server/firefox/ffExecutionContext.js +103 -77
- package/lib/server/firefox/ffInput.js +72 -63
- package/lib/server/firefox/ffNetworkManager.js +131 -110
- package/lib/server/firefox/ffPage.js +244 -302
- package/lib/server/firefox/firefox.js +76 -69
- package/lib/server/firefox/protocol.d.js +16 -0
- package/lib/server/formData.js +107 -35
- package/lib/server/frameSelectors.js +77 -111
- package/lib/server/frames.js +719 -855
- package/lib/server/har/harRecorder.js +85 -77
- package/lib/server/har/harTracer.js +288 -224
- package/lib/server/harBackend.js +157 -0
- package/lib/server/helper.js +56 -59
- package/lib/server/index.js +59 -106
- package/lib/server/input.js +136 -166
- package/lib/server/instrumentation.js +49 -44
- package/lib/server/javascript.js +157 -151
- package/lib/server/launchApp.js +92 -73
- package/lib/server/localUtils.js +211 -0
- package/lib/server/macEditingCommands.js +141 -137
- package/lib/server/network.js +263 -297
- package/lib/server/page.js +353 -432
- package/lib/server/pageBinding.js +88 -0
- package/lib/server/pipeTransport.js +49 -45
- package/lib/server/playwright.js +60 -67
- package/lib/server/progress.js +56 -51
- package/lib/server/protocolError.js +34 -31
- package/lib/server/recorder/chat.js +161 -0
- package/lib/server/recorder/contextRecorder.js +135 -148
- package/lib/server/recorder/recorderApp.js +129 -132
- package/lib/server/recorder/recorderCollection.js +57 -57
- package/lib/server/recorder/recorderFrontend.js +15 -4
- package/lib/server/recorder/recorderRunner.js +80 -100
- package/lib/server/recorder/recorderUtils.js +59 -72
- package/lib/server/recorder/throttledFile.js +42 -31
- package/lib/server/recorder.js +186 -190
- package/lib/server/registry/browserFetcher.js +107 -100
- package/lib/server/registry/dependencies.js +247 -198
- package/lib/server/registry/index.js +928 -709
- package/lib/server/registry/nativeDeps.js +1073 -461
- package/lib/server/registry/oopDownloadBrowserMain.js +57 -75
- package/lib/server/screenshotter.js +166 -182
- package/lib/server/selectors.js +85 -46
- package/lib/server/socksClientCertificatesInterceptor.js +166 -185
- package/lib/server/socksInterceptor.js +62 -67
- package/lib/server/storageScript.js +154 -0
- package/lib/server/timeoutSettings.js +89 -0
- package/lib/server/trace/recorder/snapshotter.js +70 -88
- package/lib/server/trace/recorder/snapshotterInjected.js +246 -218
- package/lib/server/trace/recorder/tracing.js +324 -327
- package/lib/server/trace/test/inMemorySnapshotter.js +46 -52
- package/lib/server/trace/viewer/traceViewer.js +172 -137
- package/lib/server/transport.js +125 -133
- package/lib/server/types.js +26 -22
- package/lib/server/usKeyboardLayout.js +135 -545
- package/lib/server/utils/ascii.js +44 -0
- package/lib/server/utils/comparators.js +161 -0
- package/lib/server/utils/crypto.js +216 -0
- package/lib/server/utils/debug.js +47 -0
- package/lib/server/utils/debugLogger.js +114 -0
- package/lib/server/utils/env.js +68 -0
- package/lib/server/utils/eventsHelper.js +39 -0
- package/lib/server/utils/expectUtils.js +38 -0
- package/lib/server/utils/fileUtils.js +191 -0
- package/lib/server/utils/happyEyeballs.js +207 -0
- package/lib/server/utils/hostPlatform.js +109 -0
- package/lib/server/utils/httpServer.js +218 -0
- package/lib/server/utils/image_tools/colorUtils.js +89 -0
- package/lib/{image_tools → server/utils/image_tools}/compare.js +44 -43
- package/lib/server/utils/image_tools/imageChannel.js +78 -0
- package/lib/{image_tools → server/utils/image_tools}/stats.js +40 -40
- package/lib/server/utils/linuxUtils.js +71 -0
- package/lib/server/utils/network.js +217 -0
- package/lib/server/utils/nodePlatform.js +148 -0
- package/lib/server/utils/pipeTransport.js +84 -0
- package/lib/server/utils/processLauncher.js +238 -0
- package/lib/server/utils/profiler.js +65 -0
- package/lib/server/utils/socksProxy.js +511 -0
- package/lib/server/utils/spawnAsync.js +41 -0
- package/lib/server/utils/task.js +51 -0
- package/lib/server/utils/userAgent.js +98 -0
- package/lib/server/utils/wsServer.js +132 -0
- package/lib/server/utils/zipFile.js +74 -0
- package/lib/server/utils/zones.js +57 -0
- package/lib/server/webkit/protocol.d.js +16 -0
- package/lib/server/webkit/webkit.js +76 -63
- package/lib/server/webkit/wkAccessibility.js +161 -118
- package/lib/server/webkit/wkBrowser.js +163 -180
- package/lib/server/webkit/wkConnection.js +59 -83
- package/lib/server/webkit/wkExecutionContext.js +96 -73
- package/lib/server/webkit/wkInput.js +87 -75
- package/lib/server/webkit/wkInterceptableRequest.js +102 -95
- package/lib/server/webkit/wkPage.js +536 -645
- package/lib/server/webkit/wkProvisionalPage.js +45 -56
- package/lib/server/webkit/wkWorkers.js +77 -77
- package/lib/utils/isomorphic/ariaSnapshot.js +245 -128
- package/lib/utils/isomorphic/assert.js +31 -0
- package/lib/utils/isomorphic/builtins.js +90 -0
- package/lib/utils/isomorphic/colors.js +72 -0
- package/lib/utils/isomorphic/cssParser.js +123 -127
- package/lib/utils/isomorphic/cssTokenizer.js +436 -364
- package/lib/utils/isomorphic/headers.js +53 -0
- package/lib/utils/isomorphic/locatorGenerators.js +344 -349
- package/lib/utils/isomorphic/locatorParser.js +103 -106
- package/lib/utils/isomorphic/locatorUtils.js +63 -44
- package/lib/utils/isomorphic/manualPromise.js +115 -0
- package/lib/utils/isomorphic/mimeType.js +453 -22
- package/lib/utils/isomorphic/multimap.js +81 -0
- package/lib/utils/isomorphic/rtti.js +43 -0
- package/lib/utils/isomorphic/selectorParser.js +183 -193
- package/lib/utils/isomorphic/semaphore.js +54 -0
- package/lib/utils/isomorphic/stackTrace.js +158 -0
- package/lib/utils/isomorphic/stringUtils.js +113 -106
- package/lib/utils/isomorphic/time.js +44 -0
- package/lib/utils/isomorphic/timeoutRunner.js +67 -0
- package/lib/utils/isomorphic/traceUtils.js +52 -32
- package/lib/utils/isomorphic/types.js +16 -0
- package/lib/utils/isomorphic/urlMatch.js +114 -71
- package/lib/utils/isomorphic/utilityScriptSerializers.js +248 -0
- package/lib/utils.js +101 -0
- package/lib/utilsBundle.js +101 -76
- package/lib/utilsBundleImpl/index.js +114 -116
- package/lib/vite/htmlReport/index.html +26 -20
- package/lib/vite/recorder/assets/codeMirrorModule-DVQi6prl.js +24 -0
- package/lib/vite/recorder/assets/index-97EUAAbk.js +184 -0
- package/lib/vite/recorder/assets/{index-iA1aAGZg.css → index-eHBmevrY.css} +1 -1
- package/lib/vite/recorder/index.html +2 -2
- package/lib/vite/traceViewer/assets/codeMirrorModule-DwAiTpyC.js +24 -0
- package/lib/vite/traceViewer/assets/defaultSettingsView-DkkRvn5X.js +265 -0
- package/lib/vite/traceViewer/assets/{xtermModule-BeNbaIVa.js → xtermModule-BoAIEibi.js} +7 -7
- package/lib/vite/traceViewer/defaultSettingsView.QdHITyLI.css +1 -0
- package/lib/vite/traceViewer/index.DvtSwn6E.js +2 -0
- package/lib/vite/traceViewer/index.html +4 -7
- package/lib/vite/traceViewer/sw.bundle.js +3 -3
- package/lib/vite/traceViewer/{uiMode.voC1ZiOQ.css → uiMode.BatfzHMG.css} +1 -1
- package/lib/vite/traceViewer/uiMode.Sdytl9wc.js +5 -0
- package/lib/vite/traceViewer/uiMode.html +4 -7
- package/lib/zipBundle.js +32 -23
- package/lib/zipBundleImpl.js +4 -4
- package/package.json +7 -7
- package/types/protocol.d.ts +819 -127
- package/types/types.d.ts +196 -75
- package/bin/PrintDeps.exe +0 -0
- package/bin/README.md +0 -2
- package/lib/common/socksProxy.js +0 -569
- package/lib/common/timeoutSettings.js +0 -73
- package/lib/common/types.js +0 -5
- package/lib/image_tools/colorUtils.js +0 -98
- package/lib/image_tools/imageChannel.js +0 -70
- package/lib/protocol/transport.js +0 -82
- package/lib/server/ariaSnapshot.js +0 -33
- package/lib/server/isomorphic/utilityScriptSerializers.js +0 -226
- package/lib/server/recorder/recorderInTraceViewer.js +0 -144
- package/lib/utils/ascii.js +0 -31
- package/lib/utils/comparators.js +0 -153
- package/lib/utils/crypto.js +0 -171
- package/lib/utils/debug.js +0 -46
- package/lib/utils/debugLogger.js +0 -91
- package/lib/utils/env.js +0 -49
- package/lib/utils/eventsHelper.js +0 -38
- package/lib/utils/expectUtils.js +0 -33
- package/lib/utils/fileUtils.js +0 -205
- package/lib/utils/happy-eyeballs.js +0 -194
- package/lib/utils/headers.js +0 -52
- package/lib/utils/hostPlatform.js +0 -139
- package/lib/utils/httpServer.js +0 -237
- package/lib/utils/index.js +0 -368
- package/lib/utils/isomorphic/recorderUtils.js +0 -227
- package/lib/utils/linuxUtils.js +0 -78
- package/lib/utils/manualPromise.js +0 -109
- package/lib/utils/multimap.js +0 -75
- package/lib/utils/network.js +0 -160
- package/lib/utils/processLauncher.js +0 -248
- package/lib/utils/profiler.js +0 -53
- package/lib/utils/rtti.js +0 -44
- package/lib/utils/semaphore.js +0 -51
- package/lib/utils/sequence.js +0 -64
- package/lib/utils/spawnAsync.js +0 -45
- package/lib/utils/stackTrace.js +0 -134
- package/lib/utils/task.js +0 -58
- package/lib/utils/time.js +0 -37
- package/lib/utils/timeoutRunner.js +0 -66
- package/lib/utils/traceUtils.js +0 -44
- package/lib/utils/userAgent.js +0 -105
- package/lib/utils/wsServer.js +0 -127
- package/lib/utils/zipFile.js +0 -75
- package/lib/utils/zones.js +0 -71
- package/lib/vite/recorder/assets/codeMirrorModule-AFvV6hAs.js +0 -24
- package/lib/vite/recorder/assets/index-_cTWgVuJ.js +0 -184
- package/lib/vite/traceViewer/assets/codeMirrorModule-KatbITLF.js +0 -24
- package/lib/vite/traceViewer/assets/inspectorTab-DdpLd2bb.js +0 -68
- package/lib/vite/traceViewer/assets/testServerConnection-DeE2kSzz.js +0 -1
- package/lib/vite/traceViewer/assets/workbench-CdYbzWFD.js +0 -9
- package/lib/vite/traceViewer/embedded.6m3UZh7r.js +0 -2
- package/lib/vite/traceViewer/embedded.html +0 -18
- package/lib/vite/traceViewer/embedded.w7WN2u1R.css +0 -1
- package/lib/vite/traceViewer/index.WUV-8boJ.js +0 -2
- package/lib/vite/traceViewer/inspectorTab.DEOUW62d.css +0 -1
- package/lib/vite/traceViewer/recorder.B_SY1GJM.css +0 -0
- package/lib/vite/traceViewer/recorder.OT2tVHgn.js +0 -2
- package/lib/vite/traceViewer/recorder.html +0 -17
- package/lib/vite/traceViewer/uiMode.BZBTyvGn.js +0 -5
- package/lib/vite/traceViewer/workbench.C-zR9ysA.css +0 -1
- /package/lib/vite/recorder/assets/{codeMirrorModule-ez37Vkbh.css → codeMirrorModule-C3UTv-Ge.css} +0 -0
- /package/lib/vite/traceViewer/{codeMirrorModule.ez37Vkbh.css → codeMirrorModule.C3UTv-Ge.css} +0 -0
- /package/lib/vite/traceViewer/{index.CrbWWHbf.css → index.CFOW-Ezb.css} +0 -0
- /package/lib/vite/traceViewer/{xtermModule.DSXBckUd.css → xtermModule.Beg8tuEN.css} +0 -0
package/types/types.d.ts
CHANGED
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import { ChildProcess } from 'child_process';
|
|
18
|
-
import { EventEmitter } from 'events';
|
|
19
18
|
import { Readable } from 'stream';
|
|
20
19
|
import { ReadStream } from 'fs';
|
|
21
20
|
import { Protocol } from './protocol';
|
|
@@ -2565,6 +2564,12 @@ export interface Page {
|
|
|
2565
2564
|
*/
|
|
2566
2565
|
colorScheme?: null|"light"|"dark"|"no-preference";
|
|
2567
2566
|
|
|
2567
|
+
/**
|
|
2568
|
+
* Emulates `'prefers-contrast'` media feature, supported values are `'no-preference'`, `'more'`. Passing `null`
|
|
2569
|
+
* disables contrast emulation.
|
|
2570
|
+
*/
|
|
2571
|
+
contrast?: null|"no-preference"|"more";
|
|
2572
|
+
|
|
2568
2573
|
/**
|
|
2569
2574
|
* Emulates `'forced-colors'` media feature, supported values are `'active'` and `'none'`. Passing `null` disables
|
|
2570
2575
|
* forced colors emulation.
|
|
@@ -3609,8 +3614,6 @@ export interface Page {
|
|
|
3609
3614
|
/**
|
|
3610
3615
|
* Returns the PDF buffer.
|
|
3611
3616
|
*
|
|
3612
|
-
* **NOTE** Generating a pdf is currently only supported in Chromium headless.
|
|
3613
|
-
*
|
|
3614
3617
|
* `page.pdf()` generates a pdf of the page with `print` css media. To generate a pdf with `screen` media, call
|
|
3615
3618
|
* [page.emulateMedia([options])](https://playwright.dev/docs/api/class-page#page-emulate-media) before calling
|
|
3616
3619
|
* `page.pdf()`:
|
|
@@ -3971,9 +3974,9 @@ export interface Page {
|
|
|
3971
3974
|
*
|
|
3972
3975
|
* **NOTE** Enabling routing disables http cache.
|
|
3973
3976
|
*
|
|
3974
|
-
* @param url A glob pattern, regex pattern or predicate
|
|
3975
|
-
* [`baseURL`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-base-url)
|
|
3976
|
-
* options
|
|
3977
|
+
* @param url A glob pattern, regex pattern, or predicate that receives a [URL] to match during routing. If
|
|
3978
|
+
* [`baseURL`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-base-url) is set in the
|
|
3979
|
+
* context options and the provided URL is a string that does not start with `*`, it is resolved using the
|
|
3977
3980
|
* [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor.
|
|
3978
3981
|
* @param handler handler function to route the request.
|
|
3979
3982
|
* @param options
|
|
@@ -4296,7 +4299,7 @@ export interface Page {
|
|
|
4296
4299
|
* takes priority over
|
|
4297
4300
|
* [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout).
|
|
4298
4301
|
*
|
|
4299
|
-
* @param timeout Maximum time in milliseconds
|
|
4302
|
+
* @param timeout Maximum time in milliseconds. Pass `0` to disable timeout.
|
|
4300
4303
|
*/
|
|
4301
4304
|
setDefaultTimeout(timeout: number): void;
|
|
4302
4305
|
|
|
@@ -8961,9 +8964,13 @@ export interface BrowserContext {
|
|
|
8961
8964
|
/**
|
|
8962
8965
|
* Grants specified permissions to the browser context. Only grants corresponding permissions to the given origin if
|
|
8963
8966
|
* specified.
|
|
8964
|
-
* @param permissions A
|
|
8967
|
+
* @param permissions A list of permissions to grant.
|
|
8968
|
+
*
|
|
8969
|
+
* **NOTE** Supported permissions differ between browsers, and even between different versions of the same browser.
|
|
8970
|
+
* Any permission may stop working after an update.
|
|
8971
|
+
*
|
|
8972
|
+
* Here are some permissions that may be supported by some browsers:
|
|
8965
8973
|
* - `'accelerometer'`
|
|
8966
|
-
* - `'accessibility-events'`
|
|
8967
8974
|
* - `'ambient-light-sensor'`
|
|
8968
8975
|
* - `'background-sync'`
|
|
8969
8976
|
* - `'camera'`
|
|
@@ -9061,9 +9068,9 @@ export interface BrowserContext {
|
|
|
9061
9068
|
*
|
|
9062
9069
|
* **NOTE** Enabling routing disables http cache.
|
|
9063
9070
|
*
|
|
9064
|
-
* @param url A glob pattern, regex pattern or predicate
|
|
9065
|
-
* [`baseURL`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-base-url)
|
|
9066
|
-
* options
|
|
9071
|
+
* @param url A glob pattern, regex pattern, or predicate that receives a [URL] to match during routing. If
|
|
9072
|
+
* [`baseURL`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-base-url) is set in the
|
|
9073
|
+
* context options and the provided URL is a string that does not start with `*`, it is resolved using the
|
|
9067
9074
|
* [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor.
|
|
9068
9075
|
* @param handler handler function to route the request.
|
|
9069
9076
|
* @param options
|
|
@@ -9191,7 +9198,7 @@ export interface BrowserContext {
|
|
|
9191
9198
|
* take priority over
|
|
9192
9199
|
* [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout).
|
|
9193
9200
|
*
|
|
9194
|
-
* @param timeout Maximum time in milliseconds
|
|
9201
|
+
* @param timeout Maximum time in milliseconds. Pass `0` to disable timeout.
|
|
9195
9202
|
*/
|
|
9196
9203
|
setDefaultTimeout(timeout: number): void;
|
|
9197
9204
|
|
|
@@ -9258,10 +9265,18 @@ export interface BrowserContext {
|
|
|
9258
9265
|
setOffline(offline: boolean): Promise<void>;
|
|
9259
9266
|
|
|
9260
9267
|
/**
|
|
9261
|
-
* Returns storage state for this browser context, contains current cookies
|
|
9268
|
+
* Returns storage state for this browser context, contains current cookies, local storage snapshot and IndexedDB
|
|
9269
|
+
* snapshot.
|
|
9262
9270
|
* @param options
|
|
9263
9271
|
*/
|
|
9264
9272
|
storageState(options?: {
|
|
9273
|
+
/**
|
|
9274
|
+
* Set to `true` to include [IndexedDB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API) in the storage
|
|
9275
|
+
* state snapshot. If your application uses IndexedDB to store authentication tokens, like Firebase Authentication,
|
|
9276
|
+
* enable this.
|
|
9277
|
+
*/
|
|
9278
|
+
indexedDB?: boolean;
|
|
9279
|
+
|
|
9265
9280
|
/**
|
|
9266
9281
|
* The file path to save the storage state to. If
|
|
9267
9282
|
* [`path`](https://playwright.dev/docs/api/class-browsercontext#browser-context-storage-state-option-path) is a
|
|
@@ -9587,10 +9602,11 @@ export interface Browser {
|
|
|
9587
9602
|
* In case this browser is connected to, clears all created contexts belonging to this browser and disconnects from
|
|
9588
9603
|
* the browser server.
|
|
9589
9604
|
*
|
|
9590
|
-
* **NOTE** This is similar to force
|
|
9605
|
+
* **NOTE** This is similar to force-quitting the browser. To close pages gracefully and ensure you receive page close
|
|
9606
|
+
* events, call
|
|
9591
9607
|
* [browserContext.close([options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-close) on
|
|
9592
|
-
* any [BrowserContext](https://playwright.dev/docs/api/class-browsercontext)
|
|
9593
|
-
* [browser.newContext([options])](https://playwright.dev/docs/api/class-browser#browser-new-context) **before**
|
|
9608
|
+
* any [BrowserContext](https://playwright.dev/docs/api/class-browsercontext) instances you explicitly created earlier
|
|
9609
|
+
* using [browser.newContext([options])](https://playwright.dev/docs/api/class-browser#browser-new-context) **before**
|
|
9594
9610
|
* calling [browser.close([options])](https://playwright.dev/docs/api/class-browser#browser-close).
|
|
9595
9611
|
*
|
|
9596
9612
|
* The [Browser](https://playwright.dev/docs/api/class-browser) object itself is considered to be disposed and cannot
|
|
@@ -9767,6 +9783,13 @@ export interface Browser {
|
|
|
9767
9783
|
*/
|
|
9768
9784
|
colorScheme?: null|"light"|"dark"|"no-preference";
|
|
9769
9785
|
|
|
9786
|
+
/**
|
|
9787
|
+
* Emulates `'prefers-contrast'` media feature, supported values are `'no-preference'`, `'more'`. See
|
|
9788
|
+
* [page.emulateMedia([options])](https://playwright.dev/docs/api/class-page#page-emulate-media) for more details.
|
|
9789
|
+
* Passing `null` resets emulation to system defaults. Defaults to `'no-preference'`.
|
|
9790
|
+
*/
|
|
9791
|
+
contrast?: null|"no-preference"|"more";
|
|
9792
|
+
|
|
9770
9793
|
/**
|
|
9771
9794
|
* Specify device scale factor (can be thought of as dpr). Defaults to `1`. Learn more about
|
|
9772
9795
|
* [emulating devices with device scale factor](https://playwright.dev/docs/emulation#devices).
|
|
@@ -10046,12 +10069,12 @@ export interface Browser {
|
|
|
10046
10069
|
sameSite: "Strict"|"Lax"|"None";
|
|
10047
10070
|
}>;
|
|
10048
10071
|
|
|
10049
|
-
/**
|
|
10050
|
-
* localStorage to set for context
|
|
10051
|
-
*/
|
|
10052
10072
|
origins: Array<{
|
|
10053
10073
|
origin: string;
|
|
10054
10074
|
|
|
10075
|
+
/**
|
|
10076
|
+
* localStorage to set for context
|
|
10077
|
+
*/
|
|
10055
10078
|
localStorage: Array<{
|
|
10056
10079
|
name: string;
|
|
10057
10080
|
|
|
@@ -11624,7 +11647,8 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
|
|
|
11624
11647
|
* Specify locators that should be masked when the screenshot is taken. Masked elements will be overlaid with a pink
|
|
11625
11648
|
* box `#FF00FF` (customized by
|
|
11626
11649
|
* [`maskColor`](https://playwright.dev/docs/api/class-elementhandle#element-handle-screenshot-option-mask-color))
|
|
11627
|
-
* that completely covers its bounding box.
|
|
11650
|
+
* that completely covers its bounding box. The mask is also applied to invisible elements, see
|
|
11651
|
+
* [Matching only visible elements](https://playwright.dev/docs/locators#matching-only-visible-elements) to disable that.
|
|
11628
11652
|
*/
|
|
11629
11653
|
mask?: Array<Locator>;
|
|
11630
11654
|
|
|
@@ -12173,12 +12197,6 @@ export interface Locator {
|
|
|
12173
12197
|
* rejects, this method throws.
|
|
12174
12198
|
*
|
|
12175
12199
|
* **Usage**
|
|
12176
|
-
*
|
|
12177
|
-
* ```js
|
|
12178
|
-
* const tweets = page.locator('.tweet .retweets');
|
|
12179
|
-
* expect(await tweets.evaluate(node => node.innerText)).toBe('10 retweets');
|
|
12180
|
-
* ```
|
|
12181
|
-
*
|
|
12182
12200
|
* @param pageFunction Function to be evaluated in the page context.
|
|
12183
12201
|
* @param arg Optional argument to pass to
|
|
12184
12202
|
* [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-expression).
|
|
@@ -12204,12 +12222,6 @@ export interface Locator {
|
|
|
12204
12222
|
* rejects, this method throws.
|
|
12205
12223
|
*
|
|
12206
12224
|
* **Usage**
|
|
12207
|
-
*
|
|
12208
|
-
* ```js
|
|
12209
|
-
* const tweets = page.locator('.tweet .retweets');
|
|
12210
|
-
* expect(await tweets.evaluate(node => node.innerText)).toBe('10 retweets');
|
|
12211
|
-
* ```
|
|
12212
|
-
*
|
|
12213
12225
|
* @param pageFunction Function to be evaluated in the page context.
|
|
12214
12226
|
* @param arg Optional argument to pass to
|
|
12215
12227
|
* [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-expression).
|
|
@@ -12466,6 +12478,12 @@ export interface Locator {
|
|
|
12466
12478
|
* @param options
|
|
12467
12479
|
*/
|
|
12468
12480
|
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
|
+
|
|
12469
12487
|
/**
|
|
12470
12488
|
* Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
|
|
12471
12489
|
* option in the config, or by using the
|
|
@@ -12912,7 +12930,6 @@ export interface Locator {
|
|
|
12912
12930
|
* live objects to be passed into the event:
|
|
12913
12931
|
*
|
|
12914
12932
|
* ```js
|
|
12915
|
-
* // Note you can only create DataTransfer in Chromium and Firefox
|
|
12916
12933
|
* const dataTransfer = await page.evaluateHandle(() => new DataTransfer());
|
|
12917
12934
|
* await locator.dispatchEvent('dragstart', { dataTransfer });
|
|
12918
12935
|
* ```
|
|
@@ -13109,6 +13126,11 @@ export interface Locator {
|
|
|
13109
13126
|
* `<article><div>Playwright</div></article>`.
|
|
13110
13127
|
*/
|
|
13111
13128
|
hasText?: string|RegExp;
|
|
13129
|
+
|
|
13130
|
+
/**
|
|
13131
|
+
* Only matches visible or invisible elements.
|
|
13132
|
+
*/
|
|
13133
|
+
visible?: boolean;
|
|
13112
13134
|
}): Locator;
|
|
13113
13135
|
|
|
13114
13136
|
/**
|
|
@@ -13676,7 +13698,9 @@ export interface Locator {
|
|
|
13676
13698
|
}): Promise<boolean>;
|
|
13677
13699
|
|
|
13678
13700
|
/**
|
|
13679
|
-
* Returns whether the element is [editable](https://playwright.dev/docs/actionability#editable).
|
|
13701
|
+
* Returns whether the element is [editable](https://playwright.dev/docs/actionability#editable). If the target element is not an `<input>`,
|
|
13702
|
+
* `<textarea>`, `<select>`, `[contenteditable]` and does not have a role allowing `[aria-readonly]`, this method
|
|
13703
|
+
* throws an error.
|
|
13680
13704
|
*
|
|
13681
13705
|
* **NOTE** If you need to assert that an element is editable, prefer
|
|
13682
13706
|
* [expect(locator).toBeEditable([options])](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-be-editable)
|
|
@@ -13848,18 +13872,22 @@ export interface Locator {
|
|
|
13848
13872
|
/**
|
|
13849
13873
|
* Creates a locator matching all elements that match one or both of the two locators.
|
|
13850
13874
|
*
|
|
13851
|
-
* Note that when both locators match something, the resulting locator will have multiple matches
|
|
13852
|
-
* [locator strictness](https://playwright.dev/docs/locators#strictness)
|
|
13875
|
+
* Note that when both locators match something, the resulting locator will have multiple matches, potentially causing
|
|
13876
|
+
* a [locator strictness](https://playwright.dev/docs/locators#strictness) violation.
|
|
13853
13877
|
*
|
|
13854
13878
|
* **Usage**
|
|
13855
13879
|
*
|
|
13856
13880
|
* Consider a scenario where you'd like to click on a "New email" button, but sometimes a security settings dialog
|
|
13857
13881
|
* shows up instead. In this case, you can wait for either a "New email" button, or a dialog and act accordingly.
|
|
13858
13882
|
*
|
|
13883
|
+
* **NOTE** If both "New email" button and security dialog appear on screen, the "or" locator will match both of them,
|
|
13884
|
+
* possibly throwing the ["strict mode violation" error](https://playwright.dev/docs/locators#strictness). In this case, you can use
|
|
13885
|
+
* [locator.first()](https://playwright.dev/docs/api/class-locator#locator-first) to only match one of them.
|
|
13886
|
+
*
|
|
13859
13887
|
* ```js
|
|
13860
13888
|
* const newEmail = page.getByRole('button', { name: 'New' });
|
|
13861
13889
|
* const dialog = page.getByText('Confirm security settings');
|
|
13862
|
-
* await expect(newEmail.or(dialog)).toBeVisible();
|
|
13890
|
+
* await expect(newEmail.or(dialog).first()).toBeVisible();
|
|
13863
13891
|
* if (await dialog.isVisible())
|
|
13864
13892
|
* await page.getByRole('button', { name: 'Dismiss' }).click();
|
|
13865
13893
|
* await newEmail.click();
|
|
@@ -14054,9 +14082,9 @@ export interface Locator {
|
|
|
14054
14082
|
*
|
|
14055
14083
|
* ```html
|
|
14056
14084
|
* <select multiple>
|
|
14057
|
-
* <option value="red">Red</
|
|
14058
|
-
* <option value="green">Green</
|
|
14059
|
-
* <option value="blue">Blue</
|
|
14085
|
+
* <option value="red">Red</option>
|
|
14086
|
+
* <option value="green">Green</option>
|
|
14087
|
+
* <option value="blue">Blue</option>
|
|
14060
14088
|
* </select>
|
|
14061
14089
|
* ```
|
|
14062
14090
|
*
|
|
@@ -14305,7 +14333,8 @@ export interface Locator {
|
|
|
14305
14333
|
}): Promise<void>;
|
|
14306
14334
|
|
|
14307
14335
|
/**
|
|
14308
|
-
* Perform a tap gesture on the element matching the locator.
|
|
14336
|
+
* Perform a tap gesture on the element matching the locator. For examples of emulating other gestures by manually
|
|
14337
|
+
* dispatching touch events, see the [emulating legacy touch events](https://playwright.dev/docs/touch-events) page.
|
|
14309
14338
|
*
|
|
14310
14339
|
* **Details**
|
|
14311
14340
|
*
|
|
@@ -14558,6 +14587,11 @@ export interface BrowserType<Unused = {}> {
|
|
|
14558
14587
|
*
|
|
14559
14588
|
* **NOTE** Connecting over the Chrome DevTools Protocol is only supported for Chromium-based browsers.
|
|
14560
14589
|
*
|
|
14590
|
+
* **NOTE** This connection is significantly lower fidelity than the Playwright protocol connection via
|
|
14591
|
+
* [browserType.connect(wsEndpoint[, options])](https://playwright.dev/docs/api/class-browsertype#browser-type-connect).
|
|
14592
|
+
* If you are experiencing issues or attempting to use advanced functionality, you probably want to use
|
|
14593
|
+
* [browserType.connect(wsEndpoint[, options])](https://playwright.dev/docs/api/class-browsertype#browser-type-connect).
|
|
14594
|
+
*
|
|
14561
14595
|
* **Usage**
|
|
14562
14596
|
*
|
|
14563
14597
|
* ```js
|
|
@@ -14583,6 +14617,11 @@ export interface BrowserType<Unused = {}> {
|
|
|
14583
14617
|
*
|
|
14584
14618
|
* **NOTE** Connecting over the Chrome DevTools Protocol is only supported for Chromium-based browsers.
|
|
14585
14619
|
*
|
|
14620
|
+
* **NOTE** This connection is significantly lower fidelity than the Playwright protocol connection via
|
|
14621
|
+
* [browserType.connect(wsEndpoint[, options])](https://playwright.dev/docs/api/class-browsertype#browser-type-connect).
|
|
14622
|
+
* If you are experiencing issues or attempting to use advanced functionality, you probably want to use
|
|
14623
|
+
* [browserType.connect(wsEndpoint[, options])](https://playwright.dev/docs/api/class-browsertype#browser-type-connect).
|
|
14624
|
+
*
|
|
14586
14625
|
* **Usage**
|
|
14587
14626
|
*
|
|
14588
14627
|
* ```js
|
|
@@ -14597,10 +14636,12 @@ export interface BrowserType<Unused = {}> {
|
|
|
14597
14636
|
*/
|
|
14598
14637
|
connectOverCDP(options: ConnectOverCDPOptions & { wsEndpoint?: string }): Promise<Browser>;
|
|
14599
14638
|
/**
|
|
14600
|
-
* This method attaches Playwright to an existing browser instance
|
|
14601
|
-
*
|
|
14602
|
-
*
|
|
14603
|
-
*
|
|
14639
|
+
* This method attaches Playwright to an existing browser instance created via `BrowserType.launchServer` in Node.js.
|
|
14640
|
+
*
|
|
14641
|
+
* **NOTE** The major and minor version of the Playwright instance that connects needs to match the version of
|
|
14642
|
+
* Playwright that launches the browser (1.2.3 → is compatible with 1.2.x).
|
|
14643
|
+
*
|
|
14644
|
+
* @param wsEndpoint A Playwright browser websocket endpoint to connect to. You obtain this endpoint via `BrowserServer.wsEndpoint`.
|
|
14604
14645
|
* @param options
|
|
14605
14646
|
*/
|
|
14606
14647
|
connect(wsEndpoint: string, options?: ConnectOptions): Promise<Browser>;
|
|
@@ -14611,10 +14652,12 @@ export interface BrowserType<Unused = {}> {
|
|
|
14611
14652
|
* @deprecated
|
|
14612
14653
|
*/
|
|
14613
14654
|
/**
|
|
14614
|
-
* This method attaches Playwright to an existing browser instance
|
|
14615
|
-
*
|
|
14616
|
-
*
|
|
14617
|
-
*
|
|
14655
|
+
* This method attaches Playwright to an existing browser instance created via `BrowserType.launchServer` in Node.js.
|
|
14656
|
+
*
|
|
14657
|
+
* **NOTE** The major and minor version of the Playwright instance that connects needs to match the version of
|
|
14658
|
+
* Playwright that launches the browser (1.2.3 → is compatible with 1.2.x).
|
|
14659
|
+
*
|
|
14660
|
+
* @param wsEndpoint A Playwright browser websocket endpoint to connect to. You obtain this endpoint via `BrowserServer.wsEndpoint`.
|
|
14618
14661
|
* @param options
|
|
14619
14662
|
*/
|
|
14620
14663
|
connect(options: ConnectOptions & { wsEndpoint?: string }): Promise<Browser>;
|
|
@@ -14664,11 +14707,15 @@ export interface BrowserType<Unused = {}> {
|
|
|
14664
14707
|
* Launches browser that uses persistent storage located at
|
|
14665
14708
|
* [`userDataDir`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-persistent-context-option-user-data-dir)
|
|
14666
14709
|
* and returns the only context. Closing this context will automatically close the browser.
|
|
14667
|
-
* @param userDataDir Path to a User Data Directory, which stores browser session data like cookies and local storage.
|
|
14710
|
+
* @param userDataDir Path to a User Data Directory, which stores browser session data like cookies and local storage. Pass an empty
|
|
14711
|
+
* string to create a temporary directory.
|
|
14712
|
+
*
|
|
14713
|
+
* More details for
|
|
14668
14714
|
* [Chromium](https://chromium.googlesource.com/chromium/src/+/master/docs/user_data_dir.md#introduction) and
|
|
14669
|
-
* [Firefox](https://
|
|
14670
|
-
*
|
|
14671
|
-
*
|
|
14715
|
+
* [Firefox](https://wiki.mozilla.org/Firefox/CommandLineOptions#User_profile). Chromium's user data directory is the
|
|
14716
|
+
* **parent** directory of the "Profile Path" seen at `chrome://version`.
|
|
14717
|
+
*
|
|
14718
|
+
* Note that browsers do not allow launching multiple instances with the same User Data Directory.
|
|
14672
14719
|
* @param options
|
|
14673
14720
|
*/
|
|
14674
14721
|
launchPersistentContext(userDataDir: string, options?: {
|
|
@@ -14709,9 +14756,12 @@ export interface BrowserType<Unused = {}> {
|
|
|
14709
14756
|
bypassCSP?: boolean;
|
|
14710
14757
|
|
|
14711
14758
|
/**
|
|
14712
|
-
* Browser distribution channel.
|
|
14713
|
-
*
|
|
14714
|
-
* [
|
|
14759
|
+
* Browser distribution channel.
|
|
14760
|
+
*
|
|
14761
|
+
* Use "chromium" to [opt in to new headless mode](https://playwright.dev/docs/browsers#chromium-new-headless-mode).
|
|
14762
|
+
*
|
|
14763
|
+
* Use "chrome", "chrome-beta", "chrome-dev", "chrome-canary", "msedge", "msedge-beta", "msedge-dev", or
|
|
14764
|
+
* "msedge-canary" to use branded [Google Chrome and Microsoft Edge](https://playwright.dev/docs/browsers#google-chrome--microsoft-edge).
|
|
14715
14765
|
*/
|
|
14716
14766
|
channel?: string;
|
|
14717
14767
|
|
|
@@ -14784,6 +14834,13 @@ export interface BrowserType<Unused = {}> {
|
|
|
14784
14834
|
*/
|
|
14785
14835
|
colorScheme?: null|"light"|"dark"|"no-preference";
|
|
14786
14836
|
|
|
14837
|
+
/**
|
|
14838
|
+
* Emulates `'prefers-contrast'` media feature, supported values are `'no-preference'`, `'more'`. See
|
|
14839
|
+
* [page.emulateMedia([options])](https://playwright.dev/docs/api/class-page#page-emulate-media) for more details.
|
|
14840
|
+
* Passing `null` resets emulation to system defaults. Defaults to `'no-preference'`.
|
|
14841
|
+
*/
|
|
14842
|
+
contrast?: null|"no-preference"|"more";
|
|
14843
|
+
|
|
14787
14844
|
/**
|
|
14788
14845
|
* Specify device scale factor (can be thought of as dpr). Defaults to `1`. Learn more about
|
|
14789
14846
|
* [emulating devices with device scale factor](https://playwright.dev/docs/emulation#devices).
|
|
@@ -14877,7 +14934,7 @@ export interface BrowserType<Unused = {}> {
|
|
|
14877
14934
|
/**
|
|
14878
14935
|
* Whether to run browser in headless mode. More details for
|
|
14879
14936
|
* [Chromium](https://developers.google.com/web/updates/2017/04/headless-chrome) and
|
|
14880
|
-
* [Firefox](https://
|
|
14937
|
+
* [Firefox](https://hacks.mozilla.org/2017/12/using-headless-mode-in-firefox/). Defaults to `true` unless the
|
|
14881
14938
|
* [`devtools`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-devtools) option is
|
|
14882
14939
|
* `true`.
|
|
14883
14940
|
*/
|
|
@@ -15205,9 +15262,12 @@ export interface BrowserType<Unused = {}> {
|
|
|
15205
15262
|
args?: Array<string>;
|
|
15206
15263
|
|
|
15207
15264
|
/**
|
|
15208
|
-
* Browser distribution channel.
|
|
15209
|
-
*
|
|
15210
|
-
* [
|
|
15265
|
+
* Browser distribution channel.
|
|
15266
|
+
*
|
|
15267
|
+
* Use "chromium" to [opt in to new headless mode](https://playwright.dev/docs/browsers#chromium-new-headless-mode).
|
|
15268
|
+
*
|
|
15269
|
+
* Use "chrome", "chrome-beta", "chrome-dev", "chrome-canary", "msedge", "msedge-beta", "msedge-dev", or
|
|
15270
|
+
* "msedge-canary" to use branded [Google Chrome and Microsoft Edge](https://playwright.dev/docs/browsers#google-chrome--microsoft-edge).
|
|
15211
15271
|
*/
|
|
15212
15272
|
channel?: string;
|
|
15213
15273
|
|
|
@@ -15268,7 +15328,7 @@ export interface BrowserType<Unused = {}> {
|
|
|
15268
15328
|
/**
|
|
15269
15329
|
* Whether to run browser in headless mode. More details for
|
|
15270
15330
|
* [Chromium](https://developers.google.com/web/updates/2017/04/headless-chrome) and
|
|
15271
|
-
* [Firefox](https://
|
|
15331
|
+
* [Firefox](https://hacks.mozilla.org/2017/12/using-headless-mode-in-firefox/). Defaults to `true` unless the
|
|
15272
15332
|
* [`devtools`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-devtools) option is
|
|
15273
15333
|
* `true`.
|
|
15274
15334
|
*/
|
|
@@ -16594,9 +16654,11 @@ export interface AndroidDevice {
|
|
|
16594
16654
|
colorScheme?: null|"light"|"dark"|"no-preference";
|
|
16595
16655
|
|
|
16596
16656
|
/**
|
|
16597
|
-
*
|
|
16657
|
+
* Emulates `'prefers-contrast'` media feature, supported values are `'no-preference'`, `'more'`. See
|
|
16658
|
+
* [page.emulateMedia([options])](https://playwright.dev/docs/api/class-page#page-emulate-media) for more details.
|
|
16659
|
+
* Passing `null` resets emulation to system defaults. Defaults to `'no-preference'`.
|
|
16598
16660
|
*/
|
|
16599
|
-
|
|
16661
|
+
contrast?: null|"no-preference"|"more";
|
|
16600
16662
|
|
|
16601
16663
|
/**
|
|
16602
16664
|
* Specify device scale factor (can be thought of as dpr). Defaults to `1`. Learn more about
|
|
@@ -16706,6 +16768,11 @@ export interface AndroidDevice {
|
|
|
16706
16768
|
*/
|
|
16707
16769
|
permissions?: Array<string>;
|
|
16708
16770
|
|
|
16771
|
+
/**
|
|
16772
|
+
* Optional package name to launch instead of default Chrome for Android.
|
|
16773
|
+
*/
|
|
16774
|
+
pkg?: string;
|
|
16775
|
+
|
|
16709
16776
|
/**
|
|
16710
16777
|
* Network proxy settings.
|
|
16711
16778
|
*/
|
|
@@ -17468,6 +17535,12 @@ export interface APIRequest {
|
|
|
17468
17535
|
*/
|
|
17469
17536
|
extraHTTPHeaders?: { [key: string]: string; };
|
|
17470
17537
|
|
|
17538
|
+
/**
|
|
17539
|
+
* Whether to throw on response codes other than 2xx and 3xx. By default response object is returned for all status
|
|
17540
|
+
* codes.
|
|
17541
|
+
*/
|
|
17542
|
+
failOnStatusCode?: boolean;
|
|
17543
|
+
|
|
17471
17544
|
/**
|
|
17472
17545
|
* Credentials for [HTTP authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication). If no
|
|
17473
17546
|
* origin is specified, the username and password are sent to any servers upon unauthorized responses.
|
|
@@ -17497,6 +17570,13 @@ export interface APIRequest {
|
|
|
17497
17570
|
*/
|
|
17498
17571
|
ignoreHTTPSErrors?: boolean;
|
|
17499
17572
|
|
|
17573
|
+
/**
|
|
17574
|
+
* Maximum number of request redirects that will be followed automatically. An error will be thrown if the number is
|
|
17575
|
+
* exceeded. Defaults to `20`. Pass `0` to not follow redirects. This can be overwritten for each request
|
|
17576
|
+
* individually.
|
|
17577
|
+
*/
|
|
17578
|
+
maxRedirects?: number;
|
|
17579
|
+
|
|
17500
17580
|
/**
|
|
17501
17581
|
* Network proxy settings.
|
|
17502
17582
|
*/
|
|
@@ -18337,6 +18417,11 @@ export interface APIRequestContext {
|
|
|
18337
18417
|
* @param options
|
|
18338
18418
|
*/
|
|
18339
18419
|
storageState(options?: {
|
|
18420
|
+
/**
|
|
18421
|
+
* Set to `true` to include IndexedDB in the storage state snapshot.
|
|
18422
|
+
*/
|
|
18423
|
+
indexedDB?: boolean;
|
|
18424
|
+
|
|
18340
18425
|
/**
|
|
18341
18426
|
* The file path to save the storage state to. If
|
|
18342
18427
|
* [`path`](https://playwright.dev/docs/api/class-apirequestcontext#api-request-context-storage-state-option-path) is
|
|
@@ -18580,6 +18665,19 @@ export interface Clock {
|
|
|
18580
18665
|
* await page.clock.pauseAt('2020-02-02');
|
|
18581
18666
|
* ```
|
|
18582
18667
|
*
|
|
18668
|
+
* For best results, install the clock before navigating the page and set it to a time slightly before the intended
|
|
18669
|
+
* test time. This ensures that all timers run normally during page loading, preventing the page from getting stuck.
|
|
18670
|
+
* Once the page has fully loaded, you can safely use
|
|
18671
|
+
* [clock.pauseAt(time)](https://playwright.dev/docs/api/class-clock#clock-pause-at) to pause the clock.
|
|
18672
|
+
*
|
|
18673
|
+
* ```js
|
|
18674
|
+
* // Initialize clock with some time before the test time and let the page load
|
|
18675
|
+
* // naturally. `Date.now` will progress as the timers fire.
|
|
18676
|
+
* await page.clock.install({ time: new Date('2024-12-10T08:00:00') });
|
|
18677
|
+
* await page.goto('http://localhost:3333');
|
|
18678
|
+
* await page.clock.pauseAt(new Date('2024-12-10T10:00:00'));
|
|
18679
|
+
* ```
|
|
18680
|
+
*
|
|
18583
18681
|
* @param time Time to pause at.
|
|
18584
18682
|
*/
|
|
18585
18683
|
pauseAt(time: number|string|Date): Promise<void>;
|
|
@@ -20685,6 +20783,11 @@ export interface Route {
|
|
|
20685
20783
|
* request to the network, other matching handlers won't be invoked. Use
|
|
20686
20784
|
* [route.fallback([options])](https://playwright.dev/docs/api/class-route#route-fallback) If you want next matching
|
|
20687
20785
|
* handler in the chain to be invoked.
|
|
20786
|
+
*
|
|
20787
|
+
* **NOTE** The `Cookie` header cannot be overridden using this method. If a value is provided, it will be ignored,
|
|
20788
|
+
* and the cookie will be loaded from the browser's cookie store. To set custom cookies, use
|
|
20789
|
+
* [browserContext.addCookies(cookies)](https://playwright.dev/docs/api/class-browsercontext#browser-context-add-cookies).
|
|
20790
|
+
*
|
|
20688
20791
|
* @param options
|
|
20689
20792
|
*/
|
|
20690
20793
|
continue(options?: {
|
|
@@ -21022,6 +21125,9 @@ export interface Selectors {
|
|
|
21022
21125
|
/**
|
|
21023
21126
|
* The Touchscreen class operates in main-frame CSS pixels relative to the top-left corner of the viewport. Methods on
|
|
21024
21127
|
* the touchscreen can only be used in browser contexts that have been initialized with `hasTouch` set to true.
|
|
21128
|
+
*
|
|
21129
|
+
* This class is limited to emulating tap gestures. For examples of other gestures simulated by manually dispatching
|
|
21130
|
+
* touch events, see the [emulating legacy touch events](https://playwright.dev/docs/touch-events) page.
|
|
21025
21131
|
*/
|
|
21026
21132
|
export interface Touchscreen {
|
|
21027
21133
|
/**
|
|
@@ -21272,8 +21378,11 @@ export interface WebError {
|
|
|
21272
21378
|
}
|
|
21273
21379
|
|
|
21274
21380
|
/**
|
|
21275
|
-
* The [WebSocket](https://playwright.dev/docs/api/class-websocket) class represents
|
|
21276
|
-
* page.
|
|
21381
|
+
* The [WebSocket](https://playwright.dev/docs/api/class-websocket) class represents WebSocket connections within a
|
|
21382
|
+
* page. It provides the ability to inspect and manipulate the data being transmitted and received.
|
|
21383
|
+
*
|
|
21384
|
+
* If you want to intercept or modify WebSocket frames, consider using
|
|
21385
|
+
* [WebSocketRoute](https://playwright.dev/docs/api/class-websocketroute).
|
|
21277
21386
|
*/
|
|
21278
21387
|
export interface WebSocket {
|
|
21279
21388
|
/**
|
|
@@ -21540,9 +21649,12 @@ export interface LaunchOptions {
|
|
|
21540
21649
|
args?: Array<string>;
|
|
21541
21650
|
|
|
21542
21651
|
/**
|
|
21543
|
-
* Browser distribution channel.
|
|
21544
|
-
*
|
|
21545
|
-
* [
|
|
21652
|
+
* Browser distribution channel.
|
|
21653
|
+
*
|
|
21654
|
+
* Use "chromium" to [opt in to new headless mode](https://playwright.dev/docs/browsers#chromium-new-headless-mode).
|
|
21655
|
+
*
|
|
21656
|
+
* Use "chrome", "chrome-beta", "chrome-dev", "chrome-canary", "msedge", "msedge-beta", "msedge-dev", or
|
|
21657
|
+
* "msedge-canary" to use branded [Google Chrome and Microsoft Edge](https://playwright.dev/docs/browsers#google-chrome--microsoft-edge).
|
|
21546
21658
|
*/
|
|
21547
21659
|
channel?: string;
|
|
21548
21660
|
|
|
@@ -21603,7 +21715,7 @@ export interface LaunchOptions {
|
|
|
21603
21715
|
/**
|
|
21604
21716
|
* Whether to run browser in headless mode. More details for
|
|
21605
21717
|
* [Chromium](https://developers.google.com/web/updates/2017/04/headless-chrome) and
|
|
21606
|
-
* [Firefox](https://
|
|
21718
|
+
* [Firefox](https://hacks.mozilla.org/2017/12/using-headless-mode-in-firefox/). Defaults to `true` unless the
|
|
21607
21719
|
* [`devtools`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-devtools) option is
|
|
21608
21720
|
* `true`.
|
|
21609
21721
|
*/
|
|
@@ -21755,7 +21867,8 @@ export interface LocatorScreenshotOptions {
|
|
|
21755
21867
|
* Specify locators that should be masked when the screenshot is taken. Masked elements will be overlaid with a pink
|
|
21756
21868
|
* box `#FF00FF` (customized by
|
|
21757
21869
|
* [`maskColor`](https://playwright.dev/docs/api/class-locator#locator-screenshot-option-mask-color)) that completely
|
|
21758
|
-
* covers its bounding box.
|
|
21870
|
+
* covers its bounding box. The mask is also applied to invisible elements, see
|
|
21871
|
+
* [Matching only visible elements](https://playwright.dev/docs/locators#matching-only-visible-elements) to disable that.
|
|
21759
21872
|
*/
|
|
21760
21873
|
mask?: Array<Locator>;
|
|
21761
21874
|
|
|
@@ -21934,6 +22047,13 @@ export interface BrowserContextOptions {
|
|
|
21934
22047
|
*/
|
|
21935
22048
|
colorScheme?: null|"light"|"dark"|"no-preference";
|
|
21936
22049
|
|
|
22050
|
+
/**
|
|
22051
|
+
* Emulates `'prefers-contrast'` media feature, supported values are `'no-preference'`, `'more'`. See
|
|
22052
|
+
* [page.emulateMedia([options])](https://playwright.dev/docs/api/class-page#page-emulate-media) for more details.
|
|
22053
|
+
* Passing `null` resets emulation to system defaults. Defaults to `'no-preference'`.
|
|
22054
|
+
*/
|
|
22055
|
+
contrast?: null|"no-preference"|"more";
|
|
22056
|
+
|
|
21937
22057
|
/**
|
|
21938
22058
|
* Specify device scale factor (can be thought of as dpr). Defaults to `1`. Learn more about
|
|
21939
22059
|
* [emulating devices with device scale factor](https://playwright.dev/docs/emulation#devices).
|
|
@@ -22180,12 +22300,12 @@ export interface BrowserContextOptions {
|
|
|
22180
22300
|
sameSite: "Strict"|"Lax"|"None";
|
|
22181
22301
|
}>;
|
|
22182
22302
|
|
|
22183
|
-
/**
|
|
22184
|
-
* localStorage to set for context
|
|
22185
|
-
*/
|
|
22186
22303
|
origins: Array<{
|
|
22187
22304
|
origin: string;
|
|
22188
22305
|
|
|
22306
|
+
/**
|
|
22307
|
+
* localStorage to set for context
|
|
22308
|
+
*/
|
|
22189
22309
|
localStorage: Array<{
|
|
22190
22310
|
name: string;
|
|
22191
22311
|
|
|
@@ -22413,7 +22533,8 @@ export interface PageScreenshotOptions {
|
|
|
22413
22533
|
* Specify locators that should be masked when the screenshot is taken. Masked elements will be overlaid with a pink
|
|
22414
22534
|
* box `#FF00FF` (customized by
|
|
22415
22535
|
* [`maskColor`](https://playwright.dev/docs/api/class-page#page-screenshot-option-mask-color)) that completely covers
|
|
22416
|
-
* its bounding box.
|
|
22536
|
+
* its bounding box. The mask is also applied to invisible elements, see
|
|
22537
|
+
* [Matching only visible elements](https://playwright.dev/docs/locators#matching-only-visible-elements) to disable that.
|
|
22417
22538
|
*/
|
|
22418
22539
|
mask?: Array<Locator>;
|
|
22419
22540
|
|
package/bin/PrintDeps.exe
DELETED
|
Binary file
|
package/bin/README.md
DELETED