@zohodesk/testinglibrary 3.2.13 → 3.2.14
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/.gitlab-ci.yml +13 -13
- package/build/common/data-generator/steps/DataGeneratorStepsHelper.js +3 -1
- package/build/core/dataGenerator/DataGenerator.js +0 -9
- package/build/core/playwright/helpers/auth/getUsers.js +2 -1
- package/build/test/Test.js +13 -0
- package/npm-shrinkwrap.json +140 -220
- package/package.json +1 -3
- package/playwright-mcp-test/node_modules/.package-lock.json +0 -54
- package/playwright-mcp-test/node_modules/@playwright/mcp/LICENSE +0 -202
- package/playwright-mcp-test/node_modules/@playwright/mcp/README.md +0 -907
- package/playwright-mcp-test/node_modules/@playwright/mcp/cli.js +0 -24
- package/playwright-mcp-test/node_modules/@playwright/mcp/config.d.ts +0 -174
- package/playwright-mcp-test/node_modules/@playwright/mcp/index.d.ts +0 -23
- package/playwright-mcp-test/node_modules/@playwright/mcp/index.js +0 -19
- package/playwright-mcp-test/node_modules/@playwright/mcp/package.json +0 -52
- package/playwright-mcp-test/node_modules/playwright/LICENSE +0 -202
- package/playwright-mcp-test/node_modules/playwright/NOTICE +0 -5
- package/playwright-mcp-test/node_modules/playwright/README.md +0 -168
- package/playwright-mcp-test/node_modules/playwright/ThirdPartyNotices.txt +0 -6277
- package/playwright-mcp-test/node_modules/playwright/cli.js +0 -19
- package/playwright-mcp-test/node_modules/playwright/index.d.ts +0 -17
- package/playwright-mcp-test/node_modules/playwright/index.js +0 -17
- package/playwright-mcp-test/node_modules/playwright/index.mjs +0 -18
- package/playwright-mcp-test/node_modules/playwright/jsx-runtime.js +0 -42
- package/playwright-mcp-test/node_modules/playwright/jsx-runtime.mjs +0 -21
- package/playwright-mcp-test/node_modules/playwright/lib/agents/generateAgents.js +0 -368
- package/playwright-mcp-test/node_modules/playwright/lib/agents/generator.agent.md +0 -101
- package/playwright-mcp-test/node_modules/playwright/lib/agents/healer.agent.md +0 -77
- package/playwright-mcp-test/node_modules/playwright/lib/agents/planner.agent.md +0 -138
- package/playwright-mcp-test/node_modules/playwright/lib/agents/test-coverage.prompt.md +0 -31
- package/playwright-mcp-test/node_modules/playwright/lib/agents/test-generate.prompt.md +0 -8
- package/playwright-mcp-test/node_modules/playwright/lib/agents/test-heal.prompt.md +0 -6
- package/playwright-mcp-test/node_modules/playwright/lib/agents/test-plan.prompt.md +0 -9
- package/playwright-mcp-test/node_modules/playwright/lib/common/config.js +0 -280
- package/playwright-mcp-test/node_modules/playwright/lib/common/configLoader.js +0 -344
- package/playwright-mcp-test/node_modules/playwright/lib/common/esmLoaderHost.js +0 -102
- package/playwright-mcp-test/node_modules/playwright/lib/common/expectBundle.js +0 -52
- package/playwright-mcp-test/node_modules/playwright/lib/common/expectBundleImpl.js +0 -389
- package/playwright-mcp-test/node_modules/playwright/lib/common/fixtures.js +0 -302
- package/playwright-mcp-test/node_modules/playwright/lib/common/globals.js +0 -58
- package/playwright-mcp-test/node_modules/playwright/lib/common/ipc.js +0 -60
- package/playwright-mcp-test/node_modules/playwright/lib/common/poolBuilder.js +0 -85
- package/playwright-mcp-test/node_modules/playwright/lib/common/process.js +0 -104
- package/playwright-mcp-test/node_modules/playwright/lib/common/suiteUtils.js +0 -140
- package/playwright-mcp-test/node_modules/playwright/lib/common/test.js +0 -321
- package/playwright-mcp-test/node_modules/playwright/lib/common/testLoader.js +0 -101
- package/playwright-mcp-test/node_modules/playwright/lib/common/testType.js +0 -298
- package/playwright-mcp-test/node_modules/playwright/lib/common/validators.js +0 -68
- package/playwright-mcp-test/node_modules/playwright/lib/fsWatcher.js +0 -67
- package/playwright-mcp-test/node_modules/playwright/lib/index.js +0 -682
- package/playwright-mcp-test/node_modules/playwright/lib/internalsForTest.js +0 -42
- package/playwright-mcp-test/node_modules/playwright/lib/isomorphic/events.js +0 -77
- package/playwright-mcp-test/node_modules/playwright/lib/isomorphic/folders.js +0 -30
- package/playwright-mcp-test/node_modules/playwright/lib/isomorphic/stringInternPool.js +0 -69
- package/playwright-mcp-test/node_modules/playwright/lib/isomorphic/teleReceiver.js +0 -508
- package/playwright-mcp-test/node_modules/playwright/lib/isomorphic/teleSuiteUpdater.js +0 -137
- package/playwright-mcp-test/node_modules/playwright/lib/isomorphic/testServerConnection.js +0 -211
- package/playwright-mcp-test/node_modules/playwright/lib/isomorphic/testServerInterface.js +0 -16
- package/playwright-mcp-test/node_modules/playwright/lib/isomorphic/testTree.js +0 -334
- package/playwright-mcp-test/node_modules/playwright/lib/isomorphic/types.d.js +0 -16
- package/playwright-mcp-test/node_modules/playwright/lib/loader/loaderMain.js +0 -59
- package/playwright-mcp-test/node_modules/playwright/lib/matchers/expect.js +0 -325
- package/playwright-mcp-test/node_modules/playwright/lib/matchers/matcherHint.js +0 -87
- package/playwright-mcp-test/node_modules/playwright/lib/matchers/matchers.js +0 -366
- package/playwright-mcp-test/node_modules/playwright/lib/matchers/toBeTruthy.js +0 -73
- package/playwright-mcp-test/node_modules/playwright/lib/matchers/toEqual.js +0 -99
- package/playwright-mcp-test/node_modules/playwright/lib/matchers/toHaveURL.js +0 -102
- package/playwright-mcp-test/node_modules/playwright/lib/matchers/toMatchAriaSnapshot.js +0 -159
- package/playwright-mcp-test/node_modules/playwright/lib/matchers/toMatchSnapshot.js +0 -341
- package/playwright-mcp-test/node_modules/playwright/lib/matchers/toMatchText.js +0 -99
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/actions.d.js +0 -16
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/browserContextFactory.js +0 -296
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/browserServerBackend.js +0 -76
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/codegen.js +0 -66
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/config.js +0 -385
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/context.js +0 -287
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/response.js +0 -228
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/sessionLog.js +0 -160
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tab.js +0 -280
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/common.js +0 -63
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/console.js +0 -44
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/dialogs.js +0 -60
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/evaluate.js +0 -69
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/files.js +0 -58
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/form.js +0 -73
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/install.js +0 -69
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/keyboard.js +0 -84
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/mouse.js +0 -107
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/navigate.js +0 -62
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/network.js +0 -54
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/pdf.js +0 -59
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/screenshot.js +0 -106
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/snapshot.js +0 -181
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/tabs.js +0 -67
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/tool.js +0 -49
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/tracing.js +0 -74
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/utils.js +0 -89
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/verify.js +0 -153
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/wait.js +0 -63
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools.js +0 -80
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/watchdog.js +0 -44
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/config.d.js +0 -16
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/extension/cdpRelay.js +0 -351
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/extension/extensionContextFactory.js +0 -75
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/extension/protocol.js +0 -28
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/index.js +0 -61
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/log.js +0 -35
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/program.js +0 -96
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/sdk/bundle.js +0 -81
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/sdk/exports.js +0 -32
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/sdk/http.js +0 -187
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/sdk/inProcessTransport.js +0 -71
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/sdk/mdb.js +0 -206
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/sdk/proxyBackend.js +0 -128
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/sdk/server.js +0 -189
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/sdk/tool.js +0 -51
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/test/browserBackend.js +0 -98
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/test/generatorTools.js +0 -122
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/test/plannerTools.js +0 -46
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/test/seed.js +0 -82
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/test/streams.js +0 -39
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/test/testBackend.js +0 -97
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/test/testContext.js +0 -176
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/test/testTool.js +0 -30
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/test/testTools.js +0 -115
- package/playwright-mcp-test/node_modules/playwright/lib/mcpBundleImpl.js +0 -41
- package/playwright-mcp-test/node_modules/playwright/lib/plugins/gitCommitInfoPlugin.js +0 -198
- package/playwright-mcp-test/node_modules/playwright/lib/plugins/index.js +0 -28
- package/playwright-mcp-test/node_modules/playwright/lib/plugins/webServerPlugin.js +0 -209
- package/playwright-mcp-test/node_modules/playwright/lib/program.js +0 -411
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/base.js +0 -609
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/blob.js +0 -135
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/dot.js +0 -82
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/empty.js +0 -32
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/github.js +0 -128
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/html.js +0 -623
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/internalReporter.js +0 -130
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/json.js +0 -254
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/junit.js +0 -232
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/line.js +0 -113
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/list.js +0 -235
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/listModeReporter.js +0 -69
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/markdown.js +0 -144
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/merge.js +0 -541
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/multiplexer.js +0 -104
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/reporterV2.js +0 -102
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/teleEmitter.js +0 -298
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/versions/blobV1.js +0 -16
- package/playwright-mcp-test/node_modules/playwright/lib/runner/dispatcher.js +0 -491
- package/playwright-mcp-test/node_modules/playwright/lib/runner/failureTracker.js +0 -72
- package/playwright-mcp-test/node_modules/playwright/lib/runner/lastRun.js +0 -77
- package/playwright-mcp-test/node_modules/playwright/lib/runner/loadUtils.js +0 -334
- package/playwright-mcp-test/node_modules/playwright/lib/runner/loaderHost.js +0 -89
- package/playwright-mcp-test/node_modules/playwright/lib/runner/processHost.js +0 -161
- package/playwright-mcp-test/node_modules/playwright/lib/runner/projectUtils.js +0 -241
- package/playwright-mcp-test/node_modules/playwright/lib/runner/rebase.js +0 -189
- package/playwright-mcp-test/node_modules/playwright/lib/runner/reporters.js +0 -139
- package/playwright-mcp-test/node_modules/playwright/lib/runner/sigIntWatcher.js +0 -96
- package/playwright-mcp-test/node_modules/playwright/lib/runner/taskRunner.js +0 -127
- package/playwright-mcp-test/node_modules/playwright/lib/runner/tasks.js +0 -410
- package/playwright-mcp-test/node_modules/playwright/lib/runner/testGroups.js +0 -117
- package/playwright-mcp-test/node_modules/playwright/lib/runner/testRunner.js +0 -390
- package/playwright-mcp-test/node_modules/playwright/lib/runner/testServer.js +0 -264
- package/playwright-mcp-test/node_modules/playwright/lib/runner/uiModeReporter.js +0 -30
- package/playwright-mcp-test/node_modules/playwright/lib/runner/vcs.js +0 -72
- package/playwright-mcp-test/node_modules/playwright/lib/runner/watchMode.js +0 -395
- package/playwright-mcp-test/node_modules/playwright/lib/runner/workerHost.js +0 -95
- package/playwright-mcp-test/node_modules/playwright/lib/third_party/pirates.js +0 -62
- package/playwright-mcp-test/node_modules/playwright/lib/third_party/tsconfig-loader.js +0 -103
- package/playwright-mcp-test/node_modules/playwright/lib/transform/babelBundle.js +0 -43
- package/playwright-mcp-test/node_modules/playwright/lib/transform/babelBundleImpl.js +0 -461
- package/playwright-mcp-test/node_modules/playwright/lib/transform/compilationCache.js +0 -272
- package/playwright-mcp-test/node_modules/playwright/lib/transform/esmLoader.js +0 -104
- package/playwright-mcp-test/node_modules/playwright/lib/transform/portTransport.js +0 -67
- package/playwright-mcp-test/node_modules/playwright/lib/transform/transform.js +0 -293
- package/playwright-mcp-test/node_modules/playwright/lib/util.js +0 -403
- package/playwright-mcp-test/node_modules/playwright/lib/utilsBundle.js +0 -43
- package/playwright-mcp-test/node_modules/playwright/lib/utilsBundleImpl.js +0 -100
- package/playwright-mcp-test/node_modules/playwright/lib/worker/fixtureRunner.js +0 -258
- package/playwright-mcp-test/node_modules/playwright/lib/worker/testInfo.js +0 -514
- package/playwright-mcp-test/node_modules/playwright/lib/worker/testTracing.js +0 -344
- package/playwright-mcp-test/node_modules/playwright/lib/worker/timeoutManager.js +0 -174
- package/playwright-mcp-test/node_modules/playwright/lib/worker/util.js +0 -31
- package/playwright-mcp-test/node_modules/playwright/lib/worker/workerMain.js +0 -520
- package/playwright-mcp-test/node_modules/playwright/package.json +0 -72
- package/playwright-mcp-test/node_modules/playwright/test.d.ts +0 -18
- package/playwright-mcp-test/node_modules/playwright/test.js +0 -24
- package/playwright-mcp-test/node_modules/playwright/test.mjs +0 -33
- package/playwright-mcp-test/node_modules/playwright/types/test.d.ts +0 -10185
- package/playwright-mcp-test/node_modules/playwright/types/testReporter.d.ts +0 -821
- package/playwright-mcp-test/node_modules/playwright-core/LICENSE +0 -202
- package/playwright-mcp-test/node_modules/playwright-core/NOTICE +0 -5
- package/playwright-mcp-test/node_modules/playwright-core/README.md +0 -3
- package/playwright-mcp-test/node_modules/playwright-core/ThirdPartyNotices.txt +0 -1161
- package/playwright-mcp-test/node_modules/playwright-core/bin/install_media_pack.ps1 +0 -5
- package/playwright-mcp-test/node_modules/playwright-core/bin/install_webkit_wsl.ps1 +0 -35
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_chrome_beta_linux.sh +0 -42
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_chrome_beta_mac.sh +0 -13
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_chrome_beta_win.ps1 +0 -24
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_chrome_stable_linux.sh +0 -42
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_chrome_stable_mac.sh +0 -12
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_chrome_stable_win.ps1 +0 -24
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_msedge_beta_linux.sh +0 -48
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_msedge_beta_mac.sh +0 -11
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_msedge_beta_win.ps1 +0 -23
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_msedge_dev_linux.sh +0 -48
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_msedge_dev_mac.sh +0 -11
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_msedge_dev_win.ps1 +0 -23
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_msedge_stable_linux.sh +0 -48
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_msedge_stable_mac.sh +0 -11
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_msedge_stable_win.ps1 +0 -24
- package/playwright-mcp-test/node_modules/playwright-core/browsers.json +0 -80
- package/playwright-mcp-test/node_modules/playwright-core/cli.js +0 -18
- package/playwright-mcp-test/node_modules/playwright-core/index.d.ts +0 -17
- package/playwright-mcp-test/node_modules/playwright-core/index.js +0 -32
- package/playwright-mcp-test/node_modules/playwright-core/index.mjs +0 -28
- package/playwright-mcp-test/node_modules/playwright-core/lib/androidServerImpl.js +0 -65
- package/playwright-mcp-test/node_modules/playwright-core/lib/browserServerImpl.js +0 -120
- package/playwright-mcp-test/node_modules/playwright-core/lib/cli/driver.js +0 -97
- package/playwright-mcp-test/node_modules/playwright-core/lib/cli/program.js +0 -634
- package/playwright-mcp-test/node_modules/playwright-core/lib/cli/programWithTestStub.js +0 -74
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/accessibility.js +0 -49
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/android.js +0 -361
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/api.js +0 -137
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/artifact.js +0 -79
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/browser.js +0 -163
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/browserContext.js +0 -529
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/browserType.js +0 -184
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/cdpSession.js +0 -51
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/channelOwner.js +0 -194
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/clientHelper.js +0 -64
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/clientInstrumentation.js +0 -55
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/clientStackTrace.js +0 -69
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/clock.js +0 -68
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/connection.js +0 -314
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/consoleMessage.js +0 -54
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/coverage.js +0 -44
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/dialog.js +0 -56
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/download.js +0 -62
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/electron.js +0 -138
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/elementHandle.js +0 -281
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/errors.js +0 -77
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/eventEmitter.js +0 -314
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/events.js +0 -99
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/fetch.js +0 -369
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/fileChooser.js +0 -46
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/fileUtils.js +0 -34
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/frame.js +0 -408
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/harRouter.js +0 -87
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/input.js +0 -84
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/jsHandle.js +0 -109
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/jsonPipe.js +0 -39
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/localUtils.js +0 -60
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/locator.js +0 -369
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/network.js +0 -747
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/page.js +0 -721
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/platform.js +0 -74
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/playwright.js +0 -71
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/selectors.js +0 -55
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/stream.js +0 -39
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/timeoutSettings.js +0 -79
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/tracing.js +0 -117
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/types.js +0 -28
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/video.js +0 -59
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/waiter.js +0 -142
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/webError.js +0 -39
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/webSocket.js +0 -93
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/worker.js +0 -63
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/writableStream.js +0 -39
- package/playwright-mcp-test/node_modules/playwright-core/lib/generated/bindingsControllerSource.js +0 -28
- package/playwright-mcp-test/node_modules/playwright-core/lib/generated/clockSource.js +0 -28
- package/playwright-mcp-test/node_modules/playwright-core/lib/generated/injectedScriptSource.js +0 -28
- package/playwright-mcp-test/node_modules/playwright-core/lib/generated/pollingRecorderSource.js +0 -28
- package/playwright-mcp-test/node_modules/playwright-core/lib/generated/storageScriptSource.js +0 -28
- package/playwright-mcp-test/node_modules/playwright-core/lib/generated/utilityScriptSource.js +0 -28
- package/playwright-mcp-test/node_modules/playwright-core/lib/generated/webSocketMockSource.js +0 -336
- package/playwright-mcp-test/node_modules/playwright-core/lib/inProcessFactory.js +0 -60
- package/playwright-mcp-test/node_modules/playwright-core/lib/inprocess.js +0 -3
- package/playwright-mcp-test/node_modules/playwright-core/lib/outofprocess.js +0 -76
- package/playwright-mcp-test/node_modules/playwright-core/lib/protocol/serializers.js +0 -192
- package/playwright-mcp-test/node_modules/playwright-core/lib/protocol/validator.js +0 -2912
- package/playwright-mcp-test/node_modules/playwright-core/lib/protocol/validatorPrimitives.js +0 -193
- package/playwright-mcp-test/node_modules/playwright-core/lib/remote/playwrightConnection.js +0 -129
- package/playwright-mcp-test/node_modules/playwright-core/lib/remote/playwrightServer.js +0 -335
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/accessibility.js +0 -69
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/android/android.js +0 -465
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/android/backendAdb.js +0 -177
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/artifact.js +0 -127
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/bidiBrowser.js +0 -490
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/bidiChromium.js +0 -153
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/bidiConnection.js +0 -212
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/bidiExecutionContext.js +0 -221
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/bidiFirefox.js +0 -130
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/bidiInput.js +0 -146
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/bidiNetworkManager.js +0 -383
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/bidiOverCdp.js +0 -102
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/bidiPage.js +0 -554
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/bidiPdf.js +0 -106
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/third_party/bidiCommands.d.js +0 -22
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/third_party/bidiDeserializer.js +0 -98
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/third_party/bidiKeyboard.js +0 -256
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/third_party/bidiProtocol.js +0 -24
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/third_party/bidiProtocolCore.js +0 -179
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/third_party/bidiProtocolPermissions.js +0 -42
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/third_party/bidiSerializer.js +0 -148
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/third_party/firefoxPrefs.js +0 -259
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/browser.js +0 -149
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/browserContext.js +0 -695
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/browserType.js +0 -328
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/callLog.js +0 -82
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/appIcon.png +0 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/chromium.js +0 -402
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/chromiumSwitches.js +0 -95
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/crAccessibility.js +0 -263
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/crBrowser.js +0 -502
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/crConnection.js +0 -202
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/crCoverage.js +0 -235
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/crDevTools.js +0 -113
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/crDragDrop.js +0 -131
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/crExecutionContext.js +0 -146
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/crInput.js +0 -187
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/crNetworkManager.js +0 -666
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/crPage.js +0 -1069
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/crPdf.js +0 -121
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/crProtocolHelper.js +0 -145
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/crServiceWorker.js +0 -123
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/defaultFontFamilies.js +0 -162
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/protocol.d.js +0 -16
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/videoRecorder.js +0 -113
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/clock.js +0 -149
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/codegen/csharp.js +0 -327
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/codegen/java.js +0 -274
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/codegen/javascript.js +0 -270
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/codegen/jsonl.js +0 -52
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/codegen/language.js +0 -132
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/codegen/languages.js +0 -68
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/codegen/python.js +0 -279
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/codegen/types.js +0 -16
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/console.js +0 -53
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/cookieStore.js +0 -206
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/debugController.js +0 -191
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/debugger.js +0 -119
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/deviceDescriptors.js +0 -39
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/deviceDescriptorsSource.json +0 -1779
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dialog.js +0 -116
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/androidDispatcher.js +0 -325
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/artifactDispatcher.js +0 -118
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/browserContextDispatcher.js +0 -364
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/browserDispatcher.js +0 -118
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/browserTypeDispatcher.js +0 -64
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/cdpSessionDispatcher.js +0 -44
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/debugControllerDispatcher.js +0 -78
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/dialogDispatcher.js +0 -47
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/dispatcher.js +0 -371
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/electronDispatcher.js +0 -89
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/elementHandlerDispatcher.js +0 -181
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/frameDispatcher.js +0 -227
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/jsHandleDispatcher.js +0 -85
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/jsonPipeDispatcher.js +0 -58
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/localUtilsDispatcher.js +0 -149
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/networkDispatchers.js +0 -213
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/pageDispatcher.js +0 -401
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/playwrightDispatcher.js +0 -108
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/streamDispatcher.js +0 -67
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/tracingDispatcher.js +0 -68
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/webSocketRouteDispatcher.js +0 -165
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/writableStreamDispatcher.js +0 -79
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dom.js +0 -806
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/download.js +0 -70
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/electron/electron.js +0 -270
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/electron/loader.js +0 -29
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/errors.js +0 -69
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/fetch.js +0 -621
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/fileChooser.js +0 -43
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/fileUploadUtils.js +0 -84
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/firefox/ffAccessibility.js +0 -238
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/firefox/ffBrowser.js +0 -428
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/firefox/ffConnection.js +0 -147
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/firefox/ffExecutionContext.js +0 -150
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/firefox/ffInput.js +0 -159
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/firefox/ffNetworkManager.js +0 -256
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/firefox/ffPage.js +0 -503
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/firefox/firefox.js +0 -116
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/firefox/protocol.d.js +0 -16
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/formData.js +0 -147
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/frameSelectors.js +0 -154
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/frames.js +0 -1455
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/har/harRecorder.js +0 -147
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/har/harTracer.js +0 -607
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/harBackend.js +0 -157
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/helper.js +0 -96
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/index.js +0 -58
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/input.js +0 -273
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/instrumentation.js +0 -69
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/javascript.js +0 -291
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/launchApp.js +0 -128
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/localUtils.js +0 -214
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/macEditingCommands.js +0 -143
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/network.js +0 -629
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/page.js +0 -867
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/pipeTransport.js +0 -89
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/playwright.js +0 -69
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/progress.js +0 -112
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/protocolError.js +0 -52
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/recorder/chat.js +0 -161
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/recorder/recorderApp.js +0 -387
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/recorder/recorderRunner.js +0 -138
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/recorder/recorderSignalProcessor.js +0 -83
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/recorder/recorderUtils.js +0 -157
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/recorder/throttledFile.js +0 -57
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/recorder.js +0 -499
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/registry/browserFetcher.js +0 -175
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/registry/dependencies.js +0 -371
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/registry/index.js +0 -1361
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/registry/nativeDeps.js +0 -1280
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/registry/oopDownloadBrowserMain.js +0 -124
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/screenshotter.js +0 -333
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/selectors.js +0 -112
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/socksClientCertificatesInterceptor.js +0 -383
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/socksInterceptor.js +0 -95
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/trace/recorder/snapshotter.js +0 -147
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/trace/recorder/snapshotterInjected.js +0 -541
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/trace/recorder/tracing.js +0 -602
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/trace/test/inMemorySnapshotter.js +0 -87
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/trace/viewer/traceViewer.js +0 -230
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/transport.js +0 -181
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/types.js +0 -28
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/usKeyboardLayout.js +0 -145
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/ascii.js +0 -44
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/comparators.js +0 -139
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/crypto.js +0 -216
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/debug.js +0 -42
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/debugLogger.js +0 -122
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/env.js +0 -73
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/eventsHelper.js +0 -39
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/expectUtils.js +0 -38
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/fileUtils.js +0 -191
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/happyEyeballs.js +0 -207
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/hostPlatform.js +0 -123
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/httpServer.js +0 -218
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/imageUtils.js +0 -146
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/image_tools/colorUtils.js +0 -89
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/image_tools/compare.js +0 -109
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/image_tools/imageChannel.js +0 -78
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/image_tools/stats.js +0 -102
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/linuxUtils.js +0 -71
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/network.js +0 -233
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/nodePlatform.js +0 -148
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/pipeTransport.js +0 -84
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/processLauncher.js +0 -241
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/profiler.js +0 -65
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/socksProxy.js +0 -511
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/spawnAsync.js +0 -41
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/task.js +0 -51
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/userAgent.js +0 -98
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/wsServer.js +0 -121
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/zipFile.js +0 -74
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/zones.js +0 -57
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/webkit/protocol.d.js +0 -16
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/webkit/webkit.js +0 -119
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/webkit/wkAccessibility.js +0 -237
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/webkit/wkBrowser.js +0 -339
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/webkit/wkConnection.js +0 -149
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/webkit/wkExecutionContext.js +0 -154
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/webkit/wkInput.js +0 -181
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/webkit/wkInterceptableRequest.js +0 -169
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/webkit/wkPage.js +0 -1134
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/webkit/wkProvisionalPage.js +0 -83
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/webkit/wkWorkers.js +0 -104
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/webkit/wsl/webkit-wsl-transport-client.js +0 -74
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/webkit/wsl/webkit-wsl-transport-server.js +0 -113
- package/playwright-mcp-test/node_modules/playwright-core/lib/third_party/pixelmatch.js +0 -255
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/ariaSnapshot.js +0 -392
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/assert.js +0 -31
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/colors.js +0 -72
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/cssParser.js +0 -245
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/cssTokenizer.js +0 -1051
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/headers.js +0 -53
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/locatorGenerators.js +0 -689
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/locatorParser.js +0 -176
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/locatorUtils.js +0 -81
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/manualPromise.js +0 -114
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/mimeType.js +0 -459
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/multimap.js +0 -80
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/protocolFormatter.js +0 -81
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/protocolMetainfo.js +0 -321
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/rtti.js +0 -43
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/selectorParser.js +0 -386
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/semaphore.js +0 -54
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/stackTrace.js +0 -158
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/stringUtils.js +0 -155
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/time.js +0 -49
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/timeoutRunner.js +0 -66
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/traceUtils.js +0 -58
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/types.js +0 -16
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/urlMatch.js +0 -179
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/utilityScriptSerializers.js +0 -251
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils.js +0 -109
- package/playwright-mcp-test/node_modules/playwright-core/lib/utilsBundle.js +0 -112
- package/playwright-mcp-test/node_modules/playwright-core/lib/utilsBundleImpl/index.js +0 -218
- package/playwright-mcp-test/node_modules/playwright-core/lib/utilsBundleImpl/xdg-open +0 -1066
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/htmlReport/index.html +0 -84
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-C3UTv-Ge.css +0 -1
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-DX585GyR.js +0 -25
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf +0 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/recorder/assets/index-DjadjNw5.js +0 -193
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/recorder/assets/index-Ri0uHF7I.css +0 -1
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/recorder/index.html +0 -29
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/recorder/playwright-logo.svg +0 -9
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/assets/codeMirrorModule-Cw-6jrKz.js +0 -25
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-BZIhX7gh.js +0 -266
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/assets/xtermModule-CsJ4vdCR.js +0 -9
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/codeMirrorModule.C3UTv-Ge.css +0 -1
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/codicon.DCmgc-ay.ttf +0 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/defaultSettingsView.BEjzWGz-.css +0 -1
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/index.Dk_obRs3.js +0 -2
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/index.I8N9v4jT.css +0 -1
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/index.html +0 -43
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/manifest.webmanifest +0 -16
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/playwright-logo.svg +0 -9
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/snapshot.html +0 -21
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/sw.bundle.js +0 -3
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/uiMode.Bai-qGIw.js +0 -5
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/uiMode.Btcz36p_.css +0 -1
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/uiMode.html +0 -17
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/xtermModule.DYP7pi_n.css +0 -32
- package/playwright-mcp-test/node_modules/playwright-core/lib/zipBundle.js +0 -34
- package/playwright-mcp-test/node_modules/playwright-core/lib/zipBundleImpl.js +0 -5
- package/playwright-mcp-test/node_modules/playwright-core/package.json +0 -42
- package/playwright-mcp-test/node_modules/playwright-core/types/protocol.d.ts +0 -23130
- package/playwright-mcp-test/node_modules/playwright-core/types/structs.d.ts +0 -45
- package/playwright-mcp-test/node_modules/playwright-core/types/types.d.ts +0 -22872
- package/playwright-mcp-test/package-lock.json +0 -76
|
@@ -1,867 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var page_exports = {};
|
|
30
|
-
__export(page_exports, {
|
|
31
|
-
InitScript: () => InitScript,
|
|
32
|
-
Page: () => Page,
|
|
33
|
-
PageBinding: () => PageBinding,
|
|
34
|
-
Worker: () => Worker
|
|
35
|
-
});
|
|
36
|
-
module.exports = __toCommonJS(page_exports);
|
|
37
|
-
var accessibility = __toESM(require("./accessibility"));
|
|
38
|
-
var import_browserContext = require("./browserContext");
|
|
39
|
-
var import_console = require("./console");
|
|
40
|
-
var import_errors = require("./errors");
|
|
41
|
-
var import_fileChooser = require("./fileChooser");
|
|
42
|
-
var frames = __toESM(require("./frames"));
|
|
43
|
-
var import_helper = require("./helper");
|
|
44
|
-
var input = __toESM(require("./input"));
|
|
45
|
-
var import_instrumentation = require("./instrumentation");
|
|
46
|
-
var js = __toESM(require("./javascript"));
|
|
47
|
-
var import_screenshotter = require("./screenshotter");
|
|
48
|
-
var import_utils = require("../utils");
|
|
49
|
-
var import_utils2 = require("../utils");
|
|
50
|
-
var import_comparators = require("./utils/comparators");
|
|
51
|
-
var import_debugLogger = require("./utils/debugLogger");
|
|
52
|
-
var import_selectorParser = require("../utils/isomorphic/selectorParser");
|
|
53
|
-
var import_manualPromise = require("../utils/isomorphic/manualPromise");
|
|
54
|
-
var import_utilityScriptSerializers = require("../utils/isomorphic/utilityScriptSerializers");
|
|
55
|
-
var import_callLog = require("./callLog");
|
|
56
|
-
var rawBindingsControllerSource = __toESM(require("../generated/bindingsControllerSource"));
|
|
57
|
-
class Page extends import_instrumentation.SdkObject {
|
|
58
|
-
constructor(delegate, browserContext) {
|
|
59
|
-
super(browserContext, "page");
|
|
60
|
-
this._closedState = "open";
|
|
61
|
-
this._closedPromise = new import_manualPromise.ManualPromise();
|
|
62
|
-
this._initializedPromise = new import_manualPromise.ManualPromise();
|
|
63
|
-
this._consoleMessages = [];
|
|
64
|
-
this._pageErrors = [];
|
|
65
|
-
this._crashed = false;
|
|
66
|
-
this.openScope = new import_utils.LongStandingScope();
|
|
67
|
-
this._emulatedMedia = {};
|
|
68
|
-
this._fileChooserInterceptedBy = /* @__PURE__ */ new Set();
|
|
69
|
-
this._pageBindings = /* @__PURE__ */ new Map();
|
|
70
|
-
this.initScripts = [];
|
|
71
|
-
this._workers = /* @__PURE__ */ new Map();
|
|
72
|
-
this.requestInterceptors = [];
|
|
73
|
-
this.video = null;
|
|
74
|
-
this._locatorHandlers = /* @__PURE__ */ new Map();
|
|
75
|
-
this._lastLocatorHandlerUid = 0;
|
|
76
|
-
this._locatorHandlerRunningCounter = 0;
|
|
77
|
-
this._networkRequests = [];
|
|
78
|
-
// Aiming at 25 fps by default - each frame is 40ms, but we give some slack with 35ms.
|
|
79
|
-
// When throttling for tracing, 200ms between frames, except for 10 frames around the action.
|
|
80
|
-
this._frameThrottler = new FrameThrottler(10, 35, 200);
|
|
81
|
-
this.attribution.page = this;
|
|
82
|
-
this.delegate = delegate;
|
|
83
|
-
this.browserContext = browserContext;
|
|
84
|
-
this.accessibility = new accessibility.Accessibility(delegate.getAccessibilityTree.bind(delegate));
|
|
85
|
-
this.keyboard = new input.Keyboard(delegate.rawKeyboard, this);
|
|
86
|
-
this.mouse = new input.Mouse(delegate.rawMouse, this);
|
|
87
|
-
this.touchscreen = new input.Touchscreen(delegate.rawTouchscreen, this);
|
|
88
|
-
this.screenshotter = new import_screenshotter.Screenshotter(this);
|
|
89
|
-
this.frameManager = new frames.FrameManager(this);
|
|
90
|
-
if (delegate.pdf)
|
|
91
|
-
this.pdf = delegate.pdf.bind(delegate);
|
|
92
|
-
this.coverage = delegate.coverage ? delegate.coverage() : null;
|
|
93
|
-
this.isStorageStatePage = browserContext.isCreatingStorageStatePage();
|
|
94
|
-
}
|
|
95
|
-
static {
|
|
96
|
-
this.Events = {
|
|
97
|
-
Close: "close",
|
|
98
|
-
Crash: "crash",
|
|
99
|
-
Download: "download",
|
|
100
|
-
EmulatedSizeChanged: "emulatedsizechanged",
|
|
101
|
-
FileChooser: "filechooser",
|
|
102
|
-
FrameAttached: "frameattached",
|
|
103
|
-
FrameDetached: "framedetached",
|
|
104
|
-
InternalFrameNavigatedToNewDocument: "internalframenavigatedtonewdocument",
|
|
105
|
-
LocatorHandlerTriggered: "locatorhandlertriggered",
|
|
106
|
-
ScreencastFrame: "screencastframe",
|
|
107
|
-
Video: "video",
|
|
108
|
-
WebSocket: "websocket",
|
|
109
|
-
Worker: "worker"
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
async reportAsNew(opener, error) {
|
|
113
|
-
if (opener) {
|
|
114
|
-
const openerPageOrError = await opener.waitForInitializedOrError();
|
|
115
|
-
if (openerPageOrError instanceof Page && !openerPageOrError.isClosed())
|
|
116
|
-
this._opener = openerPageOrError;
|
|
117
|
-
}
|
|
118
|
-
this._markInitialized(error);
|
|
119
|
-
}
|
|
120
|
-
_markInitialized(error = void 0) {
|
|
121
|
-
if (error) {
|
|
122
|
-
if (this.browserContext.isClosingOrClosed())
|
|
123
|
-
return;
|
|
124
|
-
this.frameManager.createDummyMainFrameIfNeeded();
|
|
125
|
-
}
|
|
126
|
-
this._initialized = error || this;
|
|
127
|
-
this.emitOnContext(import_browserContext.BrowserContext.Events.Page, this);
|
|
128
|
-
for (const pageError of this._pageErrors)
|
|
129
|
-
this.emitOnContext(import_browserContext.BrowserContext.Events.PageError, pageError, this);
|
|
130
|
-
for (const message of this._consoleMessages)
|
|
131
|
-
this.emitOnContext(import_browserContext.BrowserContext.Events.Console, message);
|
|
132
|
-
if (this.isClosed())
|
|
133
|
-
this.emit(Page.Events.Close);
|
|
134
|
-
else
|
|
135
|
-
this.instrumentation.onPageOpen(this);
|
|
136
|
-
this._initializedPromise.resolve(this._initialized);
|
|
137
|
-
}
|
|
138
|
-
initializedOrUndefined() {
|
|
139
|
-
return this._initialized ? this : void 0;
|
|
140
|
-
}
|
|
141
|
-
waitForInitializedOrError() {
|
|
142
|
-
return this._initializedPromise;
|
|
143
|
-
}
|
|
144
|
-
emitOnContext(event, ...args) {
|
|
145
|
-
if (this.isStorageStatePage)
|
|
146
|
-
return;
|
|
147
|
-
this.browserContext.emit(event, ...args);
|
|
148
|
-
}
|
|
149
|
-
async resetForReuse(progress) {
|
|
150
|
-
await this.mainFrame().gotoImpl(progress, "about:blank", {});
|
|
151
|
-
this._emulatedSize = void 0;
|
|
152
|
-
this._emulatedMedia = {};
|
|
153
|
-
this._extraHTTPHeaders = void 0;
|
|
154
|
-
await Promise.all([
|
|
155
|
-
this.delegate.updateEmulatedViewportSize(),
|
|
156
|
-
this.delegate.updateEmulateMedia(),
|
|
157
|
-
this.delegate.updateExtraHTTPHeaders()
|
|
158
|
-
]);
|
|
159
|
-
await this.delegate.resetForReuse(progress);
|
|
160
|
-
}
|
|
161
|
-
_didClose() {
|
|
162
|
-
this.frameManager.dispose();
|
|
163
|
-
this._frameThrottler.dispose();
|
|
164
|
-
(0, import_utils.assert)(this._closedState !== "closed", "Page closed twice");
|
|
165
|
-
this._closedState = "closed";
|
|
166
|
-
this.emit(Page.Events.Close);
|
|
167
|
-
this._closedPromise.resolve();
|
|
168
|
-
this.instrumentation.onPageClose(this);
|
|
169
|
-
this.openScope.close(new import_errors.TargetClosedError());
|
|
170
|
-
}
|
|
171
|
-
_didCrash() {
|
|
172
|
-
this.frameManager.dispose();
|
|
173
|
-
this._frameThrottler.dispose();
|
|
174
|
-
this.emit(Page.Events.Crash);
|
|
175
|
-
this._crashed = true;
|
|
176
|
-
this.instrumentation.onPageClose(this);
|
|
177
|
-
this.openScope.close(new Error("Page crashed"));
|
|
178
|
-
}
|
|
179
|
-
async _onFileChooserOpened(handle) {
|
|
180
|
-
let multiple;
|
|
181
|
-
try {
|
|
182
|
-
multiple = await handle.evaluate((element) => !!element.multiple);
|
|
183
|
-
} catch (e) {
|
|
184
|
-
return;
|
|
185
|
-
}
|
|
186
|
-
if (!this.listenerCount(Page.Events.FileChooser)) {
|
|
187
|
-
handle.dispose();
|
|
188
|
-
return;
|
|
189
|
-
}
|
|
190
|
-
const fileChooser = new import_fileChooser.FileChooser(this, handle, multiple);
|
|
191
|
-
this.emit(Page.Events.FileChooser, fileChooser);
|
|
192
|
-
}
|
|
193
|
-
opener() {
|
|
194
|
-
return this._opener;
|
|
195
|
-
}
|
|
196
|
-
mainFrame() {
|
|
197
|
-
return this.frameManager.mainFrame();
|
|
198
|
-
}
|
|
199
|
-
frames() {
|
|
200
|
-
return this.frameManager.frames();
|
|
201
|
-
}
|
|
202
|
-
async exposeBinding(progress, name, needsHandle, playwrightBinding) {
|
|
203
|
-
if (this._pageBindings.has(name))
|
|
204
|
-
throw new Error(`Function "${name}" has been already registered`);
|
|
205
|
-
if (this.browserContext._pageBindings.has(name))
|
|
206
|
-
throw new Error(`Function "${name}" has been already registered in the browser context`);
|
|
207
|
-
await progress.race(this.browserContext.exposePlaywrightBindingIfNeeded());
|
|
208
|
-
const binding = new PageBinding(name, playwrightBinding, needsHandle);
|
|
209
|
-
this._pageBindings.set(name, binding);
|
|
210
|
-
try {
|
|
211
|
-
await progress.race(this.delegate.addInitScript(binding.initScript));
|
|
212
|
-
await progress.race(this.safeNonStallingEvaluateInAllFrames(binding.initScript.source, "main"));
|
|
213
|
-
return binding;
|
|
214
|
-
} catch (error) {
|
|
215
|
-
this._pageBindings.delete(name);
|
|
216
|
-
throw error;
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
async removeExposedBindings(bindings) {
|
|
220
|
-
bindings = bindings.filter((binding) => this._pageBindings.get(binding.name) === binding);
|
|
221
|
-
for (const binding of bindings)
|
|
222
|
-
this._pageBindings.delete(binding.name);
|
|
223
|
-
await this.delegate.removeInitScripts(bindings.map((binding) => binding.initScript));
|
|
224
|
-
const cleanup = bindings.map((binding) => `{ ${binding.cleanupScript} };
|
|
225
|
-
`).join("");
|
|
226
|
-
await this.safeNonStallingEvaluateInAllFrames(cleanup, "main");
|
|
227
|
-
}
|
|
228
|
-
async setExtraHTTPHeaders(progress, headers) {
|
|
229
|
-
const oldHeaders = this._extraHTTPHeaders;
|
|
230
|
-
try {
|
|
231
|
-
this._extraHTTPHeaders = headers;
|
|
232
|
-
await progress.race(this.delegate.updateExtraHTTPHeaders());
|
|
233
|
-
} catch (error) {
|
|
234
|
-
this._extraHTTPHeaders = oldHeaders;
|
|
235
|
-
this.delegate.updateExtraHTTPHeaders().catch(() => {
|
|
236
|
-
});
|
|
237
|
-
throw error;
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
extraHTTPHeaders() {
|
|
241
|
-
return this._extraHTTPHeaders;
|
|
242
|
-
}
|
|
243
|
-
addNetworkRequest(request) {
|
|
244
|
-
this._networkRequests.push(request);
|
|
245
|
-
ensureArrayLimit(this._networkRequests, 100);
|
|
246
|
-
}
|
|
247
|
-
networkRequests() {
|
|
248
|
-
return this._networkRequests;
|
|
249
|
-
}
|
|
250
|
-
async onBindingCalled(payload, context) {
|
|
251
|
-
if (this._closedState === "closed")
|
|
252
|
-
return;
|
|
253
|
-
await PageBinding.dispatch(this, payload, context);
|
|
254
|
-
}
|
|
255
|
-
addConsoleMessage(type, args, location, text) {
|
|
256
|
-
const message = new import_console.ConsoleMessage(this, type, text, args, location);
|
|
257
|
-
const intercepted = this.frameManager.interceptConsoleMessage(message);
|
|
258
|
-
if (intercepted) {
|
|
259
|
-
args.forEach((arg) => arg.dispose());
|
|
260
|
-
return;
|
|
261
|
-
}
|
|
262
|
-
this._consoleMessages.push(message);
|
|
263
|
-
ensureArrayLimit(this._consoleMessages, 200);
|
|
264
|
-
if (this._initialized)
|
|
265
|
-
this.emitOnContext(import_browserContext.BrowserContext.Events.Console, message);
|
|
266
|
-
}
|
|
267
|
-
consoleMessages() {
|
|
268
|
-
return this._consoleMessages;
|
|
269
|
-
}
|
|
270
|
-
addPageError(pageError) {
|
|
271
|
-
this._pageErrors.push(pageError);
|
|
272
|
-
ensureArrayLimit(this._pageErrors, 200);
|
|
273
|
-
if (this._initialized)
|
|
274
|
-
this.emitOnContext(import_browserContext.BrowserContext.Events.PageError, pageError, this);
|
|
275
|
-
}
|
|
276
|
-
pageErrors() {
|
|
277
|
-
return this._pageErrors;
|
|
278
|
-
}
|
|
279
|
-
async reload(progress, options) {
|
|
280
|
-
return this.mainFrame().raceNavigationAction(progress, async () => {
|
|
281
|
-
const [response] = await Promise.all([
|
|
282
|
-
// Reload must be a new document, and should not be confused with a stray pushState.
|
|
283
|
-
this.mainFrame()._waitForNavigation(progress, true, options),
|
|
284
|
-
progress.race(this.delegate.reload())
|
|
285
|
-
]);
|
|
286
|
-
return response;
|
|
287
|
-
});
|
|
288
|
-
}
|
|
289
|
-
async goBack(progress, options) {
|
|
290
|
-
return this.mainFrame().raceNavigationAction(progress, async () => {
|
|
291
|
-
let error;
|
|
292
|
-
const waitPromise = this.mainFrame()._waitForNavigation(progress, false, options).catch((e) => {
|
|
293
|
-
error = e;
|
|
294
|
-
return null;
|
|
295
|
-
});
|
|
296
|
-
const result = await progress.race(this.delegate.goBack());
|
|
297
|
-
if (!result) {
|
|
298
|
-
waitPromise.catch(() => {
|
|
299
|
-
});
|
|
300
|
-
return null;
|
|
301
|
-
}
|
|
302
|
-
const response = await waitPromise;
|
|
303
|
-
if (error)
|
|
304
|
-
throw error;
|
|
305
|
-
return response;
|
|
306
|
-
});
|
|
307
|
-
}
|
|
308
|
-
async goForward(progress, options) {
|
|
309
|
-
return this.mainFrame().raceNavigationAction(progress, async () => {
|
|
310
|
-
let error;
|
|
311
|
-
const waitPromise = this.mainFrame()._waitForNavigation(progress, false, options).catch((e) => {
|
|
312
|
-
error = e;
|
|
313
|
-
return null;
|
|
314
|
-
});
|
|
315
|
-
const result = await progress.race(this.delegate.goForward());
|
|
316
|
-
if (!result) {
|
|
317
|
-
waitPromise.catch(() => {
|
|
318
|
-
});
|
|
319
|
-
return null;
|
|
320
|
-
}
|
|
321
|
-
const response = await waitPromise;
|
|
322
|
-
if (error)
|
|
323
|
-
throw error;
|
|
324
|
-
return response;
|
|
325
|
-
});
|
|
326
|
-
}
|
|
327
|
-
requestGC() {
|
|
328
|
-
return this.delegate.requestGC();
|
|
329
|
-
}
|
|
330
|
-
registerLocatorHandler(selector, noWaitAfter) {
|
|
331
|
-
const uid = ++this._lastLocatorHandlerUid;
|
|
332
|
-
this._locatorHandlers.set(uid, { selector, noWaitAfter });
|
|
333
|
-
return uid;
|
|
334
|
-
}
|
|
335
|
-
resolveLocatorHandler(uid, remove) {
|
|
336
|
-
const handler = this._locatorHandlers.get(uid);
|
|
337
|
-
if (remove)
|
|
338
|
-
this._locatorHandlers.delete(uid);
|
|
339
|
-
if (handler) {
|
|
340
|
-
handler.resolved?.resolve();
|
|
341
|
-
handler.resolved = void 0;
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
unregisterLocatorHandler(uid) {
|
|
345
|
-
this._locatorHandlers.delete(uid);
|
|
346
|
-
}
|
|
347
|
-
async performActionPreChecks(progress) {
|
|
348
|
-
await this._performWaitForNavigationCheck(progress);
|
|
349
|
-
await this._performLocatorHandlersCheckpoint(progress);
|
|
350
|
-
await this._performWaitForNavigationCheck(progress);
|
|
351
|
-
}
|
|
352
|
-
async _performWaitForNavigationCheck(progress) {
|
|
353
|
-
const mainFrame = this.frameManager.mainFrame();
|
|
354
|
-
if (!mainFrame || !mainFrame.pendingDocument())
|
|
355
|
-
return;
|
|
356
|
-
const url = mainFrame.pendingDocument()?.request?.url();
|
|
357
|
-
const toUrl = url ? `" ${(0, import_utils.trimStringWithEllipsis)(url, 200)}"` : "";
|
|
358
|
-
progress.log(` waiting for${toUrl} navigation to finish...`);
|
|
359
|
-
await import_helper.helper.waitForEvent(progress, mainFrame, frames.Frame.Events.InternalNavigation, (e) => {
|
|
360
|
-
if (!e.isPublic)
|
|
361
|
-
return false;
|
|
362
|
-
if (!e.error)
|
|
363
|
-
progress.log(` navigated to "${(0, import_utils.trimStringWithEllipsis)(mainFrame.url(), 200)}"`);
|
|
364
|
-
return true;
|
|
365
|
-
}).promise;
|
|
366
|
-
}
|
|
367
|
-
async _performLocatorHandlersCheckpoint(progress) {
|
|
368
|
-
if (this._locatorHandlerRunningCounter)
|
|
369
|
-
return;
|
|
370
|
-
for (const [uid, handler] of this._locatorHandlers) {
|
|
371
|
-
if (!handler.resolved) {
|
|
372
|
-
if (await this.mainFrame().isVisibleInternal(progress, handler.selector, { strict: true })) {
|
|
373
|
-
handler.resolved = new import_manualPromise.ManualPromise();
|
|
374
|
-
this.emit(Page.Events.LocatorHandlerTriggered, uid);
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
if (handler.resolved) {
|
|
378
|
-
++this._locatorHandlerRunningCounter;
|
|
379
|
-
progress.log(` found ${(0, import_utils2.asLocator)(this.browserContext._browser.sdkLanguage(), handler.selector)}, intercepting action to run the handler`);
|
|
380
|
-
const promise = handler.resolved.then(async () => {
|
|
381
|
-
if (!handler.noWaitAfter) {
|
|
382
|
-
progress.log(` locator handler has finished, waiting for ${(0, import_utils2.asLocator)(this.browserContext._browser.sdkLanguage(), handler.selector)} to be hidden`);
|
|
383
|
-
await this.mainFrame().waitForSelector(progress, handler.selector, false, { state: "hidden" });
|
|
384
|
-
} else {
|
|
385
|
-
progress.log(` locator handler has finished`);
|
|
386
|
-
}
|
|
387
|
-
});
|
|
388
|
-
await progress.race(this.openScope.race(promise)).finally(() => --this._locatorHandlerRunningCounter);
|
|
389
|
-
progress.log(` interception handler has finished, continuing`);
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
async emulateMedia(progress, options) {
|
|
394
|
-
const oldEmulatedMedia = { ...this._emulatedMedia };
|
|
395
|
-
if (options.media !== void 0)
|
|
396
|
-
this._emulatedMedia.media = options.media;
|
|
397
|
-
if (options.colorScheme !== void 0)
|
|
398
|
-
this._emulatedMedia.colorScheme = options.colorScheme;
|
|
399
|
-
if (options.reducedMotion !== void 0)
|
|
400
|
-
this._emulatedMedia.reducedMotion = options.reducedMotion;
|
|
401
|
-
if (options.forcedColors !== void 0)
|
|
402
|
-
this._emulatedMedia.forcedColors = options.forcedColors;
|
|
403
|
-
if (options.contrast !== void 0)
|
|
404
|
-
this._emulatedMedia.contrast = options.contrast;
|
|
405
|
-
try {
|
|
406
|
-
await progress.race(this.delegate.updateEmulateMedia());
|
|
407
|
-
} catch (error) {
|
|
408
|
-
this._emulatedMedia = oldEmulatedMedia;
|
|
409
|
-
this.delegate.updateEmulateMedia().catch(() => {
|
|
410
|
-
});
|
|
411
|
-
throw error;
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
emulatedMedia() {
|
|
415
|
-
const contextOptions = this.browserContext._options;
|
|
416
|
-
return {
|
|
417
|
-
media: this._emulatedMedia.media || "no-override",
|
|
418
|
-
colorScheme: this._emulatedMedia.colorScheme !== void 0 ? this._emulatedMedia.colorScheme : contextOptions.colorScheme ?? "light",
|
|
419
|
-
reducedMotion: this._emulatedMedia.reducedMotion !== void 0 ? this._emulatedMedia.reducedMotion : contextOptions.reducedMotion ?? "no-preference",
|
|
420
|
-
forcedColors: this._emulatedMedia.forcedColors !== void 0 ? this._emulatedMedia.forcedColors : contextOptions.forcedColors ?? "none",
|
|
421
|
-
contrast: this._emulatedMedia.contrast !== void 0 ? this._emulatedMedia.contrast : contextOptions.contrast ?? "no-preference"
|
|
422
|
-
};
|
|
423
|
-
}
|
|
424
|
-
async setViewportSize(progress, viewportSize) {
|
|
425
|
-
const oldEmulatedSize = this._emulatedSize;
|
|
426
|
-
try {
|
|
427
|
-
this._setEmulatedSize({ viewport: { ...viewportSize }, screen: { ...viewportSize } });
|
|
428
|
-
await progress.race(this.delegate.updateEmulatedViewportSize());
|
|
429
|
-
} catch (error) {
|
|
430
|
-
this._emulatedSize = oldEmulatedSize;
|
|
431
|
-
this.delegate.updateEmulatedViewportSize().catch(() => {
|
|
432
|
-
});
|
|
433
|
-
throw error;
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
setEmulatedSizeFromWindowOpen(emulatedSize) {
|
|
437
|
-
this._setEmulatedSize(emulatedSize);
|
|
438
|
-
}
|
|
439
|
-
_setEmulatedSize(emulatedSize) {
|
|
440
|
-
this._emulatedSize = emulatedSize;
|
|
441
|
-
this.emit(Page.Events.EmulatedSizeChanged);
|
|
442
|
-
}
|
|
443
|
-
emulatedSize() {
|
|
444
|
-
if (this._emulatedSize)
|
|
445
|
-
return this._emulatedSize;
|
|
446
|
-
const contextOptions = this.browserContext._options;
|
|
447
|
-
return contextOptions.viewport ? { viewport: contextOptions.viewport, screen: contextOptions.screen || contextOptions.viewport } : void 0;
|
|
448
|
-
}
|
|
449
|
-
async bringToFront() {
|
|
450
|
-
await this.delegate.bringToFront();
|
|
451
|
-
}
|
|
452
|
-
async addInitScript(progress, source) {
|
|
453
|
-
const initScript = new InitScript(source);
|
|
454
|
-
this.initScripts.push(initScript);
|
|
455
|
-
try {
|
|
456
|
-
await progress.race(this.delegate.addInitScript(initScript));
|
|
457
|
-
} catch (error) {
|
|
458
|
-
this.removeInitScripts([initScript]).catch(() => {
|
|
459
|
-
});
|
|
460
|
-
throw error;
|
|
461
|
-
}
|
|
462
|
-
return initScript;
|
|
463
|
-
}
|
|
464
|
-
async removeInitScripts(initScripts) {
|
|
465
|
-
const set = new Set(initScripts);
|
|
466
|
-
this.initScripts = this.initScripts.filter((script) => !set.has(script));
|
|
467
|
-
await this.delegate.removeInitScripts(initScripts);
|
|
468
|
-
}
|
|
469
|
-
needsRequestInterception() {
|
|
470
|
-
return this.requestInterceptors.length > 0 || this.browserContext.requestInterceptors.length > 0;
|
|
471
|
-
}
|
|
472
|
-
async addRequestInterceptor(progress, handler, prepend) {
|
|
473
|
-
if (prepend)
|
|
474
|
-
this.requestInterceptors.unshift(handler);
|
|
475
|
-
else
|
|
476
|
-
this.requestInterceptors.push(handler);
|
|
477
|
-
await this.delegate.updateRequestInterception();
|
|
478
|
-
}
|
|
479
|
-
async removeRequestInterceptor(handler) {
|
|
480
|
-
const index = this.requestInterceptors.indexOf(handler);
|
|
481
|
-
if (index === -1)
|
|
482
|
-
return;
|
|
483
|
-
this.requestInterceptors.splice(index, 1);
|
|
484
|
-
await this.browserContext.notifyRoutesInFlightAboutRemovedHandler(handler);
|
|
485
|
-
await this.delegate.updateRequestInterception();
|
|
486
|
-
}
|
|
487
|
-
async expectScreenshot(progress, options) {
|
|
488
|
-
const locator = options.locator;
|
|
489
|
-
const rafrafScreenshot = locator ? async (timeout) => {
|
|
490
|
-
return await locator.frame.rafrafTimeoutScreenshotElementWithProgress(progress, locator.selector, timeout, options || {});
|
|
491
|
-
} : async (timeout) => {
|
|
492
|
-
await this.performActionPreChecks(progress);
|
|
493
|
-
await this.mainFrame().rafrafTimeout(progress, timeout);
|
|
494
|
-
return await this.screenshotter.screenshotPage(progress, options || {});
|
|
495
|
-
};
|
|
496
|
-
const comparator = (0, import_comparators.getComparator)("image/png");
|
|
497
|
-
if (!options.expected && options.isNot)
|
|
498
|
-
return { errorMessage: '"not" matcher requires expected result' };
|
|
499
|
-
try {
|
|
500
|
-
const format = (0, import_screenshotter.validateScreenshotOptions)(options || {});
|
|
501
|
-
if (format !== "png")
|
|
502
|
-
throw new Error("Only PNG screenshots are supported");
|
|
503
|
-
} catch (error) {
|
|
504
|
-
return { errorMessage: error.message };
|
|
505
|
-
}
|
|
506
|
-
let intermediateResult;
|
|
507
|
-
const areEqualScreenshots = (actual, expected, previous) => {
|
|
508
|
-
const comparatorResult = actual && expected ? comparator(actual, expected, options) : void 0;
|
|
509
|
-
if (comparatorResult !== void 0 && !!comparatorResult === !!options.isNot)
|
|
510
|
-
return true;
|
|
511
|
-
if (comparatorResult)
|
|
512
|
-
intermediateResult = { errorMessage: comparatorResult.errorMessage, diff: comparatorResult.diff, actual, previous };
|
|
513
|
-
return false;
|
|
514
|
-
};
|
|
515
|
-
try {
|
|
516
|
-
let actual;
|
|
517
|
-
let previous;
|
|
518
|
-
const pollIntervals = [0, 100, 250, 500];
|
|
519
|
-
progress.log(`${(0, import_utils.renderTitleForCall)(progress.metadata)}${options.timeout ? ` with timeout ${options.timeout}ms` : ""}`);
|
|
520
|
-
if (options.expected)
|
|
521
|
-
progress.log(` verifying given screenshot expectation`);
|
|
522
|
-
else
|
|
523
|
-
progress.log(` generating new stable screenshot expectation`);
|
|
524
|
-
let isFirstIteration = true;
|
|
525
|
-
while (true) {
|
|
526
|
-
if (this.isClosed())
|
|
527
|
-
throw new Error("The page has closed");
|
|
528
|
-
const screenshotTimeout = pollIntervals.shift() ?? 1e3;
|
|
529
|
-
if (screenshotTimeout)
|
|
530
|
-
progress.log(`waiting ${screenshotTimeout}ms before taking screenshot`);
|
|
531
|
-
previous = actual;
|
|
532
|
-
actual = await rafrafScreenshot(screenshotTimeout).catch((e) => {
|
|
533
|
-
if (this.mainFrame().isNonRetriableError(e))
|
|
534
|
-
throw e;
|
|
535
|
-
progress.log(`failed to take screenshot - ` + e.message);
|
|
536
|
-
return void 0;
|
|
537
|
-
});
|
|
538
|
-
if (!actual)
|
|
539
|
-
continue;
|
|
540
|
-
const expectation = options.expected && isFirstIteration ? options.expected : previous;
|
|
541
|
-
if (areEqualScreenshots(actual, expectation, previous))
|
|
542
|
-
break;
|
|
543
|
-
if (intermediateResult)
|
|
544
|
-
progress.log(intermediateResult.errorMessage);
|
|
545
|
-
isFirstIteration = false;
|
|
546
|
-
}
|
|
547
|
-
if (!isFirstIteration)
|
|
548
|
-
progress.log(`captured a stable screenshot`);
|
|
549
|
-
if (!options.expected)
|
|
550
|
-
return { actual };
|
|
551
|
-
if (isFirstIteration) {
|
|
552
|
-
progress.log(`screenshot matched expectation`);
|
|
553
|
-
return {};
|
|
554
|
-
}
|
|
555
|
-
if (areEqualScreenshots(actual, options.expected, void 0)) {
|
|
556
|
-
progress.log(`screenshot matched expectation`);
|
|
557
|
-
return {};
|
|
558
|
-
}
|
|
559
|
-
throw new Error(intermediateResult.errorMessage);
|
|
560
|
-
} catch (e) {
|
|
561
|
-
if (js.isJavaScriptErrorInEvaluate(e) || (0, import_selectorParser.isInvalidSelectorError)(e))
|
|
562
|
-
throw e;
|
|
563
|
-
let errorMessage = e.message;
|
|
564
|
-
if (e instanceof import_errors.TimeoutError && intermediateResult?.previous)
|
|
565
|
-
errorMessage = `Failed to take two consecutive stable screenshots.`;
|
|
566
|
-
return {
|
|
567
|
-
log: (0, import_callLog.compressCallLog)(e.message ? [...progress.metadata.log, e.message] : progress.metadata.log),
|
|
568
|
-
...intermediateResult,
|
|
569
|
-
errorMessage,
|
|
570
|
-
timedOut: e instanceof import_errors.TimeoutError
|
|
571
|
-
};
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
async screenshot(progress, options) {
|
|
575
|
-
return await this.screenshotter.screenshotPage(progress, options);
|
|
576
|
-
}
|
|
577
|
-
async close(options = {}) {
|
|
578
|
-
if (this._closedState === "closed")
|
|
579
|
-
return;
|
|
580
|
-
if (options.reason)
|
|
581
|
-
this.closeReason = options.reason;
|
|
582
|
-
const runBeforeUnload = !!options.runBeforeUnload;
|
|
583
|
-
if (this._closedState !== "closing") {
|
|
584
|
-
if (!runBeforeUnload)
|
|
585
|
-
this._closedState = "closing";
|
|
586
|
-
await this.delegate.closePage(runBeforeUnload).catch((e) => import_debugLogger.debugLogger.log("error", e));
|
|
587
|
-
}
|
|
588
|
-
if (!runBeforeUnload)
|
|
589
|
-
await this._closedPromise;
|
|
590
|
-
}
|
|
591
|
-
isClosed() {
|
|
592
|
-
return this._closedState === "closed";
|
|
593
|
-
}
|
|
594
|
-
hasCrashed() {
|
|
595
|
-
return this._crashed;
|
|
596
|
-
}
|
|
597
|
-
isClosedOrClosingOrCrashed() {
|
|
598
|
-
return this._closedState !== "open" || this._crashed;
|
|
599
|
-
}
|
|
600
|
-
addWorker(workerId, worker) {
|
|
601
|
-
this._workers.set(workerId, worker);
|
|
602
|
-
this.emit(Page.Events.Worker, worker);
|
|
603
|
-
}
|
|
604
|
-
removeWorker(workerId) {
|
|
605
|
-
const worker = this._workers.get(workerId);
|
|
606
|
-
if (!worker)
|
|
607
|
-
return;
|
|
608
|
-
worker.didClose();
|
|
609
|
-
this._workers.delete(workerId);
|
|
610
|
-
}
|
|
611
|
-
clearWorkers() {
|
|
612
|
-
for (const [workerId, worker] of this._workers) {
|
|
613
|
-
worker.didClose();
|
|
614
|
-
this._workers.delete(workerId);
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
async setFileChooserInterceptedBy(enabled, by) {
|
|
618
|
-
const wasIntercepted = this.fileChooserIntercepted();
|
|
619
|
-
if (enabled)
|
|
620
|
-
this._fileChooserInterceptedBy.add(by);
|
|
621
|
-
else
|
|
622
|
-
this._fileChooserInterceptedBy.delete(by);
|
|
623
|
-
if (wasIntercepted !== this.fileChooserIntercepted())
|
|
624
|
-
await this.delegate.updateFileChooserInterception();
|
|
625
|
-
}
|
|
626
|
-
fileChooserIntercepted() {
|
|
627
|
-
return this._fileChooserInterceptedBy.size > 0;
|
|
628
|
-
}
|
|
629
|
-
frameNavigatedToNewDocument(frame) {
|
|
630
|
-
this.emit(Page.Events.InternalFrameNavigatedToNewDocument, frame);
|
|
631
|
-
const origin = frame.origin();
|
|
632
|
-
if (origin)
|
|
633
|
-
this.browserContext.addVisitedOrigin(origin);
|
|
634
|
-
}
|
|
635
|
-
allInitScripts() {
|
|
636
|
-
const bindings = [...this.browserContext._pageBindings.values(), ...this._pageBindings.values()].map((binding) => binding.initScript);
|
|
637
|
-
if (this.browserContext.bindingsInitScript)
|
|
638
|
-
bindings.unshift(this.browserContext.bindingsInitScript);
|
|
639
|
-
return [...bindings, ...this.browserContext.initScripts, ...this.initScripts];
|
|
640
|
-
}
|
|
641
|
-
getBinding(name) {
|
|
642
|
-
return this._pageBindings.get(name) || this.browserContext._pageBindings.get(name);
|
|
643
|
-
}
|
|
644
|
-
setScreencastOptions(options) {
|
|
645
|
-
this.delegate.setScreencastOptions(options).catch((e) => import_debugLogger.debugLogger.log("error", e));
|
|
646
|
-
this._frameThrottler.setThrottlingEnabled(!!options);
|
|
647
|
-
}
|
|
648
|
-
throttleScreencastFrameAck(ack) {
|
|
649
|
-
this._frameThrottler.ack(ack);
|
|
650
|
-
}
|
|
651
|
-
temporarilyDisableTracingScreencastThrottling() {
|
|
652
|
-
this._frameThrottler.recharge();
|
|
653
|
-
}
|
|
654
|
-
async safeNonStallingEvaluateInAllFrames(expression, world, options = {}) {
|
|
655
|
-
await Promise.all(this.frames().map(async (frame) => {
|
|
656
|
-
try {
|
|
657
|
-
await frame.nonStallingEvaluateInExistingContext(expression, world);
|
|
658
|
-
} catch (e) {
|
|
659
|
-
if (options.throwOnJSErrors && js.isJavaScriptErrorInEvaluate(e))
|
|
660
|
-
throw e;
|
|
661
|
-
}
|
|
662
|
-
}));
|
|
663
|
-
}
|
|
664
|
-
async hideHighlight() {
|
|
665
|
-
await Promise.all(this.frames().map((frame) => frame.hideHighlight().catch(() => {
|
|
666
|
-
})));
|
|
667
|
-
}
|
|
668
|
-
async snapshotForAI(progress, options) {
|
|
669
|
-
const snapshot = await snapshotFrameForAI(progress, this.mainFrame(), options);
|
|
670
|
-
return snapshot.join("\n");
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
|
-
class Worker extends import_instrumentation.SdkObject {
|
|
674
|
-
constructor(parent, url) {
|
|
675
|
-
super(parent, "worker");
|
|
676
|
-
this.existingExecutionContext = null;
|
|
677
|
-
this.openScope = new import_utils.LongStandingScope();
|
|
678
|
-
this.url = url;
|
|
679
|
-
this._executionContextCallback = () => {
|
|
680
|
-
};
|
|
681
|
-
this._executionContextPromise = new Promise((x) => this._executionContextCallback = x);
|
|
682
|
-
}
|
|
683
|
-
static {
|
|
684
|
-
this.Events = {
|
|
685
|
-
Close: "close"
|
|
686
|
-
};
|
|
687
|
-
}
|
|
688
|
-
createExecutionContext(delegate) {
|
|
689
|
-
this.existingExecutionContext = new js.ExecutionContext(this, delegate, "worker");
|
|
690
|
-
this._executionContextCallback(this.existingExecutionContext);
|
|
691
|
-
return this.existingExecutionContext;
|
|
692
|
-
}
|
|
693
|
-
didClose() {
|
|
694
|
-
if (this.existingExecutionContext)
|
|
695
|
-
this.existingExecutionContext.contextDestroyed("Worker was closed");
|
|
696
|
-
this.emit(Worker.Events.Close, this);
|
|
697
|
-
this.openScope.close(new Error("Worker closed"));
|
|
698
|
-
}
|
|
699
|
-
async evaluateExpression(expression, isFunction, arg) {
|
|
700
|
-
return js.evaluateExpression(await this._executionContextPromise, expression, { returnByValue: true, isFunction }, arg);
|
|
701
|
-
}
|
|
702
|
-
async evaluateExpressionHandle(expression, isFunction, arg) {
|
|
703
|
-
return js.evaluateExpression(await this._executionContextPromise, expression, { returnByValue: false, isFunction }, arg);
|
|
704
|
-
}
|
|
705
|
-
}
|
|
706
|
-
class PageBinding {
|
|
707
|
-
static {
|
|
708
|
-
this.kController = "__playwright__binding__controller__";
|
|
709
|
-
}
|
|
710
|
-
static {
|
|
711
|
-
this.kBindingName = "__playwright__binding__";
|
|
712
|
-
}
|
|
713
|
-
static createInitScript() {
|
|
714
|
-
return new InitScript(`
|
|
715
|
-
(() => {
|
|
716
|
-
const module = {};
|
|
717
|
-
${rawBindingsControllerSource.source}
|
|
718
|
-
const property = '${PageBinding.kController}';
|
|
719
|
-
if (!globalThis[property])
|
|
720
|
-
globalThis[property] = new (module.exports.BindingsController())(globalThis, '${PageBinding.kBindingName}');
|
|
721
|
-
})();
|
|
722
|
-
`);
|
|
723
|
-
}
|
|
724
|
-
constructor(name, playwrightFunction, needsHandle) {
|
|
725
|
-
this.name = name;
|
|
726
|
-
this.playwrightFunction = playwrightFunction;
|
|
727
|
-
this.initScript = new InitScript(`globalThis['${PageBinding.kController}'].addBinding(${JSON.stringify(name)}, ${needsHandle})`);
|
|
728
|
-
this.needsHandle = needsHandle;
|
|
729
|
-
this.cleanupScript = `globalThis['${PageBinding.kController}'].removeBinding(${JSON.stringify(name)})`;
|
|
730
|
-
}
|
|
731
|
-
static async dispatch(page, payload, context) {
|
|
732
|
-
const { name, seq, serializedArgs } = JSON.parse(payload);
|
|
733
|
-
try {
|
|
734
|
-
(0, import_utils.assert)(context.world);
|
|
735
|
-
const binding = page.getBinding(name);
|
|
736
|
-
if (!binding)
|
|
737
|
-
throw new Error(`Function "${name}" is not exposed`);
|
|
738
|
-
let result;
|
|
739
|
-
if (binding.needsHandle) {
|
|
740
|
-
const handle = await context.evaluateExpressionHandle(`arg => globalThis['${PageBinding.kController}'].takeBindingHandle(arg)`, { isFunction: true }, { name, seq }).catch((e) => null);
|
|
741
|
-
result = await binding.playwrightFunction({ frame: context.frame, page, context: page.browserContext }, handle);
|
|
742
|
-
} else {
|
|
743
|
-
if (!Array.isArray(serializedArgs))
|
|
744
|
-
throw new Error(`serializedArgs is not an array. This can happen when Array.prototype.toJSON is defined incorrectly`);
|
|
745
|
-
const args = serializedArgs.map((a) => (0, import_utilityScriptSerializers.parseEvaluationResultValue)(a));
|
|
746
|
-
result = await binding.playwrightFunction({ frame: context.frame, page, context: page.browserContext }, ...args);
|
|
747
|
-
}
|
|
748
|
-
context.evaluateExpressionHandle(`arg => globalThis['${PageBinding.kController}'].deliverBindingResult(arg)`, { isFunction: true }, { name, seq, result }).catch((e) => import_debugLogger.debugLogger.log("error", e));
|
|
749
|
-
} catch (error) {
|
|
750
|
-
context.evaluateExpressionHandle(`arg => globalThis['${PageBinding.kController}'].deliverBindingResult(arg)`, { isFunction: true }, { name, seq, error }).catch((e) => import_debugLogger.debugLogger.log("error", e));
|
|
751
|
-
}
|
|
752
|
-
}
|
|
753
|
-
}
|
|
754
|
-
class InitScript {
|
|
755
|
-
constructor(source) {
|
|
756
|
-
this.source = `(() => {
|
|
757
|
-
${source}
|
|
758
|
-
})();`;
|
|
759
|
-
}
|
|
760
|
-
}
|
|
761
|
-
class FrameThrottler {
|
|
762
|
-
constructor(nonThrottledFrames, defaultInterval, throttlingInterval) {
|
|
763
|
-
this._acks = [];
|
|
764
|
-
this._throttlingEnabled = false;
|
|
765
|
-
this._nonThrottledFrames = nonThrottledFrames;
|
|
766
|
-
this._budget = nonThrottledFrames;
|
|
767
|
-
this._defaultInterval = defaultInterval;
|
|
768
|
-
this._throttlingInterval = throttlingInterval;
|
|
769
|
-
this._tick();
|
|
770
|
-
}
|
|
771
|
-
dispose() {
|
|
772
|
-
if (this._timeoutId) {
|
|
773
|
-
clearTimeout(this._timeoutId);
|
|
774
|
-
this._timeoutId = void 0;
|
|
775
|
-
}
|
|
776
|
-
}
|
|
777
|
-
setThrottlingEnabled(enabled) {
|
|
778
|
-
this._throttlingEnabled = enabled;
|
|
779
|
-
}
|
|
780
|
-
recharge() {
|
|
781
|
-
for (const ack of this._acks)
|
|
782
|
-
ack();
|
|
783
|
-
this._acks = [];
|
|
784
|
-
this._budget = this._nonThrottledFrames;
|
|
785
|
-
if (this._timeoutId) {
|
|
786
|
-
clearTimeout(this._timeoutId);
|
|
787
|
-
this._tick();
|
|
788
|
-
}
|
|
789
|
-
}
|
|
790
|
-
ack(ack) {
|
|
791
|
-
if (!this._timeoutId) {
|
|
792
|
-
ack();
|
|
793
|
-
return;
|
|
794
|
-
}
|
|
795
|
-
this._acks.push(ack);
|
|
796
|
-
}
|
|
797
|
-
_tick() {
|
|
798
|
-
const ack = this._acks.shift();
|
|
799
|
-
if (ack) {
|
|
800
|
-
--this._budget;
|
|
801
|
-
ack();
|
|
802
|
-
}
|
|
803
|
-
if (this._throttlingEnabled && this._budget <= 0) {
|
|
804
|
-
this._timeoutId = setTimeout(() => this._tick(), this._throttlingInterval);
|
|
805
|
-
} else {
|
|
806
|
-
this._timeoutId = setTimeout(() => this._tick(), this._defaultInterval);
|
|
807
|
-
}
|
|
808
|
-
}
|
|
809
|
-
}
|
|
810
|
-
async function snapshotFrameForAI(progress, frame, options) {
|
|
811
|
-
const snapshot = await frame.retryWithProgressAndTimeouts(progress, [1e3, 2e3, 4e3, 8e3], async (continuePolling) => {
|
|
812
|
-
try {
|
|
813
|
-
const context = await progress.race(frame._utilityContext());
|
|
814
|
-
const injectedScript = await progress.race(context.injectedScript());
|
|
815
|
-
const snapshotOrRetry = await progress.race(injectedScript.evaluate((injected, options2) => {
|
|
816
|
-
const node = injected.document.body;
|
|
817
|
-
if (!node)
|
|
818
|
-
return true;
|
|
819
|
-
return injected.ariaSnapshot(node, { mode: "ai", ...options2 });
|
|
820
|
-
}, { refPrefix: frame.seq ? "f" + frame.seq : "", incremental: options.mode === "incremental", track: options.track }));
|
|
821
|
-
if (snapshotOrRetry === true)
|
|
822
|
-
return continuePolling;
|
|
823
|
-
return snapshotOrRetry;
|
|
824
|
-
} catch (e) {
|
|
825
|
-
if (frame.isNonRetriableError(e))
|
|
826
|
-
throw e;
|
|
827
|
-
return continuePolling;
|
|
828
|
-
}
|
|
829
|
-
});
|
|
830
|
-
const lines = snapshot.split("\n");
|
|
831
|
-
const result = [];
|
|
832
|
-
for (const line of lines) {
|
|
833
|
-
const match = line.match(/^(\s*)- iframe (?:\[active\] )?\[ref=([^\]]*)\]/);
|
|
834
|
-
if (!match) {
|
|
835
|
-
result.push(line);
|
|
836
|
-
continue;
|
|
837
|
-
}
|
|
838
|
-
const leadingSpace = match[1];
|
|
839
|
-
const ref = match[2];
|
|
840
|
-
const frameSelector = `aria-ref=${ref} >> internal:control=enter-frame`;
|
|
841
|
-
const frameBodySelector = `${frameSelector} >> body`;
|
|
842
|
-
const child = await progress.race(frame.selectors.resolveFrameForSelector(frameBodySelector, { strict: true }));
|
|
843
|
-
if (!child) {
|
|
844
|
-
result.push(line);
|
|
845
|
-
continue;
|
|
846
|
-
}
|
|
847
|
-
try {
|
|
848
|
-
const childSnapshot = await snapshotFrameForAI(progress, child.frame, options);
|
|
849
|
-
result.push(line + ":", ...childSnapshot.map((l) => leadingSpace + " " + l));
|
|
850
|
-
} catch {
|
|
851
|
-
result.push(line);
|
|
852
|
-
}
|
|
853
|
-
}
|
|
854
|
-
return result;
|
|
855
|
-
}
|
|
856
|
-
function ensureArrayLimit(array, limit) {
|
|
857
|
-
if (array.length > limit)
|
|
858
|
-
return array.splice(0, limit / 10);
|
|
859
|
-
return [];
|
|
860
|
-
}
|
|
861
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
862
|
-
0 && (module.exports = {
|
|
863
|
-
InitScript,
|
|
864
|
-
Page,
|
|
865
|
-
PageBinding,
|
|
866
|
-
Worker
|
|
867
|
-
});
|