From 7e919228b0693c50d0c4b232fe238f03675397ab Mon Sep 17 00:00:00 2001 From: Alexandra Borovova Date: Fri, 27 Jan 2023 16:50:45 +0000 Subject: [PATCH] Bug 1797744 - [puppeteer] Sync vendored puppeteer to v19.6.0. r=webdriver-reviewers,jdescottes,whimboo Differential Revision: https://phabricator.services.mozilla.com/D167407 --- .hgignore | 7 +- remote/.gitignore | 14 +- remote/doc/cdp/PuppeteerVendor.md | 2 +- remote/mach_commands.py | 69 +- remote/test/puppeteer/.eslintignore | 14 +- remote/test/puppeteer/.eslintrc.js | 2 +- remote/test/puppeteer/.prettierignore | 21 +- remote/test/puppeteer/.prettierrc.cjs | 8 +- .../puppeteer/.release-please-manifest.json | 5 +- remote/test/puppeteer/README.md | 449 +- remote/test/puppeteer/SECURITY.md | 7 + remote/test/puppeteer/commitlint.config.js | 11 +- remote/test/puppeteer/compat/README.md | 16 - remote/test/puppeteer/compat/cjs/compat.ts | 19 - .../test/puppeteer/compat/cjs/tsconfig.json | 8 - remote/test/puppeteer/compat/esm/compat.ts | 22 - .../test/puppeteer/compat/esm/tsconfig.json | 8 - .../puppeteer/docs/puppeteer-core.api.json | 31369 ++++++++++++++++ remote/test/puppeteer/examples/README.md | 1 + .../test/puppeteer/examples/cross-browser.js | 2 +- remote/test/puppeteer/install.js | 89 - remote/test/puppeteer/moz.yaml | 2 +- remote/test/puppeteer/package-lock.json | 6622 ++-- remote/test/puppeteer/package.json | 178 +- .../packages/ng-schematics/.eslintignore | 2 + .../packages/ng-schematics/.gitignore | 22 + .../packages/ng-schematics/.mocharc.cjs | 6 + .../packages/ng-schematics/CHANGELOG.md | 8 + .../packages/ng-schematics/README.md | 51 + .../packages/ng-schematics/copySchemaFiles.js | 70 + .../packages/ng-schematics/package-lock.json | 1098 + .../packages/ng-schematics/package.json | 86 + .../ng-schematics/src/builders/builders.json | 10 + .../src/builders/puppeteer/index.ts | 137 + .../src/builders/puppeteer/schema.json | 22 + .../src/builders/puppeteer/types.ts | 24 + .../src/schematics/collection.json | 10 + .../files/base/.puppeteerrc.cjs.template | 4 + .../files/base/e2e/tests/app.e2e.ts.template | 59 + .../files/base/e2e/tsconfig.json.template | 15 + .../ng-add/files/jasmine/e2e/helpers/babel.js | 4 + .../files/jasmine/e2e/support/jasmine.json | 9 + .../ng-add/files/jest/e2e/jest.config.js | 11 + .../ng-add/files/mocha/e2e/.mocharc.js | 4 + .../ng-add/files/mocha/e2e/babel.js | 4 + .../ng-add/files/node/e2e/.gitignore.template | 3 + .../src/schematics/ng-add/index.ts | 128 + .../src/schematics/ng-add/schema.json | 49 + .../src/schematics/utils/files.ts | 160 + .../src/schematics/utils/json.ts | 38 + .../src/schematics/utils/packages.ts | 202 + .../src/schematics/utils/types.ts | 28 + .../ng-schematics/test/src/index.spec.ts | 211 + .../packages/ng-schematics/tsconfig.json | 19 + .../packages/ng-schematics/tsconfig.spec.json | 10 + .../packages/puppeteer-core/.gitignore | 1 + .../packages/puppeteer-core/CHANGELOG.md | 1070 + .../puppeteer-core}/api-extractor.json | 4 +- .../packages/puppeteer-core/package.json | 169 + .../rollup.third_party.config.js | 41 + .../puppeteer-core}/src/api/Browser.ts | 167 +- .../puppeteer-core/src/api/BrowserContext.ts | 185 + .../puppeteer-core/src/api}/Page.ts | 1736 +- .../packages/puppeteer-core/src/api/api.ts | 19 + .../src/common/Accessibility.ts | 5 +- .../src/common/AriaQueryHandler.ts | 20 +- .../puppeteer-core}/src/common/Browser.ts | 10 +- .../src/common/BrowserConnector.ts | 13 +- .../src/common/BrowserWebSocketTransport.ts | 0 .../src/common/ChromeTargetManager.ts | 11 +- .../src/common/Configuration.ts | 135 + .../puppeteer-core}/src/common/Connection.ts | 0 .../src/common/ConnectionTransport.ts | 0 .../src/common/ConsoleMessage.ts | 0 .../puppeteer-core}/src/common/Coverage.ts | 13 +- .../puppeteer-core}/src/common/Debug.ts | 27 + .../puppeteer-core/src/common/Device.ts} | 51 +- .../puppeteer-core}/src/common/Dialog.ts | 2 +- .../src/common/ElementHandle.ts | 63 +- .../src/common/EmulationManager.ts | 0 .../puppeteer-core}/src/common/Errors.ts | 41 +- .../src/common/EventEmitter.ts | 28 +- .../src/common/ExecutionContext.ts | 0 .../puppeteer-core}/src/common/FileChooser.ts | 0 .../src/common/FirefoxTargetManager.ts | 2 +- .../puppeteer-core}/src/common/Frame.ts | 39 +- .../src/common/FrameManager.ts | 32 +- .../puppeteer-core}/src/common/FrameTree.ts | 0 .../puppeteer-core}/src/common/HTTPRequest.ts | 0 .../src/common/HTTPResponse.ts | 0 .../puppeteer-core}/src/common/Input.ts | 20 +- .../src/common/IsolatedWorld.ts | 32 +- .../src/common/IsolatedWorlds.ts | 30 + .../puppeteer-core}/src/common/JSHandle.ts | 2 +- .../puppeteer-core}/src/common/LazyArg.ts | 0 .../src/common/LifecycleWatcher.ts | 12 + .../src/common/NetworkEventManager.ts | 0 .../src/common/NetworkManager.ts | 0 .../src/common}/NodeWebSocketTransport.ts | 6 +- .../puppeteer-core}/src/common/PDFOptions.ts | 2 +- .../puppeteer-core/src/common/Page.ts | 1699 + .../common/PredefinedNetworkConditions.ts} | 24 +- .../puppeteer-core}/src/common/Product.ts | 0 .../puppeteer-core}/src/common/Puppeteer.ts | 148 +- .../src/common/PuppeteerViewport.ts | 0 .../src/common/QueryHandler.ts | 36 +- .../src/common/SecurityDetails.ts | 0 .../puppeteer-core}/src/common/Target.ts | 17 +- .../src/common/TargetManager.ts | 4 +- .../puppeteer-core}/src/common/TaskQueue.ts | 0 .../src/common/TimeoutSettings.ts | 0 .../puppeteer-core}/src/common/Tracing.ts | 0 .../src/common/USKeyboardLayout.ts | 0 .../puppeteer-core}/src/common/WaitTask.ts | 12 +- .../puppeteer-core}/src/common/WebWorker.ts | 0 .../src/common/bidi/BidiOverCDP.ts | 167 + .../src/common/bidi/Browser.ts | 30 +- .../src/common/bidi/BrowserContext.ts | 41 + .../src/common/bidi/Connection.ts | 2 +- .../puppeteer-core/src/common/bidi/Page.ts | 56 + .../puppeteer-core/src/common/bidi/bidi.ts | 21 + .../puppeteer-core/src/common/common.ts | 69 + .../puppeteer-core}/src/common/fetch.ts | 0 .../puppeteer-core/src/common/types.ts | 181 + .../puppeteer-core}/src/common/util.ts | 0 .../puppeteer-core}/src/environment.ts | 0 .../puppeteer-core/src/generated/injected.ts | 8 + .../puppeteer-core/src/generated/version.ts | 4 + .../src/injected/PierceQuerySelector.ts | 6 + .../puppeteer-core}/src/injected/Poller.ts | 7 + .../src/injected/TextContent.ts | 2 + .../src/injected/TextQuerySelector.ts | 0 .../src/injected/XPathQuerySelector.ts | 6 + .../puppeteer-core}/src/injected/injected.ts | 23 +- .../puppeteer-core}/src/injected/util.ts | 13 +- .../src/node/BrowserFetcher.ts | 364 +- .../puppeteer-core}/src/node/BrowserRunner.ts | 13 +- .../src/node/ChromeLauncher.ts | 192 +- .../src/node/FirefoxLauncher.ts | 99 +- .../puppeteer-core}/src/node/LaunchOptions.ts | 2 +- .../puppeteer-core}/src/node/PipeTransport.ts | 2 +- .../src/node/ProductLauncher.ts | 149 + .../puppeteer-core/src/node/PuppeteerNode.ts | 319 + .../packages/puppeteer-core/src/node/node.ts | 24 + .../puppeteer-core/src/puppeteer-core.ts} | 24 +- .../puppeteer-core}/src/revisions.ts | 2 +- .../src/templates/injected.ts.tmpl | 0 .../src/templates/version.ts.tmpl | 0 .../puppeteer-core/src/tsconfig.cjs.json | 8 + .../puppeteer-core/src/tsconfig.esm.json | 7 + .../src/util/DebuggableDeferredPromise.ts | 0 .../src/util/DeferredPromise.ts | 0 .../puppeteer-core}/src/util/ErrorLike.ts | 0 .../puppeteer-core}/src/util/assert.ts | 0 .../packages/puppeteer-core/src/util/util.ts | 20 + .../third_party/chromium-bidi/index.ts} | 19 +- .../puppeteer-core/third_party/mitt/index.ts} | 5 +- .../third_party/tsconfig.cjs.json | 8 + .../puppeteer-core/third_party/tsconfig.json | 8 + ...nsure-correct-devtools-protocol-package.ts | 2 +- .../puppeteer-core/tools}/generate_sources.ts | 59 +- .../packages/puppeteer-core/tsconfig.json | 8 + .../puppeteer/packages/puppeteer/.gitignore | 1 + .../{ => packages/puppeteer}/CHANGELOG.md | 263 + .../packages/puppeteer/api-extractor.json | 50 + .../puppeteer/packages/puppeteer/install.js | 40 + .../puppeteer/packages/puppeteer/package.json | 131 + .../puppeteer/src/getConfiguration.ts | 108 + .../puppeteer}/src/node/install.ts | 82 +- .../puppeteer/src/puppeteer.ts} | 20 +- .../packages/puppeteer/src/tsconfig.cjs.json | 8 + .../packages/puppeteer/src/tsconfig.esm.json | 7 + .../packages/puppeteer/tsconfig.json | 16 + .../packages/testserver/CHANGELOG.md | 8 + .../{utils => packages}/testserver/LICENSE | 0 .../{utils => packages}/testserver/README.md | 0 .../{utils => packages}/testserver/cert.pem | 0 .../{utils => packages}/testserver/key.pem | 0 .../packages/testserver/package.json | 20 + .../testserver/src/index.ts | 0 .../testserver}/tsconfig.json | 0 .../test/puppeteer/release-please-config.json | 27 +- remote/test/puppeteer/scripts/test-install.sh | 157 - remote/test/puppeteer/scripts/tsconfig.json | 6 - remote/test/puppeteer/src/common/types.ts | 68 - .../test/puppeteer/src/generated/version.ts | 4 - .../test/puppeteer/src/initializePuppeteer.ts | 46 - remote/test/puppeteer/src/injected/README.md | 5 - .../puppeteer/src/node/ProductLauncher.ts | 217 - remote/test/puppeteer/src/node/Puppeteer.ts | 247 - remote/test/puppeteer/src/node/util.ts | 13 - remote/test/puppeteer/src/templates/README.md | 3 - remote/test/puppeteer/src/tsconfig.cjs.json | 12 - remote/test/puppeteer/src/tsconfig.esm.json | 12 - remote/test/puppeteer/src/types.ts | 77 - .../puppeteer/src/util/getPackageDirectory.ts | 18 - .../puppeteer/test-d/ElementHandle.test-d.ts | 888 +- .../test/puppeteer/test-d/JSHandle.test-d.ts | 3 +- .../test/puppeteer/test-d/NodeFor.test-d.ts | 156 + .../test/puppeteer/test-d/puppeteer.test-d.ts | 7 +- remote/test/puppeteer/test-d/tsconfig.json | 8 - remote/test/puppeteer/test/README.md | 26 +- .../test/puppeteer/test/TestExpectations.json | 1050 +- remote/test/puppeteer/test/TestSuites.json | 16 +- .../test/assets/jscoverage/ranges.html | 2 +- .../golden-chromium/csscoverage-involved.txt | 4 +- .../vision-deficiency-blurredVision.png | Bin 81286 -> 81174 bytes .../screenshot-clip-rect-scale2.png | Bin 0 -> 8472 bytes .../puppeteer/test/installation/.mocharc.cjs | 23 + .../assets/puppeteer-core/imports.js | 19 + .../assets/puppeteer-core/launch.js | 32 + .../assets/puppeteer-core/requires.cjs | 19 + .../installation/assets/puppeteer/basic.js | 25 + .../puppeteer/configuration/.puppeteerrc.cjs | 8 + .../installation/assets/puppeteer/imports.js} | 9 +- .../assets/puppeteer/requires.cjs | 20 + .../puppeteer/webpack/webpack.config.js | 25 + .../puppeteer/test/installation/package.json | 50 + .../test/installation/src/constants.ts | 31 + .../installation/src/describeInstallation.ts | 161 + .../src/puppeteer-configuration.spec.ts | 43 + .../installation/src/puppeteer-core.spec.ts | 44 + .../src/puppeteer-firefox.spec.ts | 47 + .../src/puppeteer-webpack.spec.ts | 57 + .../test/installation/src/puppeteer.spec.ts | 46 + .../puppeteer/test/installation/src/util.ts | 26 + .../puppeteer/test/installation/tsconfig.json | 10 + remote/test/puppeteer/test/package.json | 29 + .../puppeteer/test/src/CDPSession.spec.ts | 7 +- .../puppeteer/test/src/EventEmitter.spec.ts | 2 +- .../puppeteer/test/src/NetworkManager.spec.ts | 10 +- .../puppeteer/test/src/TargetManager.spec.ts | 2 +- .../puppeteer/test/src/accessibility.spec.ts | 53 +- .../test/src/ariaqueryhandler.spec.ts | 9 +- .../test/src/bidi/Connection.spec.ts | 4 +- .../test/puppeteer/test/src/browser.spec.ts | 2 +- .../puppeteer/test/src/browsercontext.spec.ts | 23 +- remote/test/puppeteer/test/src/click.spec.ts | 7 +- .../test/puppeteer/test/src/cookies.spec.ts | 2 +- .../test/puppeteer/test/src/coverage.spec.ts | 24 +- .../puppeteer/test/src/elementhandle.spec.ts | 59 +- .../test/puppeteer/test/src/emulation.spec.ts | 21 +- .../test/puppeteer/test/src/fixtures.spec.ts | 2 +- remote/test/puppeteer/test/src/frame.spec.ts | 4 +- .../test/puppeteer/test/src/headful.spec.ts | 2 +- .../puppeteer/test/src/idle_override.spec.ts | 2 +- .../test/src/ignorehttpserrors.spec.ts | 7 +- .../test/puppeteer/test/src/injected.spec.ts | 3 +- remote/test/puppeteer/test/src/input.spec.ts | 13 +- .../test/puppeteer/test/src/keyboard.spec.ts | 32 +- .../test/puppeteer/test/src/launcher.spec.ts | 85 +- remote/test/puppeteer/test/src/mocha-utils.ts | 74 +- remote/test/puppeteer/test/src/mouse.spec.ts | 2 +- .../puppeteer/test/src/navigation.spec.ts | 54 +- .../test/puppeteer/test/src/network.spec.ts | 4 +- remote/test/puppeteer/test/src/oopif.spec.ts | 13 +- remote/test/puppeteer/test/src/page.spec.ts | 69 +- remote/test/puppeteer/test/src/proxy.spec.ts | 4 +- .../puppeteer/test/src/queryhandler.spec.ts | 2 +- .../puppeteer/test/src/queryselector.spec.ts | 9 +- .../requestinterception-experimental.spec.ts | 4 +- .../test/src/requestinterception.spec.ts | 4 +- remote/test/puppeteer/test/src/target.spec.ts | 15 +- .../puppeteer/test/src/touchscreen.spec.ts | 9 +- .../test/puppeteer/test/src/tracing.spec.ts | 4 +- remote/test/puppeteer/test/src/utils.ts | 6 +- .../test/puppeteer/test/src/waittask.spec.ts | 49 +- remote/test/puppeteer/test/src/worker.spec.ts | 4 +- remote/test/puppeteer/test/tsconfig.json | 9 +- remote/test/puppeteer/tools/analyze_issue.mjs | 280 + .../puppeteer/tools/assets/verify_issue.ts | 68 + .../{utils/bisect.js => tools/bisect.ts} | 61 +- .../{utils => tools}/check_availability.js | 7 +- .../{scripts => tools}/ensure-pinned-deps.ts | 19 +- .../{utils => tools}/generate-matrix.js | 0 .../{utils => tools}/generate_docs.ts | 22 +- .../tools/generate_module_package_json.ts | 24 + .../get_deprecated_version_range.js | 7 +- .../internal/custom_markdown_action.ts | 0 .../internal/custom_markdown_documenter.ts | 58 +- .../{utils => tools}/internal/job.ts | 17 +- .../{utils => tools}/internal/util.ts | 0 .../{utils => tools}/mochaRunner/README.md | 6 +- .../mochaRunner/src/interface.ts | 4 +- .../{utils => tools}/mochaRunner/src/main.ts | 20 +- .../mochaRunner/src/reporter.ts | 0 .../{utils => tools}/mochaRunner/src/test.ts | 0 .../{utils => tools}/mochaRunner/src/types.ts | 0 .../{utils => tools}/mochaRunner/src/utils.ts | 0 .../mochaRunner}/tsconfig.json | 0 .../{utils => tools}/remove_version_suffix.js | 0 remote/test/puppeteer/tools/tsconfig.json | 4 + remote/test/puppeteer/tsconfig.base.json | 3 + remote/test/puppeteer/tsconfig.json | 13 - remote/test/puppeteer/tsconfig.lib.json | 16 - .../test/puppeteer/typescript-if-required.js | 70 - .../puppeteer/utils/generate_artifacts.ts | 28 - .../puppeteer/utils/testserver/lib/index.d.ts | 45 - .../utils/testserver/lib/index.d.ts.map | 1 - .../puppeteer/utils/testserver/lib/index.js | 261 - .../utils/testserver/lib/index.js.map | 1 - .../puppeteer/utils/testserver/package.json | 15 - remote/test/puppeteer/utils/tsconfig.json | 12 - remote/test/puppeteer/vendor/README.md | 13 - remote/test/puppeteer/vendor/mitt/README.md | 179 - .../puppeteer/vendor/mitt/dist/mitt.es.js | 2 - .../puppeteer/vendor/mitt/dist/mitt.es.js.map | 1 - .../test/puppeteer/vendor/mitt/dist/mitt.js | 2 - .../puppeteer/vendor/mitt/dist/mitt.js.map | 1 - .../puppeteer/vendor/mitt/dist/mitt.modern.js | 2 - .../vendor/mitt/dist/mitt.modern.js.map | 1 - .../puppeteer/vendor/mitt/dist/mitt.umd.js | 2 - .../vendor/mitt/dist/mitt.umd.js.map | 1 - remote/test/puppeteer/vendor/mitt/index.d.ts | 21 - .../test/puppeteer/vendor/mitt/package.json | 141 - .../test/puppeteer/vendor/mitt/src/index.ts | 92 - .../test/puppeteer/vendor/tsconfig.cjs.json | 12 - .../test/puppeteer/vendor/tsconfig.esm.json | 12 - remote/test/puppeteer/versions.js | 8 +- 319 files changed, 48062 insertions(+), 8097 deletions(-) create mode 100644 remote/test/puppeteer/SECURITY.md delete mode 100644 remote/test/puppeteer/compat/README.md delete mode 100644 remote/test/puppeteer/compat/cjs/compat.ts delete mode 100644 remote/test/puppeteer/compat/cjs/tsconfig.json delete mode 100644 remote/test/puppeteer/compat/esm/compat.ts delete mode 100644 remote/test/puppeteer/compat/esm/tsconfig.json create mode 100644 remote/test/puppeteer/docs/puppeteer-core.api.json delete mode 100644 remote/test/puppeteer/install.js create mode 100644 remote/test/puppeteer/packages/ng-schematics/.eslintignore create mode 100644 remote/test/puppeteer/packages/ng-schematics/.gitignore create mode 100644 remote/test/puppeteer/packages/ng-schematics/.mocharc.cjs create mode 100644 remote/test/puppeteer/packages/ng-schematics/CHANGELOG.md create mode 100644 remote/test/puppeteer/packages/ng-schematics/README.md create mode 100644 remote/test/puppeteer/packages/ng-schematics/copySchemaFiles.js create mode 100644 remote/test/puppeteer/packages/ng-schematics/package-lock.json create mode 100644 remote/test/puppeteer/packages/ng-schematics/package.json create mode 100644 remote/test/puppeteer/packages/ng-schematics/src/builders/builders.json create mode 100644 remote/test/puppeteer/packages/ng-schematics/src/builders/puppeteer/index.ts create mode 100644 remote/test/puppeteer/packages/ng-schematics/src/builders/puppeteer/schema.json create mode 100644 remote/test/puppeteer/packages/ng-schematics/src/builders/puppeteer/types.ts create mode 100644 remote/test/puppeteer/packages/ng-schematics/src/schematics/collection.json create mode 100644 remote/test/puppeteer/packages/ng-schematics/src/schematics/ng-add/files/base/.puppeteerrc.cjs.template create mode 100644 remote/test/puppeteer/packages/ng-schematics/src/schematics/ng-add/files/base/e2e/tests/app.e2e.ts.template create mode 100644 remote/test/puppeteer/packages/ng-schematics/src/schematics/ng-add/files/base/e2e/tsconfig.json.template create mode 100644 remote/test/puppeteer/packages/ng-schematics/src/schematics/ng-add/files/jasmine/e2e/helpers/babel.js create mode 100644 remote/test/puppeteer/packages/ng-schematics/src/schematics/ng-add/files/jasmine/e2e/support/jasmine.json create mode 100644 remote/test/puppeteer/packages/ng-schematics/src/schematics/ng-add/files/jest/e2e/jest.config.js create mode 100644 remote/test/puppeteer/packages/ng-schematics/src/schematics/ng-add/files/mocha/e2e/.mocharc.js create mode 100644 remote/test/puppeteer/packages/ng-schematics/src/schematics/ng-add/files/mocha/e2e/babel.js create mode 100644 remote/test/puppeteer/packages/ng-schematics/src/schematics/ng-add/files/node/e2e/.gitignore.template create mode 100644 remote/test/puppeteer/packages/ng-schematics/src/schematics/ng-add/index.ts create mode 100644 remote/test/puppeteer/packages/ng-schematics/src/schematics/ng-add/schema.json create mode 100644 remote/test/puppeteer/packages/ng-schematics/src/schematics/utils/files.ts create mode 100644 remote/test/puppeteer/packages/ng-schematics/src/schematics/utils/json.ts create mode 100644 remote/test/puppeteer/packages/ng-schematics/src/schematics/utils/packages.ts create mode 100644 remote/test/puppeteer/packages/ng-schematics/src/schematics/utils/types.ts create mode 100644 remote/test/puppeteer/packages/ng-schematics/test/src/index.spec.ts create mode 100644 remote/test/puppeteer/packages/ng-schematics/tsconfig.json create mode 100644 remote/test/puppeteer/packages/ng-schematics/tsconfig.spec.json create mode 100644 remote/test/puppeteer/packages/puppeteer-core/.gitignore create mode 100644 remote/test/puppeteer/packages/puppeteer-core/CHANGELOG.md rename remote/test/puppeteer/{ => packages/puppeteer-core}/api-extractor.json (82%) create mode 100644 remote/test/puppeteer/packages/puppeteer-core/package.json create mode 100644 remote/test/puppeteer/packages/puppeteer-core/rollup.third_party.config.js rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/api/Browser.ts (71%) create mode 100644 remote/test/puppeteer/packages/puppeteer-core/src/api/BrowserContext.ts rename remote/test/puppeteer/{src/common => packages/puppeteer-core/src/api}/Page.ts (60%) create mode 100644 remote/test/puppeteer/packages/puppeteer-core/src/api/api.ts rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/Accessibility.ts (99%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/AriaQueryHandler.ts (92%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/Browser.ts (98%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/BrowserConnector.ts (94%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/BrowserWebSocketTransport.ts (100%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/ChromeTargetManager.ts (97%) create mode 100644 remote/test/puppeteer/packages/puppeteer-core/src/common/Configuration.ts rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/Connection.ts (100%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/ConnectionTransport.ts (100%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/ConsoleMessage.ts (100%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/Coverage.ts (96%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/Debug.ts (88%) rename remote/test/puppeteer/{src/common/DeviceDescriptors.ts => packages/puppeteer-core/src/common/Device.ts} (98%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/Dialog.ts (98%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/ElementHandle.ts (94%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/EmulationManager.ts (100%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/Errors.ts (77%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/EventEmitter.ts (86%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/ExecutionContext.ts (100%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/FileChooser.ts (100%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/FirefoxTargetManager.ts (99%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/Frame.ts (96%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/FrameManager.ts (94%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/FrameTree.ts (100%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/HTTPRequest.ts (100%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/HTTPResponse.ts (100%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/Input.ts (95%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/IsolatedWorld.ts (95%) create mode 100644 remote/test/puppeteer/packages/puppeteer-core/src/common/IsolatedWorlds.ts rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/JSHandle.ts (99%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/LazyArg.ts (100%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/LifecycleWatcher.ts (96%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/NetworkEventManager.ts (100%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/NetworkManager.ts (100%) rename remote/test/puppeteer/{src/node => packages/puppeteer-core/src/common}/NodeWebSocketTransport.ts (93%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/PDFOptions.ts (98%) create mode 100644 remote/test/puppeteer/packages/puppeteer-core/src/common/Page.ts rename remote/test/puppeteer/{src/common/NetworkConditions.ts => packages/puppeteer-core/src/common/PredefinedNetworkConditions.ts} (73%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/Product.ts (100%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/Puppeteer.ts (65%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/PuppeteerViewport.ts (100%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/QueryHandler.ts (90%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/SecurityDetails.ts (100%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/Target.ts (93%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/TargetManager.ts (96%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/TaskQueue.ts (100%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/TimeoutSettings.ts (100%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/Tracing.ts (100%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/USKeyboardLayout.ts (100%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/WaitTask.ts (95%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/WebWorker.ts (100%) create mode 100644 remote/test/puppeteer/packages/puppeteer-core/src/common/bidi/BidiOverCDP.ts rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/bidi/Browser.ts (51%) create mode 100644 remote/test/puppeteer/packages/puppeteer-core/src/common/bidi/BrowserContext.ts rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/bidi/Connection.ts (98%) create mode 100644 remote/test/puppeteer/packages/puppeteer-core/src/common/bidi/Page.ts create mode 100644 remote/test/puppeteer/packages/puppeteer-core/src/common/bidi/bidi.ts create mode 100644 remote/test/puppeteer/packages/puppeteer-core/src/common/common.ts rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/fetch.ts (100%) create mode 100644 remote/test/puppeteer/packages/puppeteer-core/src/common/types.ts rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/common/util.ts (100%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/environment.ts (100%) create mode 100644 remote/test/puppeteer/packages/puppeteer-core/src/generated/injected.ts create mode 100644 remote/test/puppeteer/packages/puppeteer-core/src/generated/version.ts rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/injected/PierceQuerySelector.ts (98%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/injected/Poller.ts (98%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/injected/TextContent.ts (99%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/injected/TextQuerySelector.ts (100%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/injected/XPathQuerySelector.ts (96%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/injected/injected.ts (77%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/injected/util.ts (86%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/node/BrowserFetcher.ts (67%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/node/BrowserRunner.ts (97%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/node/ChromeLauncher.ts (55%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/node/FirefoxLauncher.ts (87%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/node/LaunchOptions.ts (99%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/node/PipeTransport.ts (100%) create mode 100644 remote/test/puppeteer/packages/puppeteer-core/src/node/ProductLauncher.ts create mode 100644 remote/test/puppeteer/packages/puppeteer-core/src/node/PuppeteerNode.ts create mode 100644 remote/test/puppeteer/packages/puppeteer-core/src/node/node.ts rename remote/test/puppeteer/{src/puppeteer.ts => packages/puppeteer-core/src/puppeteer-core.ts} (70%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/revisions.ts (96%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/templates/injected.ts.tmpl (100%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/templates/version.ts.tmpl (100%) create mode 100644 remote/test/puppeteer/packages/puppeteer-core/src/tsconfig.cjs.json create mode 100644 remote/test/puppeteer/packages/puppeteer-core/src/tsconfig.esm.json rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/util/DebuggableDeferredPromise.ts (100%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/util/DeferredPromise.ts (100%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/util/ErrorLike.ts (100%) rename remote/test/puppeteer/{ => packages/puppeteer-core}/src/util/assert.ts (100%) create mode 100644 remote/test/puppeteer/packages/puppeteer-core/src/util/util.ts rename remote/test/puppeteer/{utils/prepare_puppeteer_core.js => packages/puppeteer-core/third_party/chromium-bidi/index.ts} (51%) mode change 100755 => 100644 rename remote/test/puppeteer/{src/compat.d.ts => packages/puppeteer-core/third_party/mitt/index.ts} (90%) create mode 100644 remote/test/puppeteer/packages/puppeteer-core/third_party/tsconfig.cjs.json create mode 100644 remote/test/puppeteer/packages/puppeteer-core/third_party/tsconfig.json rename remote/test/puppeteer/{scripts => packages/puppeteer-core/tools}/ensure-correct-devtools-protocol-package.ts (98%) rename remote/test/puppeteer/{utils => packages/puppeteer-core/tools}/generate_sources.ts (66%) create mode 100644 remote/test/puppeteer/packages/puppeteer-core/tsconfig.json create mode 100644 remote/test/puppeteer/packages/puppeteer/.gitignore rename remote/test/puppeteer/{ => packages/puppeteer}/CHANGELOG.md (88%) create mode 100644 remote/test/puppeteer/packages/puppeteer/api-extractor.json create mode 100644 remote/test/puppeteer/packages/puppeteer/install.js create mode 100644 remote/test/puppeteer/packages/puppeteer/package.json create mode 100644 remote/test/puppeteer/packages/puppeteer/src/getConfiguration.ts rename remote/test/puppeteer/{ => packages/puppeteer}/src/node/install.ts (76%) rename remote/test/puppeteer/{src/puppeteer-core.ts => packages/puppeteer/src/puppeteer.ts} (66%) create mode 100644 remote/test/puppeteer/packages/puppeteer/src/tsconfig.cjs.json create mode 100644 remote/test/puppeteer/packages/puppeteer/src/tsconfig.esm.json create mode 100644 remote/test/puppeteer/packages/puppeteer/tsconfig.json create mode 100644 remote/test/puppeteer/packages/testserver/CHANGELOG.md rename remote/test/puppeteer/{utils => packages}/testserver/LICENSE (100%) rename remote/test/puppeteer/{utils => packages}/testserver/README.md (100%) rename remote/test/puppeteer/{utils => packages}/testserver/cert.pem (100%) rename remote/test/puppeteer/{utils => packages}/testserver/key.pem (100%) create mode 100644 remote/test/puppeteer/packages/testserver/package.json rename remote/test/puppeteer/{utils => packages}/testserver/src/index.ts (100%) rename remote/test/puppeteer/{utils/mochaRunner => packages/testserver}/tsconfig.json (100%) delete mode 100755 remote/test/puppeteer/scripts/test-install.sh delete mode 100644 remote/test/puppeteer/scripts/tsconfig.json delete mode 100644 remote/test/puppeteer/src/common/types.ts delete mode 100644 remote/test/puppeteer/src/generated/version.ts delete mode 100644 remote/test/puppeteer/src/initializePuppeteer.ts delete mode 100644 remote/test/puppeteer/src/injected/README.md delete mode 100644 remote/test/puppeteer/src/node/ProductLauncher.ts delete mode 100644 remote/test/puppeteer/src/node/Puppeteer.ts delete mode 100644 remote/test/puppeteer/src/node/util.ts delete mode 100644 remote/test/puppeteer/src/templates/README.md delete mode 100644 remote/test/puppeteer/src/tsconfig.cjs.json delete mode 100644 remote/test/puppeteer/src/tsconfig.esm.json delete mode 100644 remote/test/puppeteer/src/types.ts delete mode 100644 remote/test/puppeteer/src/util/getPackageDirectory.ts create mode 100644 remote/test/puppeteer/test-d/NodeFor.test-d.ts delete mode 100644 remote/test/puppeteer/test-d/tsconfig.json create mode 100644 remote/test/puppeteer/test/golden-firefox/screenshot-clip-rect-scale2.png create mode 100644 remote/test/puppeteer/test/installation/.mocharc.cjs create mode 100644 remote/test/puppeteer/test/installation/assets/puppeteer-core/imports.js create mode 100644 remote/test/puppeteer/test/installation/assets/puppeteer-core/launch.js create mode 100644 remote/test/puppeteer/test/installation/assets/puppeteer-core/requires.cjs create mode 100644 remote/test/puppeteer/test/installation/assets/puppeteer/basic.js create mode 100644 remote/test/puppeteer/test/installation/assets/puppeteer/configuration/.puppeteerrc.cjs rename remote/test/puppeteer/{src/constants.ts => test/installation/assets/puppeteer/imports.js} (78%) create mode 100644 remote/test/puppeteer/test/installation/assets/puppeteer/requires.cjs create mode 100644 remote/test/puppeteer/test/installation/assets/puppeteer/webpack/webpack.config.js create mode 100644 remote/test/puppeteer/test/installation/package.json create mode 100644 remote/test/puppeteer/test/installation/src/constants.ts create mode 100644 remote/test/puppeteer/test/installation/src/describeInstallation.ts create mode 100644 remote/test/puppeteer/test/installation/src/puppeteer-configuration.spec.ts create mode 100644 remote/test/puppeteer/test/installation/src/puppeteer-core.spec.ts create mode 100644 remote/test/puppeteer/test/installation/src/puppeteer-firefox.spec.ts create mode 100644 remote/test/puppeteer/test/installation/src/puppeteer-webpack.spec.ts create mode 100644 remote/test/puppeteer/test/installation/src/puppeteer.spec.ts create mode 100644 remote/test/puppeteer/test/installation/src/util.ts create mode 100644 remote/test/puppeteer/test/installation/tsconfig.json create mode 100644 remote/test/puppeteer/test/package.json create mode 100755 remote/test/puppeteer/tools/analyze_issue.mjs create mode 100755 remote/test/puppeteer/tools/assets/verify_issue.ts rename remote/test/puppeteer/{utils/bisect.js => tools/bisect.ts} (86%) rename remote/test/puppeteer/{utils => tools}/check_availability.js (97%) rename remote/test/puppeteer/{scripts => tools}/ensure-pinned-deps.ts (67%) rename remote/test/puppeteer/{utils => tools}/generate-matrix.js (100%) rename remote/test/puppeteer/{utils => tools}/generate_docs.ts (88%) create mode 100644 remote/test/puppeteer/tools/generate_module_package_json.ts rename remote/test/puppeteer/{utils => tools}/get_deprecated_version_range.js (83%) rename remote/test/puppeteer/{utils => tools}/internal/custom_markdown_action.ts (100%) rename remote/test/puppeteer/{utils => tools}/internal/custom_markdown_documenter.ts (96%) rename remote/test/puppeteer/{utils => tools}/internal/job.ts (88%) rename remote/test/puppeteer/{utils => tools}/internal/util.ts (100%) rename remote/test/puppeteer/{utils => tools}/mochaRunner/README.md (89%) rename remote/test/puppeteer/{utils => tools}/mochaRunner/src/interface.ts (97%) rename remote/test/puppeteer/{utils => tools}/mochaRunner/src/main.ts (91%) rename remote/test/puppeteer/{utils => tools}/mochaRunner/src/reporter.ts (100%) rename remote/test/puppeteer/{utils => tools}/mochaRunner/src/test.ts (100%) rename remote/test/puppeteer/{utils => tools}/mochaRunner/src/types.ts (100%) rename remote/test/puppeteer/{utils => tools}/mochaRunner/src/utils.ts (100%) rename remote/test/puppeteer/{utils/testserver => tools/mochaRunner}/tsconfig.json (100%) rename remote/test/puppeteer/{utils => tools}/remove_version_suffix.js (100%) create mode 100644 remote/test/puppeteer/tools/tsconfig.json delete mode 100644 remote/test/puppeteer/tsconfig.json delete mode 100644 remote/test/puppeteer/tsconfig.lib.json delete mode 100644 remote/test/puppeteer/typescript-if-required.js delete mode 100644 remote/test/puppeteer/utils/generate_artifacts.ts delete mode 100644 remote/test/puppeteer/utils/testserver/lib/index.d.ts delete mode 100644 remote/test/puppeteer/utils/testserver/lib/index.d.ts.map delete mode 100644 remote/test/puppeteer/utils/testserver/lib/index.js delete mode 100644 remote/test/puppeteer/utils/testserver/lib/index.js.map delete mode 100644 remote/test/puppeteer/utils/testserver/package.json delete mode 100644 remote/test/puppeteer/utils/tsconfig.json delete mode 100644 remote/test/puppeteer/vendor/README.md delete mode 100644 remote/test/puppeteer/vendor/mitt/README.md delete mode 100644 remote/test/puppeteer/vendor/mitt/dist/mitt.es.js delete mode 100644 remote/test/puppeteer/vendor/mitt/dist/mitt.es.js.map delete mode 100644 remote/test/puppeteer/vendor/mitt/dist/mitt.js delete mode 100644 remote/test/puppeteer/vendor/mitt/dist/mitt.js.map delete mode 100644 remote/test/puppeteer/vendor/mitt/dist/mitt.modern.js delete mode 100644 remote/test/puppeteer/vendor/mitt/dist/mitt.modern.js.map delete mode 100644 remote/test/puppeteer/vendor/mitt/dist/mitt.umd.js delete mode 100644 remote/test/puppeteer/vendor/mitt/dist/mitt.umd.js.map delete mode 100644 remote/test/puppeteer/vendor/mitt/index.d.ts delete mode 100644 remote/test/puppeteer/vendor/mitt/package.json delete mode 100644 remote/test/puppeteer/vendor/mitt/src/index.ts delete mode 100644 remote/test/puppeteer/vendor/tsconfig.cjs.json delete mode 100644 remote/test/puppeteer/vendor/tsconfig.esm.json diff --git a/.hgignore b/.hgignore index acb5b37362df..005a541b6dc0 100644 --- a/.hgignore +++ b/.hgignore @@ -113,18 +113,19 @@ _OPT\.OBJ/ ^remote/test/puppeteer/.*\.tsbuildinfo ^remote/test/puppeteer/\.github ^remote/test/puppeteer/\.husky -^remote/test/puppeteer/\.local-chromium/ -^remote/test/puppeteer/\.local-firefox/ ^remote/test/puppeteer/coverage/ +^remote/test/puppeteer/.devcontainer/ ^remote/test/puppeteer/docker/ +^remote/test/puppeteer/docs/puppeteer-core\.api\.json ^remote/test/puppeteer/docs/puppeteer\.api\.json ^remote/test/puppeteer/experimental/ ^remote/test/puppeteer/lib/ ^remote/test/puppeteer/node_modules/ ^remote/test/puppeteer/package-lock\.json -^remote/test/puppeteer/puppeteer.*\.tgz +^remote/test/puppeteer/packages/ng-schematics/test/build ^remote/test/puppeteer/src/generated ^remote/test/puppeteer/test/build +^remote/test/puppeteer/test/installation/puppeteer.*\.tgz ^remote/test/puppeteer/test/output-firefox ^remote/test/puppeteer/test/output-chromium ^remote/test/puppeteer/testserver/lib/ diff --git a/remote/.gitignore b/remote/.gitignore index 516011818958..cb484e318967 100644 --- a/remote/.gitignore +++ b/remote/.gitignore @@ -1,20 +1,20 @@ +test/puppeteer/**/.wireit test/puppeteer/**/*.tsbuildinfo +test/puppeteer/**/lib test/puppeteer/.github test/puppeteer/.husky -test/puppeteer/.local-chromium/ -test/puppeteer/.local-firefox/ test/puppeteer/coverage/ +test/puppeteer/.devcontainer/ test/puppeteer/docker/ +test/puppeteer/docs/puppeteer-core.api.json test/puppeteer/docs/puppeteer.api.json test/puppeteer/experimental/ -test/puppeteer/lib/ test/puppeteer/node_modules/ test/puppeteer/package-lock.json -test/puppeteer/puppeteer*.tgz +test/puppeteer/packages/ng-schematics/test/build +test/puppeteer/test/installation/puppeteer*.tgz test/puppeteer/src/generated -test/puppeteer/test/build +test/puppeteer/test/**/build test/puppeteer/test/output-firefox test/puppeteer/test/output-chromium -test/puppeteer/testserver/lib/ -test/puppeteer/utils/mochaRunner/lib/ test/puppeteer/website diff --git a/remote/doc/cdp/PuppeteerVendor.md b/remote/doc/cdp/PuppeteerVendor.md index afb12728fa6e..70be044bde2d 100644 --- a/remote/doc/cdp/PuppeteerVendor.md +++ b/remote/doc/cdp/PuppeteerVendor.md @@ -11,7 +11,7 @@ process interspersed with some tips. 1. Clone the Puppeteer git repository and checkout the release tag you want to vendor into mozilla-central. - % git checkout tags/v10.0 -b sync-v10.0 + % git checkout tags/puppeteer-v10.0 -b sync-v10.0 2. Apply any recent changes in `remote/test/puppeteer` to the Puppeteer branch created above. diff --git a/remote/mach_commands.py b/remote/mach_commands.py index 19b97618b911..8d8161116e9b 100644 --- a/remote/mach_commands.py +++ b/remote/mach_commands.py @@ -299,7 +299,20 @@ class MochaOutputHandler(object): None, ) if expected_item_for_file is None: - expected = ["PASS"] + # if there is no expectation data for the file, + # try to find data for all tests. + expected_item_for_all_tests = next( + ( + expectation + for expectation in list(self.expected) + if expectation["testIdPattern"] == "" + ), + None, + ) + if expected_item_for_all_tests is None: + expected = ["PASS"] + else: + expected = expected_item_for_all_tests["expectations"] else: expected = expected_item_for_file["expectations"] else: @@ -392,9 +405,6 @@ class PuppeteerRunner(MozbuildObject): before invoking npm. Overrides default preferences. `enable_webrender`: Boolean to indicate whether to enable WebRender compositor in Gecko. - `subset` - Indicates only a subset of tests are being run, so we should - skip the check for missing results """ setup() @@ -426,18 +436,26 @@ class PuppeteerRunner(MozbuildObject): "--no-coverage", ] env["HEADLESS"] = str(params.get("headless", False)) + test_command = "test:" + product if product == "firefox": env["BINARY"] = binary env["PUPPETEER_PRODUCT"] = "firefox" - env["MOZ_WEBRENDER"] = "%d" % params.get("enable_webrender", False) - - test_command = "test:firefox" - elif env["HEADLESS"] == "False": - test_command = "test:chrome:headful" else: - test_command = "test:chrome:headless" + env["PUPPETEER_CACHE_DIR"] = os.path.join( + self.topobjdir, + "_tests", + "remote", + "test", + "puppeteer", + ".cache", + ) + + if env["HEADLESS"] == "True": + test_command = test_command + ":headless" + else: + test_command = test_command + ":headful" command = ["run", test_command, "--"] + mocha_options @@ -464,14 +482,16 @@ class PuppeteerRunner(MozbuildObject): expected_data = json.load(f) else: expected_data = [] - # Filter expectation data for the selected browser, - # headless or headful mode, and the operating system. + expected_platform = platform.uname().system.lower() if expected_platform == "windows": expected_platform = "win32" + # Filter expectation data for the selected browser, + # headless or headful mode, and the operating system. expectations = filter( lambda el: product in el["parameters"] + and "webDriverBiDi" not in el["parameters"] and ( (env["HEADLESS"] == "False" and "headless" not in el["parameters"]) or "headful" not in el["parameters"] @@ -559,13 +579,6 @@ def create_parser_puppeteer(): "debug level messages with -v, trace messages with -vv," "and to not truncate long trace messages with -vvv", ) - p.add_argument( - "--subset", - action="store_true", - default=False, - help="Indicate that only a subset of the tests are running, " - "so checks for missing tests should be skipped", - ) p.add_argument("tests", nargs="*") mozlog.commandline.add_logging_group(p) return p @@ -597,7 +610,6 @@ def puppeteer_test( verbosity=0, tests=None, product="firefox", - subset=False, **kwargs, ): @@ -656,7 +668,6 @@ def puppeteer_test( "extra_prefs": prefs, "product": product, "extra_launcher_options": options, - "subset": subset, } puppeteer = command_context._spawn(PuppeteerRunner) try: @@ -674,25 +685,31 @@ def install_puppeteer(command_context, product, ci): env = {"HUSKY": "0"} puppeteer_dir = os.path.join("remote", "test", "puppeteer") + puppeteer_dir_full_path = os.path.join(command_context.topsrcdir, puppeteer_dir) + puppeteer_test_dir = os.path.join(puppeteer_dir, "test") - if product != "chrome": + if product == "chrome": + env["PUPPETEER_CACHE_DIR"] = os.path.join( + command_context.topobjdir, "_tests", puppeteer_dir, ".cache" + ) + else: env["PUPPETEER_SKIP_DOWNLOAD"] = "1" if not ci: npm( "run", "clean", - cwd=os.path.join(command_context.topsrcdir, puppeteer_dir), + cwd=puppeteer_dir_full_path, env=env, exit_on_fail=False, ) command = "ci" if ci else "install" - npm(command, cwd=os.path.join(command_context.topsrcdir, puppeteer_dir), env=env) + npm(command, cwd=puppeteer_dir_full_path, env=env) npm( "run", - "build:dev", - cwd=os.path.join(command_context.topsrcdir, puppeteer_dir), + "build", + cwd=os.path.join(command_context.topsrcdir, puppeteer_test_dir), env=env, ) diff --git a/remote/test/puppeteer/.eslintignore b/remote/test/puppeteer/.eslintignore index 2cd9862cd76d..6583d3bd50af 100644 --- a/remote/test/puppeteer/.eslintignore +++ b/remote/test/puppeteer/.eslintignore @@ -8,17 +8,17 @@ lib/ # Generated files **/*.tsbuildinfo -puppeteer.api.json -puppeteer*.tgz +*.api.json +*.tgz yarn.lock .docusaurus/ .cache-loader -.local-chromium/ -.local-firefox/ test/output-*/ .dev_profile* coverage/ -src/generated +generated/ +.eslintcache +/.cache/ # IDE Artifacts .vscode @@ -35,8 +35,10 @@ npm-debug.log* yarn-debug.log* yarn-error.log* +# Wireit +.wireit ## [END] Keep in sync with .gitignore # ESLint ignores. assets/ -vendor/ +third_party/ diff --git a/remote/test/puppeteer/.eslintrc.js b/remote/test/puppeteer/.eslintrc.js index 466d7ebef373..6759911c3ac7 100644 --- a/remote/test/puppeteer/.eslintrc.js +++ b/remote/test/puppeteer/.eslintrc.js @@ -103,7 +103,7 @@ module.exports = { { name: 'mitt', message: - 'Import Mitt from the vendored location: vendor/mitt/src/index.js', + 'Import `mitt` from the vendored location: third_party/mitt/index.js', }, ], }, diff --git a/remote/test/puppeteer/.prettierignore b/remote/test/puppeteer/.prettierignore index 738ed9e55b2c..90dbef6a62e4 100644 --- a/remote/test/puppeteer/.prettierignore +++ b/remote/test/puppeteer/.prettierignore @@ -8,20 +8,21 @@ lib/ # Generated files **/*.tsbuildinfo -puppeteer.api.json -puppeteer*.tgz +*.api.json +*.tgz yarn.lock .docusaurus/ .cache-loader -.local-chromium/ -.local-firefox/ test/output-*/ .dev_profile* coverage/ -src/generated +generated/ +.eslintcache +/.cache/ # IDE Artifacts -.vscode +.vscode/* +!.vscode/extensions.json .devcontainer # Misc @@ -34,14 +35,14 @@ src/generated npm-debug.log* yarn-debug.log* yarn-error.log* + +# Wireit +.wireit ## [END] Keep in sync with .gitignore # Prettier-only ignores. -assets/ CHANGELOG.md package-lock.json -package.json test/assets/ -vendor/ -docs/ +docs/api versioned_*/ diff --git a/remote/test/puppeteer/.prettierrc.cjs b/remote/test/puppeteer/.prettierrc.cjs index f994e8a17902..46c608ced5ae 100644 --- a/remote/test/puppeteer/.prettierrc.cjs +++ b/remote/test/puppeteer/.prettierrc.cjs @@ -1 +1,7 @@ -module.exports = require('gts/.prettierrc.json'); +/** + * @type {import('prettier').Config} + */ +module.exports = { + ...require('gts/.prettierrc.json'), + // proseWrap: 'always', // Uncomment this while working on Markdown documents. MAKE SURE TO COMMENT THIS BEFORE RUNNING CHECKS/FORMATS OR EVERYTHING WILL BE MODIFIED. +}; diff --git a/remote/test/puppeteer/.release-please-manifest.json b/remote/test/puppeteer/.release-please-manifest.json index b3ed9ce44ebb..47f4fb9cac9e 100644 --- a/remote/test/puppeteer/.release-please-manifest.json +++ b/remote/test/puppeteer/.release-please-manifest.json @@ -1,3 +1,6 @@ { - ".": "18.0.0" + "packages/puppeteer": "19.6.0", + "packages/puppeteer-core": "19.6.0", + "packages/testserver": "0.6.0", + "packages/ng-schematics": "0.1.0" } diff --git a/remote/test/puppeteer/README.md b/remote/test/puppeteer/README.md index 77ef5c970122..27c51a901147 100644 --- a/remote/test/puppeteer/README.md +++ b/remote/test/puppeteer/README.md @@ -1,32 +1,35 @@ # Puppeteer - - -[![Build status](https://github.com/puppeteer/puppeteer/workflows/CI/badge.svg)](https://github.com/puppeteer/puppeteer/actions?query=workflow%3ACI) [![npm puppeteer package](https://img.shields.io/npm/v/puppeteer.svg)](https://npmjs.org/package/puppeteer) - - +[![Build status](https://github.com/puppeteer/puppeteer/workflows/CI/badge.svg)](https://github.com/puppeteer/puppeteer/actions?query=workflow%3ACI) +[![npm puppeteer package](https://img.shields.io/npm/v/puppeteer.svg)](https://npmjs.org/package/puppeteer) -###### [API](https://pptr.dev/api) | [FAQ](https://pptr.dev/faq) | [Contributing](https://pptr.dev/contributing) | [Troubleshooting](https://pptr.dev/troubleshooting) +#### [Guides](https://pptr.dev/category/guides) | [API](https://pptr.dev/api) | [FAQ](https://pptr.dev/faq) | [Contributing](https://pptr.dev/contributing) | [Troubleshooting](https://pptr.dev/troubleshooting) -> Puppeteer is a Node library which provides a high-level API to control Chrome or Chromium over the [DevTools Protocol](https://chromedevtools.github.io/devtools-protocol/). Puppeteer runs [headless](https://developers.google.com/web/updates/2017/04/headless-chrome) by default, but can be configured to run full (non-headless) Chrome or Chromium. +> Puppeteer is a Node.js library which provides a high-level API to control +> Chrome/Chromium over the +> [DevTools Protocol](https://chromedevtools.github.io/devtools-protocol/). +> Puppeteer runs in +> [headless](https://developers.google.com/web/updates/2017/04/headless-chrome) +> mode by default, but can be configured to run in full (non-headless) +> Chrome/Chromium. - +#### What can I do? -##### What can I do? - -Most things that you can do manually in the browser can be done using Puppeteer! Here are a few examples to get you started: +Most things that you can do manually in the browser can be done using Puppeteer! +Here are a few examples to get you started: - Generate screenshots and PDFs of pages. -- Crawl a SPA (Single-Page Application) and generate pre-rendered content (i.e. "SSR" (Server-Side Rendering)). +- Crawl a SPA (Single-Page Application) and generate pre-rendered content (i.e. + "SSR" (Server-Side Rendering)). - Automate form submission, UI testing, keyboard input, etc. -- Create an up-to-date, automated testing environment. Run your tests directly in the latest version of Chrome using the latest JavaScript and browser features. -- Capture a [timeline trace](https://developers.google.com/web/tools/chrome-devtools/evaluate-performance/reference) of your site to help diagnose performance issues. +- Create an automated testing environment using the latest JavaScript and + browser features. +- Capture a + [timeline trace](https://developers.google.com/web/tools/chrome-devtools/evaluate-performance/reference) + of your site to help diagnose performance issues. - Test Chrome Extensions. - - - ## Getting Started @@ -36,240 +39,138 @@ To use Puppeteer in your project, run: ```bash npm i puppeteer -# or "yarn add puppeteer" +# or `yarn add puppeteer` +# or `pnpm i puppeteer` ``` -When you install Puppeteer, it downloads a recent version of Chromium (~170MB Mac, ~282MB Linux, ~280MB Win) that is guaranteed to work with the API (customizable through [Environment Variables](#environment-variables)). For a version of Puppeteer purely for connection, see [`puppeteer-core`](#puppeteer-core). +When you install Puppeteer, it automatically downloads a recent version of +Chromium (~170MB macOS, ~282MB Linux, ~280MB Windows) that is +[guaranteed to work](https://pptr.dev/faq#q-why-doesnt-puppeteer-vxxx-work-with-chromium-vyyy) +with Puppeteer. For a version of Puppeteer without installation, see +[`puppeteer-core`](#puppeteer-core). -#### Environment Variables +#### Configuration -Puppeteer looks for certain [environment variables](https://en.wikipedia.org/wiki/Environment_variable) to aid its operations. -If Puppeteer doesn't find them in the environment during the installation step, a lowercased variant of these variables will be used from the [npm config](https://docs.npmjs.com/cli/config). +Puppeteer uses several defaults that can be customized through configuration +files. -- `HTTP_PROXY`, `HTTPS_PROXY`, `NO_PROXY` - defines HTTP proxy settings that are used to download and run the browser. -- `PUPPETEER_SKIP_CHROMIUM_DOWNLOAD` - do not download bundled Chromium during installation step. -- `PUPPETEER_TMP_DIR` - defines the directory to be used by Puppeteer for creating temporary files. Defaults to [`os.tmpdir()`](https://nodejs.org/api/os.html#os_os_tmpdir). -- `PUPPETEER_DOWNLOAD_HOST` - overwrite URL prefix that is used to download Chromium. Note: this includes protocol and might even include path prefix. Defaults to `https://storage.googleapis.com`. -- `PUPPETEER_DOWNLOAD_PATH` - overwrite the path for the downloads folder. Defaults to `/.local-chromium`, where `` is Puppeteer's package root. -- `PUPPETEER_CHROMIUM_REVISION` - specify a certain version of Chromium you'd like Puppeteer to use. See [`puppeteer.launch`](https://pptr.dev/api/puppeteer.puppeteernode.launch) on how executable path is inferred. -- `PUPPETEER_EXECUTABLE_PATH` - specify an executable path to be used in [`puppeteer.launch`](https://pptr.dev/api/puppeteer.puppeteernode.launch). -- `PUPPETEER_PRODUCT` - specify which browser you'd like Puppeteer to use. Must be one of `chrome` or `firefox`. This can also be used during installation to fetch the recommended browser binary. Setting `product` programmatically in [`puppeteer.launch`](https://pptr.dev/api/puppeteer.puppeteernode.launch) supersedes this environment variable. The product is exposed in [`puppeteer.product`](https://pptr.dev/api/puppeteer.product) -- `PUPPETEER_EXPERIMENTAL_CHROMIUM_MAC_ARM` — specify Puppeteer download Chromium for Apple M1. On Apple M1 devices Puppeteer by default downloads the version for Intel's processor which runs via Rosetta. It works without any problems, however, with this option, you should get more efficient resource usage (CPU and RAM) that could lead to a faster execution time. +For example, to change the default cache directory Puppeteer uses to install +browsers, you can add a `.puppeteerrc.cjs` (or `puppeteer.config.cjs`) at the +root of your application with the contents -:::danger +```js +const {join} = require('path'); -Puppeteer is only [guaranteed to work](https://pptr.dev/faq#q-why-doesnt-puppeteer-vxxx-work-with-chromium-vyyy) with the bundled Chromium, use at your own risk. +/** + * @type {import("puppeteer").Configuration} + */ +module.exports = { + // Changes the cache location for Puppeteer. + cacheDirectory: join(__dirname, '.cache', 'puppeteer'), +}; +``` -::: +After adding the configuration file, you will need to remove and reinstall +`puppeteer` for it to take effect. -:::caution +See the [configuration guide](https://pptr.dev/guides/configuration) for more +information. -`PUPPETEER_*` env variables are not accounted for in [`puppeteer-core`](#puppeteer-core). - -::: - -#### puppeteer-core +#### `puppeteer-core` Every release since v1.7.0 we publish two packages: - [`puppeteer`](https://www.npmjs.com/package/puppeteer) - [`puppeteer-core`](https://www.npmjs.com/package/puppeteer-core) -`puppeteer` is a _product_ for browser automation. When installed, it downloads a version of -Chromium, which it then drives using `puppeteer-core`. Being an end-user product, `puppeteer` supports a bunch of convenient `PUPPETEER_*` env variables to tweak its behavior. +`puppeteer` is a _product_ for browser automation. When installed, it downloads +a version of Chromium, which it then drives using `puppeteer-core`. Being an +end-user product, `puppeteer` automates several workflows using reasonable +defaults [that can be customized](https://pptr.dev/guides/configuration). -`puppeteer-core` is a _library_ to help drive anything that supports DevTools protocol. `puppeteer-core` doesn't download Chromium when installed. Being a library, `puppeteer-core` is fully driven -through its programmatic interface and disregards all the `PUPPETEER_*` env variables. +`puppeteer-core` is a _library_ to help drive anything that supports DevTools +protocol. Being a library, `puppeteer-core` is fully driven through its +programmatic interface implying no defaults are assumed and `puppeteer-core` +will not download Chromium when installed. -To sum up, the only differences between `puppeteer-core` and `puppeteer` are: +You should use `puppeteer-core` if you are +[connecting to a remote browser](https://pptr.dev/api/puppeteer.puppeteer.connect) +or [managing browsers yourself](https://pptr.dev/api/puppeteer.browserfetcher). +If you are managing browsers yourself, you will need to call +[`puppeteer.launch`](https://pptr.dev/api/puppeteer.puppeteernode.launch) with +an an explicit +[`executablePath`](https://pptr.dev/api/puppeteer.launchoptions.executablepath) +(or [`channel`](https://pptr.dev/api/puppeteer.launchoptions.channel) if it's +installed in a standard location). -- `puppeteer-core` doesn't automatically download Chromium when installed. -- `puppeteer-core` ignores all `PUPPETEER_*` env variables. - -In most cases, you'll be fine using the `puppeteer` package. - -However, you should use `puppeteer-core` if: - -- you're building another end-user product or library atop of DevTools protocol. For example, one might build a PDF generator using `puppeteer-core` and write a custom `install.js` script that downloads [`headless_shell`](https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md) instead of Chromium to save disk space. -- you're bundling Puppeteer to use in Chrome Extension / browser with the DevTools protocol where downloading an additional Chromium binary is unnecessary. -- you're building a set of tools where `puppeteer-core` is one of the ingredients and you want to postpone `install.js` script execution until Chromium is about to be used. - -When using `puppeteer-core`, remember to change the _include_ line: +When using `puppeteer-core`, remember to change the import: ```ts -const puppeteer = require('puppeteer-core'); +import puppeteer from 'puppeteer-core'; ``` -You will then need to call [`puppeteer.connect`](https://pptr.dev/api/puppeteer.puppeteer.connect) or [`puppeteer.launch`](https://pptr.dev/api/puppeteer.puppeteernode.launch) with an explicit `executablePath` or `channel` option. - ### Usage -Puppeteer follows the latest [maintenance LTS](https://github.com/nodejs/Release#release-schedule) version of Node. +Puppeteer follows the latest +[maintenance LTS](https://github.com/nodejs/Release#release-schedule) version of +Node. -Puppeteer will be familiar to people using other browser testing frameworks. You create an instance -of `Browser`, open pages, and then manipulate them with [Puppeteer's API](https://pptr.dev/api). +Puppeteer will be familiar to people using other browser testing frameworks. You +[launch](https://pptr.dev/api/puppeteer.puppeteernode.launch)/[connect](https://pptr.dev/api/puppeteer.puppeteernode.connect) +a [browser](https://pptr.dev/api/puppeteer.browser), +[create](https://pptr.dev/api/puppeteer.browser.newpage) some +[pages](https://pptr.dev/api/puppeteer.page), and then manipulate them with +[Puppeteer's API](https://pptr.dev/api). -**Example** - navigating to https://example.com and saving a screenshot as _example.png_: +For more in-depth usage, check our [guides](https://pptr.dev/category/guides) +and [examples](https://github.com/puppeteer/puppeteer/tree/main/examples). -Save file as **example.js** +#### Example + +The following example searches [developer.chrome.com](https://developer.chrome.com/) for blog posts with text "automate beyond recorder", click on the first result and print the full title of the blog post. ```ts -const puppeteer = require('puppeteer'); +import puppeteer from 'puppeteer'; (async () => { const browser = await puppeteer.launch(); const page = await browser.newPage(); - await page.goto('https://example.com'); - await page.screenshot({path: 'example.png'}); - await browser.close(); -})(); -``` + await page.goto('https://developer.chrome.com/'); -Execute script on the command line + // Set screen size + await page.setViewport({width: 1080, height: 1024}); -```bash -node example.js -``` + // Type into search box + await page.type('.search-box__input', 'automate beyond recorder'); -Puppeteer sets an initial page size to 800×600px, which defines the screenshot size. The page size can be customized with [`Page.setViewport()`](https://pptr.dev/api/puppeteer.page.setviewport). + // Wait and click on first result + const searchResultSelector = '.search-box__link'; + await page.waitForSelector(searchResultSelector); + await page.click(searchResultSelector); -**Example** - create a PDF. - -Save file as **hn.js** - -```ts -const puppeteer = require('puppeteer'); - -(async () => { - const browser = await puppeteer.launch(); - const page = await browser.newPage(); - await page.goto('https://news.ycombinator.com', { - waitUntil: 'networkidle2', - }); - await page.pdf({path: 'hn.pdf', format: 'a4'}); - - await browser.close(); -})(); -``` - -Execute script on the command line - -```bash -node hn.js -``` - -See [`Page.pdf`](https://pptr.dev/api/puppeteer.page.pdf) for more information about creating pdfs. - -**Example** - evaluate script in the context of the page - -Save file as **get-dimensions.js** - -```ts -const puppeteer = require('puppeteer'); - -(async () => { - const browser = await puppeteer.launch(); - const page = await browser.newPage(); - await page.goto('https://example.com'); - - // Get the "viewport" of the page, as reported by the page. - const dimensions = await page.evaluate(() => { - return { - width: document.documentElement.clientWidth, - height: document.documentElement.clientHeight, - deviceScaleFactor: window.devicePixelRatio, - }; - }); - - console.log('Dimensions:', dimensions); - - await browser.close(); -})(); -``` - -Execute script on the command line - -```bash -node get-dimensions.js -``` - -See [`Page.evaluate`](https://pptr.dev/api/puppeteer.page.evaluate) and related methods like [`Page.evaluateOnNewDocument`](https://pptr.dev/api/puppeteer.page.evaluateOnNewDocument) and [`Page.exposeFunction`](https://pptr.dev/api/puppeteer.page.exposeFunction). - - - -### Running in Docker - -Puppeteer offers a Docker image that includes Chromium along with the required dependencies and a pre-installed Puppeteer version. The image is available via the [GitHub Container Registry](https://github.com/puppeteer/puppeteer/pkgs/container/puppeteer). The latest image is tagged as `latest` and other tags match Puppeteer versions. For example, - -```sh -docker pull ghcr.io/puppeteer/puppeteer:latest # pulls the latest -docker pull ghcr.io/puppeteer/puppeteer:16.1.0 # pulls the image that contains Puppeteer v16.1.0 -``` - -The image is meant for running the browser in the sandbox mode and therefore, running the image requires the `SYS_ADMIN` capability. For example, - -```sh -docker run -i --init --cap-add=SYS_ADMIN --rm ghcr.io/puppeteer/puppeteer:latest node -e "`cat docker/test/smoke-test.js`" -``` - -Replace the path to [`smoke-test.js`](https://raw.githubusercontent.com/puppeteer/puppeteer/main/docker/test/smoke-test.js) with a path to your script. -The script can import or require the `puppeteer` module because it's pre-installed inside the image. - -Currently, the image includes the LTS version of Node.js. If you need to build an image based on a different base image, you can use our [`Dockerfile`](https://github.com/puppeteer/puppeteer/blob/main/docker/Dockerfile) as the starting point. - -### Working with Chrome Extensions - -Puppeteer can be used for testing Chrome Extensions. - -:::caution - -Extensions in Chrome / Chromium currently only work in non-headless mode and experimental Chrome headless mode. - -::: - -The following is code for getting a handle to the [background page](https://developer.chrome.com/extensions/background_pages) of an extension whose source is located in `./my-extension`: - -```ts -const puppeteer = require('puppeteer'); - -(async () => { - const pathToExtension = require('path').join(__dirname, 'my-extension'); - const browser = await puppeteer.launch({ - headless: 'chrome', - args: [ - `--disable-extensions-except=${pathToExtension}`, - `--load-extension=${pathToExtension}`, - ], - }); - const backgroundPageTarget = await browser.waitForTarget( - target => target.type() === 'background_page' + // Localte the full title with a unique string + const textSelector = await page.waitForSelector( + 'text/Customize and automate' ); - const backgroundPage = await backgroundPageTarget.page(); - // Test the background page as you would any other page. + const fullTitle = await textSelector.evaluate(el => el.textContent); + + // Print the full title + console.log('The title of this blog post is "%s".', fullTitle); + await browser.close(); })(); ``` -:::note - -Chrome Manifest V3 extensions have a background ServiceWorker of type 'service_worker', instead of a page of type 'background_page'. - -::: - -:::note - -It is not yet possible to test extension popups or content scripts. - -::: - - - -## Default runtime settings +### Default runtime settings **1. Uses Headless mode** -Puppeteer launches Chromium in [headless mode](https://developers.google.com/web/updates/2017/04/headless-chrome). To launch a full version of Chromium, set the [`headless` option](https://pptr.dev/api/puppeteer.browserlaunchargumentoptions.headless) when launching a browser: +Puppeteer launches Chromium in +[headless mode](https://developers.google.com/web/updates/2017/04/headless-chrome). +To launch a full version of Chromium, set the +[`headless`](https://pptr.dev/api/puppeteer.browserlaunchargumentoptions.headless) +option when launching a browser: ```ts const browser = await puppeteer.launch({headless: false}); // default is true @@ -277,139 +178,51 @@ const browser = await puppeteer.launch({headless: false}); // default is true **2. Runs a bundled version of Chromium** -By default, Puppeteer downloads and uses a specific version of Chromium so its API -is guaranteed to work out of the box. To use Puppeteer with a different version of Chrome or Chromium, -pass in the executable's path when creating a `Browser` instance: +By default, Puppeteer downloads and uses a specific version of Chromium so its +API is guaranteed to work out of the box. To use Puppeteer with a different +version of Chrome or Chromium, pass in the executable's path when creating a +`Browser` instance: ```ts const browser = await puppeteer.launch({executablePath: '/path/to/Chrome'}); ``` -You can also use Puppeteer with Firefox Nightly (experimental support). See [`Puppeteer.launch`](https://pptr.dev/api/puppeteer.puppeteernode.launch) for more information. +You can also use Puppeteer with Firefox Nightly (experimental support). See +[`Puppeteer.launch`](https://pptr.dev/api/puppeteer.puppeteernode.launch) for +more information. -See [`this article`](https://www.howtogeek.com/202825/what%E2%80%99s-the-difference-between-chromium-and-chrome/) for a description of the differences between Chromium and Chrome. [`This article`](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/chromium_browser_vs_google_chrome.md) describes some differences for Linux users. +See +[`this article`](https://www.howtogeek.com/202825/what%E2%80%99s-the-difference-between-chromium-and-chrome/) +for a description of the differences between Chromium and Chrome. +[`This article`](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/chromium_browser_vs_google_chrome.md) +describes some differences for Linux users. **3. Creates a fresh user profile** -Puppeteer creates its own browser user profile which it **cleans up on every run**. +Puppeteer creates its own browser user profile which it **cleans up on every +run**. - +#### Using Docker + +See our [Docker guide](https://pptr.dev/guides/docker). + +#### Using Chrome Extensions + +See our [Chrome extensions guide](https://pptr.dev/guides/chrome-extensions). ## Resources - [API Documentation](https://pptr.dev/api) +- [Guides](https://pptr.dev/category/guides) - [Examples](https://github.com/puppeteer/puppeteer/tree/main/examples) - [Community list of Puppeteer resources](https://github.com/transitive-bullshit/awesome-puppeteer) - - -## Debugging tips - -1. Turn off headless mode - sometimes it's useful to see what the browser is - displaying. Instead of launching in headless mode, launch a full version of - the browser using `headless: false`: - - ```ts - const browser = await puppeteer.launch({headless: false}); - ``` - -2. Slow it down - the `slowMo` option slows down Puppeteer operations by the - specified amount of milliseconds. It's another way to help see what's going on. - - ```ts - const browser = await puppeteer.launch({ - headless: false, - slowMo: 250, // slow down by 250ms - }); - ``` - -3. Capture console output - You can listen for the `console` event. - This is also handy when debugging code in `page.evaluate()`: - - ```ts - page.on('console', msg => console.log('PAGE LOG:', msg.text())); - - await page.evaluate(() => console.log(`url is ${location.href}`)); - ``` - -4. Use debugger in application code browser - - There are two execution context: node.js that is running test code, and the browser - running application code being tested. This lets you debug code in the - application code browser; ie code inside `evaluate()`. - - - Use `{devtools: true}` when launching Puppeteer: - - ```ts - const browser = await puppeteer.launch({devtools: true}); - ``` - - - Change default test timeout: - - jest: `jest.setTimeout(100000);` - - jasmine: `jasmine.DEFAULT_TIMEOUT_INTERVAL = 100000;` - - mocha: `this.timeout(100000);` (don't forget to change test to use [function and not '=>'](https://stackoverflow.com/a/23492442)) - - - Add an evaluate statement with `debugger` inside / add `debugger` to an existing evaluate statement: - - ```ts - await page.evaluate(() => { - debugger; - }); - ``` - - The test will now stop executing in the above evaluate statement, and chromium will stop in debug mode. - -5. Use debugger in node.js - - This will let you debug test code. For example, you can step over `await page.click()` in the node.js script and see the click happen in the application code browser. - - Note that you won't be able to run `await page.click()` in - DevTools console due to this [Chromium bug](https://bugs.chromium.org/p/chromium/issues/detail?id=833928). So if - you want to try something out, you have to add it to your test file. - - - Add `debugger;` to your test, eg: - - ```ts - debugger; - await page.click('a[target=_blank]'); - ``` - - - Set `headless` to `false` - - Run `node --inspect-brk`, eg `node --inspect-brk node_modules/.bin/jest tests` - - In Chrome open `chrome://inspect/#devices` and click `inspect` - - In the newly opened test browser, type `F8` to resume test execution - - Now your `debugger` will be hit and you can debug in the test browser - -6. Enable verbose logging - internal DevTools protocol traffic - will be logged via the [`debug`](https://github.com/visionmedia/debug) module under the `puppeteer` namespace. - - # Basic verbose logging - env DEBUG="puppeteer:*" node script.js - - # Protocol traffic can be rather noisy. This example filters out all Network domain messages - env DEBUG="puppeteer:*" env DEBUG_COLORS=true node script.js 2>&1 | grep -v '"Network' - -7. Debug your Puppeteer (node) code easily, using [ndb](https://github.com/GoogleChromeLabs/ndb) - -- `npm install -g ndb` (or even better, use [npx](https://github.com/zkat/npx)!) - -- add a `debugger` to your Puppeteer (node) code - -- add `ndb` (or `npx ndb`) before your test command. For example: - - `ndb jest` or `ndb mocha` (or `npx ndb jest` / `npx ndb mocha`) - -- debug your test inside chromium like a boss! - - - ## Contributing -Check out our [contributing guide](https://pptr.dev/contributing) to get an overview of Puppeteer development. +Check out our [contributing guide](https://pptr.dev/contributing) to get an +overview of Puppeteer development. ## FAQ -Our [FAQ](https://pptr.dev/faq) has migrated to [our site](https://pptr.dev/faq). +Our [FAQ](https://pptr.dev/faq) has migrated to +[our site](https://pptr.dev/faq). diff --git a/remote/test/puppeteer/SECURITY.md b/remote/test/puppeteer/SECURITY.md new file mode 100644 index 000000000000..a202138d3137 --- /dev/null +++ b/remote/test/puppeteer/SECURITY.md @@ -0,0 +1,7 @@ +# Security Policy + +The Puppeteer project takes security very seriously. Please use Chromium's process to report security issues. + +## Reporting a Vulnerability + +See https://www.chromium.org/Home/chromium-security/reporting-security-bugs/ diff --git a/remote/test/puppeteer/commitlint.config.js b/remote/test/puppeteer/commitlint.config.js index 6f6801b097c2..af86dc9735a5 100644 --- a/remote/test/puppeteer/commitlint.config.js +++ b/remote/test/puppeteer/commitlint.config.js @@ -13,11 +13,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +// See https://github.com/conventional-changelog/commitlint/blob/master/docs/reference-rules.md module.exports = { extends: ['@commitlint/config-conventional'], rules: { - 'body-max-line-length': [0, 'always', 100], - 'footer-max-line-length': [0, 'always', 100], - 'subject-case': [0, 'never'], + // Override. The subject may be the name of a class. + 'subject-case': [0], + // Override. Most UIs wrap the body. + 'body-max-line-length': [0], + // Override. Most UIs wrap the footer. + 'footer-max-line-length': [0], }, }; diff --git a/remote/test/puppeteer/compat/README.md b/remote/test/puppeteer/compat/README.md deleted file mode 100644 index a72ecab4e8a3..000000000000 --- a/remote/test/puppeteer/compat/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Compatibility layer - -This directory provides an additional compatibility layer between ES modules and CommonJS. - -## Why? - -Both `./cjs/compat.ts` and `./esm/compat.ts` are written as ES modules, but `./cjs/compat.ts` can additionally use NodeJS CommonJS globals such as `__dirname` and `require` while these are disabled in ES module mode. For more information, see [Differences between ES modules and CommonJS](https://nodejs.org/api/esm.html#differences-between-es-modules-and-commonjs). - -## Adding exports - -In order to add exports, two things need to be done: - -- The exports must be declared in `src/compat.ts`. -- The exports must be realized in `./cjs/compat.ts` and `./esm/compat.ts`. - -In the event `compat.ts` becomes too large, you can place declarations in another file. Just make sure `./cjs`, `./esm`, and `src` have the same structure. diff --git a/remote/test/puppeteer/compat/cjs/compat.ts b/remote/test/puppeteer/compat/cjs/compat.ts deleted file mode 100644 index 782727e00e9f..000000000000 --- a/remote/test/puppeteer/compat/cjs/compat.ts +++ /dev/null @@ -1,19 +0,0 @@ -import {dirname} from 'path'; - -/** - * @internal - */ -let puppeteerDirname: string; - -try { - // In some environments, like esbuild, this will throw an error. - // We suppress the error since the bundled binary is not expected - // to be used or installed in this case and, therefore, the - // root directory does not have to be known. - puppeteerDirname = dirname(require.resolve('./compat')); -} catch (error) { - // Fallback to __dirname. - puppeteerDirname = __dirname; -} - -export {puppeteerDirname}; diff --git a/remote/test/puppeteer/compat/cjs/tsconfig.json b/remote/test/puppeteer/compat/cjs/tsconfig.json deleted file mode 100644 index 542926884354..000000000000 --- a/remote/test/puppeteer/compat/cjs/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "../../lib/cjs/puppeteer", - "module": "CommonJS" - } -} diff --git a/remote/test/puppeteer/compat/esm/compat.ts b/remote/test/puppeteer/compat/esm/compat.ts deleted file mode 100644 index 8d747658705d..000000000000 --- a/remote/test/puppeteer/compat/esm/compat.ts +++ /dev/null @@ -1,22 +0,0 @@ -import {createRequire} from 'module'; -import {dirname} from 'path'; -import {fileURLToPath} from 'url'; - -const require = createRequire(import.meta.url); - -/** - * @internal - */ -let puppeteerDirname: string; - -try { - // In some environments, like esbuild, this will throw an error. - // We suppress the error since the bundled binary is not expected - // to be used or installed in this case and, therefore, the - // root directory does not have to be known. - puppeteerDirname = dirname(require.resolve('./compat')); -} catch (error) { - puppeteerDirname = dirname(fileURLToPath(import.meta.url)); -} - -export {puppeteerDirname}; diff --git a/remote/test/puppeteer/compat/esm/tsconfig.json b/remote/test/puppeteer/compat/esm/tsconfig.json deleted file mode 100644 index 5afe459a0500..000000000000 --- a/remote/test/puppeteer/compat/esm/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "../../lib/esm/puppeteer", - "module": "esnext" - } -} diff --git a/remote/test/puppeteer/docs/puppeteer-core.api.json b/remote/test/puppeteer/docs/puppeteer-core.api.json new file mode 100644 index 000000000000..6807888fa4a4 --- /dev/null +++ b/remote/test/puppeteer/docs/puppeteer-core.api.json @@ -0,0 +1,31369 @@ +{ + "metadata": { + "toolPackage": "@microsoft/api-extractor", + "toolVersion": "7.33.7", + "schemaVersion": 1010, + "oldestForwardsCompatibleVersion": 1001, + "tsdocConfig": { + "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", + "noStandardTags": true, + "tagDefinitions": [ + { + "tagName": "@alpha", + "syntaxKind": "modifier" + }, + { + "tagName": "@beta", + "syntaxKind": "modifier" + }, + { + "tagName": "@defaultValue", + "syntaxKind": "block" + }, + { + "tagName": "@decorator", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@deprecated", + "syntaxKind": "block" + }, + { + "tagName": "@eventProperty", + "syntaxKind": "modifier" + }, + { + "tagName": "@example", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@experimental", + "syntaxKind": "modifier" + }, + { + "tagName": "@inheritDoc", + "syntaxKind": "inline" + }, + { + "tagName": "@internal", + "syntaxKind": "modifier" + }, + { + "tagName": "@label", + "syntaxKind": "inline" + }, + { + "tagName": "@link", + "syntaxKind": "inline", + "allowMultiple": true + }, + { + "tagName": "@override", + "syntaxKind": "modifier" + }, + { + "tagName": "@packageDocumentation", + "syntaxKind": "modifier" + }, + { + "tagName": "@param", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@privateRemarks", + "syntaxKind": "block" + }, + { + "tagName": "@public", + "syntaxKind": "modifier" + }, + { + "tagName": "@readonly", + "syntaxKind": "modifier" + }, + { + "tagName": "@remarks", + "syntaxKind": "block" + }, + { + "tagName": "@returns", + "syntaxKind": "block" + }, + { + "tagName": "@sealed", + "syntaxKind": "modifier" + }, + { + "tagName": "@see", + "syntaxKind": "block" + }, + { + "tagName": "@throws", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@typeParam", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@virtual", + "syntaxKind": "modifier" + }, + { + "tagName": "@betaDocumentation", + "syntaxKind": "modifier" + }, + { + "tagName": "@internalRemarks", + "syntaxKind": "block" + }, + { + "tagName": "@preapproved", + "syntaxKind": "modifier" + } + ], + "supportForTags": { + "@alpha": true, + "@beta": true, + "@defaultValue": true, + "@decorator": true, + "@deprecated": true, + "@eventProperty": true, + "@example": true, + "@experimental": true, + "@inheritDoc": true, + "@internal": true, + "@label": true, + "@link": true, + "@override": true, + "@packageDocumentation": true, + "@param": true, + "@privateRemarks": true, + "@public": true, + "@readonly": true, + "@remarks": true, + "@returns": true, + "@sealed": true, + "@see": true, + "@throws": true, + "@typeParam": true, + "@virtual": true, + "@betaDocumentation": true, + "@internalRemarks": true, + "@preapproved": true + }, + "reportUnsupportedHtmlElements": false + } + }, + "kind": "Package", + "canonicalReference": "puppeteer-core!", + "docComment": "", + "name": "puppeteer-core", + "preserveMemberOrder": false, + "members": [ + { + "kind": "EntryPoint", + "canonicalReference": "puppeteer-core!", + "name": "", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Class", + "canonicalReference": "puppeteer-core!Accessibility:class", + "docComment": "/**\n * The Accessibility class provides methods for inspecting Chromium's accessibility tree. The accessibility tree is used by assistive technology such as {@link https://en.wikipedia.org/wiki/Screen_reader | screen readers} or {@link https://en.wikipedia.org/wiki/Switch_access | switches}.\n *\n * @remarks\n *\n * Accessibility is a very platform-specific thing. On different platforms, there are different screen readers that might have wildly different output.\n *\n * Blink - Chrome's rendering engine - has a concept of \"accessibility tree\", which is then translated into different platform-specific APIs. Accessibility namespace gives users access to the Blink Accessibility Tree.\n *\n * Most of the accessibility tree gets filtered out when converting from Blink AX Tree to Platform-specific AX-Tree or by assistive technologies themselves. By default, Puppeteer tries to approximate this filtering, exposing only the \"interesting\" nodes of the tree.\n *\n * The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `Accessibility` class.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class Accessibility " + } + ], + "fileUrlPath": "src/common/Accessibility.ts", + "releaseTag": "Public", + "name": "Accessibility", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Method", + "canonicalReference": "puppeteer-core!Accessibility#snapshot:member(1)", + "docComment": "/**\n * Captures the current state of the accessibility tree. The returned object represents the root accessible node of the page.\n *\n * @remarks\n *\n * **NOTE** The Chromium accessibility tree contains nodes that go unused on most platforms and by most screen readers. Puppeteer will discard them as well for an easier to process tree, unless `interestingOnly` is set to `false`.\n *\n * @returns An AXNode object representing the snapshot.\n *\n * @example\n *\n * An example of dumping the entire accessibility tree:\n * ```ts\n * const snapshot = await page.accessibility.snapshot();\n * console.log(snapshot);\n * ```\n *\n * @example\n *\n * An example of logging the focused node's name:\n * ```ts\n * const snapshot = await page.accessibility.snapshot();\n * const node = findFocusedNode(snapshot);\n * console.log(node && node.name);\n *\n * function findFocusedNode(node) {\n * if (node.focused) return node;\n * for (const child of node.children || []) {\n * const foundNode = findFocusedNode(child);\n * return foundNode;\n * }\n * return null;\n * }\n * ```\n *\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "snapshot(options?: " + }, + { + "kind": "Reference", + "text": "SnapshotOptions", + "canonicalReference": "puppeteer-core!SnapshotOptions:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "SerializedAXNode", + "canonicalReference": "puppeteer-core!SerializedAXNode:interface" + }, + { + "kind": "Content", + "text": " | null>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "options", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": true + } + ], + "isOptional": false, + "name": "snapshot" + } + ], + "implementsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "puppeteer-core!ActionResult:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type ActionResult = " + }, + { + "kind": "Content", + "text": "'continue' | 'abort' | 'respond'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "src/common/HTTPRequest.ts", + "releaseTag": "Public", + "name": "ActionResult", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "puppeteer-core!Awaitable:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type Awaitable = " + }, + { + "kind": "Content", + "text": "T | " + }, + { + "kind": "Reference", + "text": "PromiseLike", + "canonicalReference": "!PromiseLike:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "src/common/types.ts", + "releaseTag": "Public", + "name": "Awaitable", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Interface", + "canonicalReference": "puppeteer-core!BoundingBox:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface BoundingBox extends " + }, + { + "kind": "Reference", + "text": "Point", + "canonicalReference": "puppeteer-core!Point:interface" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/common/JSHandle.ts", + "releaseTag": "Public", + "name": "BoundingBox", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!BoundingBox#height:member", + "docComment": "/**\n * the height of the element in pixels.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "height: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "height", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!BoundingBox#width:member", + "docComment": "/**\n * the width of the element in pixels.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "width: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "width", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [ + { + "startIndex": 1, + "endIndex": 2 + } + ] + }, + { + "kind": "Interface", + "canonicalReference": "puppeteer-core!BoxModel:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface BoxModel " + } + ], + "fileUrlPath": "src/common/JSHandle.ts", + "releaseTag": "Public", + "name": "BoxModel", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!BoxModel#border:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "border: " + }, + { + "kind": "Reference", + "text": "Point", + "canonicalReference": "puppeteer-core!Point:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "border", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!BoxModel#content:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "content: " + }, + { + "kind": "Reference", + "text": "Point", + "canonicalReference": "puppeteer-core!Point:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "content", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!BoxModel#height:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "height: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "height", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!BoxModel#margin:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "margin: " + }, + { + "kind": "Reference", + "text": "Point", + "canonicalReference": "puppeteer-core!Point:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "margin", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!BoxModel#padding:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "padding: " + }, + { + "kind": "Reference", + "text": "Point", + "canonicalReference": "puppeteer-core!Point:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "padding", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!BoxModel#width:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "width: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "width", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "puppeteer-core!Browser:class", + "docComment": "/**\n * A Browser is created when Puppeteer connects to a Chromium instance, either through {@link PuppeteerNode.launch} or {@link Puppeteer.connect}.\n *\n * @remarks\n *\n * The Browser class extends from Puppeteer's {@link EventEmitter} class and will emit various events which are documented in the {@link BrowserEmittedEvents} enum.\n *\n * The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `Browser` class.\n *\n * @example\n *\n * An example of using a {@link Browser} to create a {@link Page}:\n * ```ts\n * import puppeteer from 'puppeteer';\n *\n * (async () => {\n * const browser = await puppeteer.launch();\n * const page = await browser.newPage();\n * await page.goto('https://example.com');\n * await browser.close();\n * })();\n * ```\n *\n * @example\n *\n * An example of disconnecting from and reconnecting to a {@link Browser}:\n * ```ts\n * import puppeteer from 'puppeteer';\n *\n * (async () => {\n * const browser = await puppeteer.launch();\n * // Store the endpoint to be able to reconnect to Chromium\n * const browserWSEndpoint = browser.wsEndpoint();\n * // Disconnect puppeteer from Chromium\n * browser.disconnect();\n *\n * // Use the endpoint to reestablish a connection\n * const browser2 = await puppeteer.connect({browserWSEndpoint});\n * // Close Chromium\n * await browser2.close();\n * })();\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class Browser extends " + }, + { + "kind": "Reference", + "text": "EventEmitter", + "canonicalReference": "puppeteer-core!EventEmitter:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/api/Browser.ts", + "releaseTag": "Public", + "name": "Browser", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Method", + "canonicalReference": "puppeteer-core!Browser#browserContexts:member(1)", + "docComment": "/**\n * Returns an array of all open browser contexts. In a newly created browser, this will return a single instance of {@link BrowserContext}.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "browserContexts(): " + }, + { + "kind": "Reference", + "text": "BrowserContext", + "canonicalReference": "puppeteer-core!BrowserContext:class" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "name": "browserContexts" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!Browser#close:member(1)", + "docComment": "/**\n * Closes Chromium and all of its pages (if any were opened). The {@link Browser} object itself is considered to be disposed and cannot be used anymore.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "close(): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "name": "close" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!Browser#createIncognitoBrowserContext:member(1)", + "docComment": "/**\n * Creates a new incognito browser context. This won't share cookies/cache with other browser contexts.\n *\n * @example\n * ```ts\n * (async () => {\n * const browser = await puppeteer.launch();\n * // Create a new incognito browser context.\n * const context = await browser.createIncognitoBrowserContext();\n * // Create a new page in a pristine context.\n * const page = await context.newPage();\n * // Do stuff\n * await page.goto('https://example.com');\n * })();\n * ```\n *\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "createIncognitoBrowserContext(options?: " + }, + { + "kind": "Reference", + "text": "BrowserContextOptions", + "canonicalReference": "puppeteer-core!BrowserContextOptions:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "BrowserContext", + "canonicalReference": "puppeteer-core!BrowserContext:class" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "options", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": true + } + ], + "isOptional": false, + "name": "createIncognitoBrowserContext" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!Browser#defaultBrowserContext:member(1)", + "docComment": "/**\n * Returns the default browser context. The default browser context cannot be closed.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "defaultBrowserContext(): " + }, + { + "kind": "Reference", + "text": "BrowserContext", + "canonicalReference": "puppeteer-core!BrowserContext:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "name": "defaultBrowserContext" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!Browser#disconnect:member(1)", + "docComment": "/**\n * Disconnects Puppeteer from the browser, but leaves the Chromium process running. After calling `disconnect`, the {@link Browser} object is considered disposed and cannot be used anymore.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "disconnect(): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "name": "disconnect" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!Browser#isConnected:member(1)", + "docComment": "/**\n * Indicates that the browser is connected.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "isConnected(): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "name": "isConnected" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!Browser#newPage:member(1)", + "docComment": "/**\n * Promise which resolves to a new {@link Page} object. The Page is created in a default browser context.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "newPage(): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Page", + "canonicalReference": "puppeteer-core!Page:class" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "name": "newPage" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!Browser#pages:member(1)", + "docComment": "/**\n * An array of all open pages inside the Browser.\n *\n * @remarks\n *\n * In case of multiple browser contexts, returns an array with all the pages in all browser contexts. Non-visible pages, such as `\"background_page\"`, will not be listed here. You can find them using {@link Target.page}.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "pages(): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Page", + "canonicalReference": "puppeteer-core!Page:class" + }, + { + "kind": "Content", + "text": "[]>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "name": "pages" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!Browser#process:member(1)", + "docComment": "/**\n * The spawned browser process. Returns `null` if the browser instance was created with {@link Puppeteer.connect}.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "process(): " + }, + { + "kind": "Reference", + "text": "ChildProcess", + "canonicalReference": "!\"\\\"child_process\\\"\".ChildProcess:class" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "name": "process" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!Browser#target:member(1)", + "docComment": "/**\n * The target associated with the browser.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "target(): " + }, + { + "kind": "Reference", + "text": "Target", + "canonicalReference": "puppeteer-core!Target:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "name": "target" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!Browser#targets:member(1)", + "docComment": "/**\n * All active targets inside the Browser. In case of multiple browser contexts, returns an array with all the targets in all browser contexts.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "targets(): " + }, + { + "kind": "Reference", + "text": "Target", + "canonicalReference": "puppeteer-core!Target:class" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "name": "targets" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!Browser#userAgent:member(1)", + "docComment": "/**\n * The browser's original user agent. Pages can override the browser user agent with {@link Page.setUserAgent}.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "userAgent(): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "name": "userAgent" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!Browser#version:member(1)", + "docComment": "/**\n * A string representing the browser name and version.\n *\n * @remarks\n *\n * For headless Chromium, this is similar to `HeadlessChrome/61.0.3153.0`. For non-headless, this is similar to `Chrome/61.0.3153.0`.\n *\n * The format of browser.version() might change with future releases of Chromium.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "version(): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "name": "version" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!Browser#waitForTarget:member(1)", + "docComment": "/**\n * Searches for a target in all browser contexts.\n *\n * @param predicate - A function to be run for every target.\n *\n * @returns The first target found that matches the `predicate` function.\n *\n * @example\n *\n * An example of finding a target for a page opened via `window.open`:\n * ```ts\n * await page.evaluate(() => window.open('https://www.example.com/'));\n * const newWindowTarget = await browser.waitForTarget(\n * target => target.url() === 'https://www.example.com/'\n * );\n * ```\n *\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "waitForTarget(predicate: " + }, + { + "kind": "Content", + "text": "(x: " + }, + { + "kind": "Reference", + "text": "Target", + "canonicalReference": "puppeteer-core!Target:class" + }, + { + "kind": "Content", + "text": ") => boolean | " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ", options?: " + }, + { + "kind": "Reference", + "text": "WaitForTargetOptions", + "canonicalReference": "puppeteer-core!WaitForTargetOptions:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Target", + "canonicalReference": "puppeteer-core!Target:class" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 13 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "predicate", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "options", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": true + } + ], + "isOptional": false, + "name": "waitForTarget" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!Browser#wsEndpoint:member(1)", + "docComment": "/**\n * The browser websocket endpoint which can be used as an argument to {@link Puppeteer.connect}.\n *\n * @remarks\n *\n * The format is `ws://${host}:${port}/devtools/browser/`.\n *\n * You can find the `webSocketDebuggerUrl` from `http://${host}:${port}/json/version`. Learn more about the {@link https://chromedevtools.github.io/devtools-protocol | devtools protocol} and the {@link https://chromedevtools.github.io/devtools-protocol/#how-do-i-access-the-browser-target | browser endpoint}.\n *\n * @returns The Browser websocket url.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "wsEndpoint(): " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "name": "wsEndpoint" + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "puppeteer-core!BrowserConnectOptions:interface", + "docComment": "/**\n * Generic browser options that can be passed when launching any browser or when connecting to an existing browser instance.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface BrowserConnectOptions " + } + ], + "fileUrlPath": "src/common/BrowserConnector.ts", + "releaseTag": "Public", + "name": "BrowserConnectOptions", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!BrowserConnectOptions#defaultViewport:member", + "docComment": "/**\n * Sets the viewport for each page.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "defaultViewport?: " + }, + { + "kind": "Reference", + "text": "Viewport", + "canonicalReference": "puppeteer-core!Viewport:interface" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "defaultViewport", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!BrowserConnectOptions#ignoreHTTPSErrors:member", + "docComment": "/**\n * Whether to ignore HTTPS errors during navigation.\n *\n * @defaultValue\n *\n * false\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "ignoreHTTPSErrors?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "ignoreHTTPSErrors", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!BrowserConnectOptions#slowMo:member", + "docComment": "/**\n * Slows down Puppeteer operations by the specified amount of milliseconds to aid debugging.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "slowMo?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "slowMo", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!BrowserConnectOptions#targetFilter:member", + "docComment": "/**\n * Callback to decide if Puppeteer should connect to a given target or not.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "targetFilter?: " + }, + { + "kind": "Reference", + "text": "TargetFilterCallback", + "canonicalReference": "puppeteer-core!TargetFilterCallback:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "targetFilter", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "puppeteer-core!BrowserContext:class", + "docComment": "/**\n * BrowserContexts provide a way to operate multiple independent browser sessions. When a browser is launched, it has a single BrowserContext used by default. The method {@link Browser.newPage | Browser.newPage} creates a page in the default browser context.\n *\n * @remarks\n *\n * The Browser class extends from Puppeteer's {@link EventEmitter} class and will emit various events which are documented in the {@link BrowserContextEmittedEvents} enum.\n *\n * If a page opens another page, e.g. with a `window.open` call, the popup will belong to the parent page's browser context.\n *\n * Puppeteer allows creation of \"incognito\" browser contexts with {@link Browser.createIncognitoBrowserContext | Browser.createIncognitoBrowserContext} method. \"Incognito\" browser contexts don't write any browsing data to disk.\n *\n * The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `BrowserContext` class.\n *\n * @example\n * ```ts\n * // Create a new incognito browser context\n * const context = await browser.createIncognitoBrowserContext();\n * // Create a new page inside context.\n * const page = await context.newPage();\n * // ... do stuff with page ...\n * await page.goto('https://example.com');\n * // Dispose context once it's no longer needed.\n * await context.close();\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class BrowserContext extends " + }, + { + "kind": "Reference", + "text": "EventEmitter", + "canonicalReference": "puppeteer-core!EventEmitter:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/api/BrowserContext.ts", + "releaseTag": "Public", + "name": "BrowserContext", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Method", + "canonicalReference": "puppeteer-core!BrowserContext#browser:member(1)", + "docComment": "/**\n * The browser this browser context belongs to.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "browser(): " + }, + { + "kind": "Reference", + "text": "Browser", + "canonicalReference": "puppeteer-core!Browser:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "name": "browser" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!BrowserContext#clearPermissionOverrides:member(1)", + "docComment": "/**\n * Clears all permission overrides for the browser context.\n *\n * @example\n * ```ts\n * const context = browser.defaultBrowserContext();\n * context.overridePermissions('https://example.com', ['clipboard-read']);\n * // do stuff ..\n * context.clearPermissionOverrides();\n * ```\n *\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "clearPermissionOverrides(): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "name": "clearPermissionOverrides" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!BrowserContext#close:member(1)", + "docComment": "/**\n * Closes the browser context. All the targets that belong to the browser context will be closed.\n *\n * @remarks\n *\n * Only incognito browser contexts can be closed.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "close(): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "name": "close" + }, + { + "kind": "Property", + "canonicalReference": "puppeteer-core!BrowserContext#id:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "get id(): " + }, + { + "kind": "Content", + "text": "string | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "id", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!BrowserContext#isIncognito:member(1)", + "docComment": "/**\n * Returns whether BrowserContext is incognito. The default browser context is the only non-incognito browser context.\n *\n * @remarks\n *\n * The default browser context cannot be closed.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "isIncognito(): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "name": "isIncognito" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!BrowserContext#newPage:member(1)", + "docComment": "/**\n * Creates a new page in the browser context.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "newPage(): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Page", + "canonicalReference": "puppeteer-core!Page:class" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "name": "newPage" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!BrowserContext#overridePermissions:member(1)", + "docComment": "/**\n * @param origin - The origin to grant permissions to, e.g. \"https://example.com\".\n *\n * @param permissions - An array of permissions to grant. All permissions that are not listed here will be automatically denied.\n *\n * @example\n * ```ts\n * const context = browser.defaultBrowserContext();\n * await context.overridePermissions('https://html5demos.com', [\n * 'geolocation',\n * ]);\n * ```\n *\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "overridePermissions(origin: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", permissions: " + }, + { + "kind": "Reference", + "text": "Permission", + "canonicalReference": "puppeteer-core!Permission:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 6, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "origin", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "permissions", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "isOptional": false + } + ], + "isOptional": false, + "name": "overridePermissions" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!BrowserContext#pages:member(1)", + "docComment": "/**\n * An array of all pages inside the browser context.\n *\n * @returns Promise which resolves to an array of all open pages. Non visible pages, such as `\"background_page\"`, will not be listed here. You can find them using {@link Target.page | the target page}.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "pages(): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Page", + "canonicalReference": "puppeteer-core!Page:class" + }, + { + "kind": "Content", + "text": "[]>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "name": "pages" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!BrowserContext#targets:member(1)", + "docComment": "/**\n * An array of all active targets inside the browser context.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "targets(): " + }, + { + "kind": "Reference", + "text": "Target", + "canonicalReference": "puppeteer-core!Target:class" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "name": "targets" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!BrowserContext#waitForTarget:member(1)", + "docComment": "/**\n * This searches for a target in this specific browser context.\n *\n * @param predicate - A function to be run for every target\n *\n * @param options - An object of options. Accepts a timeout, which is the maximum wait time in milliseconds. Pass `0` to disable the timeout. Defaults to 30 seconds.\n *\n * @returns Promise which resolves to the first target found that matches the `predicate` function.\n *\n * @example\n *\n * An example of finding a target for a page opened via `window.open`:\n * ```ts\n * await page.evaluate(() => window.open('https://www.example.com/'));\n * const newWindowTarget = await browserContext.waitForTarget(\n * target => target.url() === 'https://www.example.com/'\n * );\n * ```\n *\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "waitForTarget(predicate: " + }, + { + "kind": "Content", + "text": "(x: " + }, + { + "kind": "Reference", + "text": "Target", + "canonicalReference": "puppeteer-core!Target:class" + }, + { + "kind": "Content", + "text": ") => boolean | " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ", options?: " + }, + { + "kind": "Content", + "text": "{\n timeout?: number;\n }" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Target", + "canonicalReference": "puppeteer-core!Target:class" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 13 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "predicate", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "options", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": true + } + ], + "isOptional": false, + "name": "waitForTarget" + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Enum", + "canonicalReference": "puppeteer-core!BrowserContextEmittedEvents:enum", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare const enum BrowserContextEmittedEvents " + } + ], + "fileUrlPath": "src/api/Browser.ts", + "releaseTag": "Public", + "name": "BrowserContextEmittedEvents", + "preserveMemberOrder": false, + "members": [ + { + "kind": "EnumMember", + "canonicalReference": "puppeteer-core!BrowserContextEmittedEvents.TargetChanged:member", + "docComment": "/**\n * Emitted when the url of a target inside the browser context changes. Contains a {@link Target} instance.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "TargetChanged = " + }, + { + "kind": "Content", + "text": "\"targetchanged\"" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "TargetChanged" + }, + { + "kind": "EnumMember", + "canonicalReference": "puppeteer-core!BrowserContextEmittedEvents.TargetCreated:member", + "docComment": "/**\n * Emitted when a target is created within the browser context, for example when a new page is opened by {@link https://developer.mozilla.org/en-US/docs/Web/API/Window/open | window.open} or by {@link BrowserContext.newPage | browserContext.newPage}\n *\n * Contains a {@link Target} instance.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "TargetCreated = " + }, + { + "kind": "Content", + "text": "\"targetcreated\"" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "TargetCreated" + }, + { + "kind": "EnumMember", + "canonicalReference": "puppeteer-core!BrowserContextEmittedEvents.TargetDestroyed:member", + "docComment": "/**\n * Emitted when a target is destroyed within the browser context, for example when a page is closed. Contains a {@link Target} instance.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "TargetDestroyed = " + }, + { + "kind": "Content", + "text": "\"targetdestroyed\"" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "TargetDestroyed" + } + ] + }, + { + "kind": "Interface", + "canonicalReference": "puppeteer-core!BrowserContextOptions:interface", + "docComment": "/**\n * BrowserContext options.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface BrowserContextOptions " + } + ], + "fileUrlPath": "src/api/Browser.ts", + "releaseTag": "Public", + "name": "BrowserContextOptions", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!BrowserContextOptions#proxyBypassList:member", + "docComment": "/**\n * Bypass the proxy for the given list of hosts.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "proxyBypassList?: " + }, + { + "kind": "Content", + "text": "string[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "proxyBypassList", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!BrowserContextOptions#proxyServer:member", + "docComment": "/**\n * Proxy server with optional port to use for all requests. Username and password can be set in `Page.authenticate`.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "proxyServer?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "proxyServer", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Enum", + "canonicalReference": "puppeteer-core!BrowserEmittedEvents:enum", + "docComment": "/**\n * All the events a {@link Browser | browser instance} may emit.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare const enum BrowserEmittedEvents " + } + ], + "fileUrlPath": "src/api/Browser.ts", + "releaseTag": "Public", + "name": "BrowserEmittedEvents", + "preserveMemberOrder": false, + "members": [ + { + "kind": "EnumMember", + "canonicalReference": "puppeteer-core!BrowserEmittedEvents.Disconnected:member", + "docComment": "/**\n * Emitted when Puppeteer gets disconnected from the Chromium instance. This might happen because of one of the following:\n *\n * - Chromium is closed or crashed\n *\n * - The {@link Browser.disconnect | browser.disconnect} method was called.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "Disconnected = " + }, + { + "kind": "Content", + "text": "\"disconnected\"" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "Disconnected" + }, + { + "kind": "EnumMember", + "canonicalReference": "puppeteer-core!BrowserEmittedEvents.TargetChanged:member", + "docComment": "/**\n * Emitted when the url of a target changes. Contains a {@link Target} instance.\n *\n * @remarks\n *\n * Note that this includes target changes in incognito browser contexts.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "TargetChanged = " + }, + { + "kind": "Content", + "text": "\"targetchanged\"" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "TargetChanged" + }, + { + "kind": "EnumMember", + "canonicalReference": "puppeteer-core!BrowserEmittedEvents.TargetCreated:member", + "docComment": "/**\n * Emitted when a target is created, for example when a new page is opened by {@link https://developer.mozilla.org/en-US/docs/Web/API/Window/open | window.open} or by {@link Browser.newPage | browser.newPage}\n *\n * Contains a {@link Target} instance.\n *\n * @remarks\n *\n * Note that this includes target creations in incognito browser contexts.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "TargetCreated = " + }, + { + "kind": "Content", + "text": "\"targetcreated\"" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "TargetCreated" + }, + { + "kind": "EnumMember", + "canonicalReference": "puppeteer-core!BrowserEmittedEvents.TargetDestroyed:member", + "docComment": "/**\n * Emitted when a target is destroyed, for example when a page is closed. Contains a {@link Target} instance.\n *\n * @remarks\n *\n * Note that this includes target destructions in incognito browser contexts.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "TargetDestroyed = " + }, + { + "kind": "Content", + "text": "\"targetdestroyed\"" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "TargetDestroyed" + } + ] + }, + { + "kind": "Class", + "canonicalReference": "puppeteer-core!BrowserFetcher:class", + "docComment": "/**\n * BrowserFetcher can download and manage different versions of Chromium and Firefox.\n *\n * @remarks\n *\n * BrowserFetcher is not designed to work concurrently with other instances of BrowserFetcher that share the same downloads directory.\n *\n * @example\n *\n * An example of using BrowserFetcher to download a specific version of Chromium and running Puppeteer against it:\n * ```ts\n * const browserFetcher = new BrowserFetcher({path: 'path/to/download/folder'});\n * const revisionInfo = await browserFetcher.download('533271');\n * const browser = await puppeteer.launch({\n * executablePath: revisionInfo.executablePath,\n * });\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class BrowserFetcher " + } + ], + "fileUrlPath": "src/node/BrowserFetcher.ts", + "releaseTag": "Public", + "name": "BrowserFetcher", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "puppeteer-core!BrowserFetcher:constructor(1)", + "docComment": "/**\n * Constructs a browser fetcher for the given options.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(options: " + }, + { + "kind": "Reference", + "text": "BrowserFetcherOptions", + "canonicalReference": "puppeteer-core!BrowserFetcherOptions:interface" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "options", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ] + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!BrowserFetcher#canDownload:member(1)", + "docComment": "/**\n * Initiates a HEAD request to check if the revision is available.\n *\n * @remarks\n *\n * This method is affected by the current `product`.\n *\n * @param revision - The revision to check availability for.\n *\n * @returns A promise that resolves to `true` if the revision could be downloaded from the host.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "canDownload(revision: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "revision", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "name": "canDownload" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!BrowserFetcher#download:member(1)", + "docComment": "/**\n * Initiates a GET request to download the revision from the host.\n *\n * @remarks\n *\n * This method is affected by the current `product`.\n *\n * @param revision - The revision to download.\n *\n * @param progressCallback - A function that will be called with two arguments: How many bytes have been downloaded and the total number of bytes of the download.\n *\n * @returns A promise with revision information when the revision is downloaded and extracted.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "download(revision: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", progressCallback?: " + }, + { + "kind": "Content", + "text": "(x: number, y: number) => void" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "BrowserFetcherRevisionInfo", + "canonicalReference": "puppeteer-core!BrowserFetcherRevisionInfo:interface" + }, + { + "kind": "Content", + "text": " | undefined>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 9 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "revision", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "progressCallback", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + } + ], + "isOptional": false, + "name": "download" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!BrowserFetcher#host:member(1)", + "docComment": "/**\n * @returns The download host being used.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "host(): " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "name": "host" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!BrowserFetcher#localRevisions:member(1)", + "docComment": "/**\n * @remarks\n *\n * This method is affected by the current `product`.\n *\n * @returns A list of all revision strings (for the current `product`) available locally on disk.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "localRevisions(): " + }, + { + "kind": "Content", + "text": "string[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "name": "localRevisions" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!BrowserFetcher#platform:member(1)", + "docComment": "/**\n * @returns Returns the current `Platform`, which is one of `mac`, `linux`, `win32` or `win64`.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "platform(): " + }, + { + "kind": "Reference", + "text": "Platform", + "canonicalReference": "puppeteer-core!Platform:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "name": "platform" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!BrowserFetcher#product:member(1)", + "docComment": "/**\n * @returns Returns the current `Product`, which is one of `chrome` or `firefox`.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "product(): " + }, + { + "kind": "Reference", + "text": "Product", + "canonicalReference": "puppeteer-core!Product:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "name": "product" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!BrowserFetcher#remove:member(1)", + "docComment": "/**\n * @remarks\n *\n * This method is affected by the current `product`.\n *\n * @param revision - A revision to remove for the current `product`.\n *\n * @returns A promise that resolves when the revision has been removes or throws if the revision has not been downloaded.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "remove(revision: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "revision", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "name": "remove" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!BrowserFetcher#revisionInfo:member(1)", + "docComment": "/**\n * @param revision - The revision to get info for.\n *\n * @returns The revision info for the given revision.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "revisionInfo(revision: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "BrowserFetcherRevisionInfo", + "canonicalReference": "puppeteer-core!BrowserFetcherRevisionInfo:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "revision", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "name": "revisionInfo" + } + ], + "implementsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "puppeteer-core!BrowserFetcherOptions:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface BrowserFetcherOptions " + } + ], + "fileUrlPath": "src/node/BrowserFetcher.ts", + "releaseTag": "Public", + "name": "BrowserFetcherOptions", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!BrowserFetcherOptions#host:member", + "docComment": "/**\n * Determines the host that will be used for downloading.\n *\n * @defaultValue\n *\n * Either\n *\n * - https://storage.googleapis.com or - https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "host?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "host", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!BrowserFetcherOptions#path:member", + "docComment": "/**\n * Determines the path to download browsers to.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "path: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "path", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!BrowserFetcherOptions#platform:member", + "docComment": "/**\n * Determines which platform the browser will be suited for.\n *\n * @defaultValue\n *\n * Auto-detected.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "platform?: " + }, + { + "kind": "Reference", + "text": "Platform", + "canonicalReference": "puppeteer-core!Platform:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "platform", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!BrowserFetcherOptions#product:member", + "docComment": "/**\n * Determines which product the {@link BrowserFetcher} is for.\n *\n * @defaultValue\n *\n * `\"chrome\"`.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "product?: " + }, + { + "kind": "Content", + "text": "'chrome' | 'firefox'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "product", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!BrowserFetcherOptions#useMacOSARMBinary:member", + "docComment": "/**\n * Enables the use of the Chromium binary for macOS ARM.\n *\n * @experimental\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "useMacOSARMBinary?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "useMacOSARMBinary", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "puppeteer-core!BrowserFetcherRevisionInfo:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface BrowserFetcherRevisionInfo " + } + ], + "fileUrlPath": "src/node/BrowserFetcher.ts", + "releaseTag": "Public", + "name": "BrowserFetcherRevisionInfo", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!BrowserFetcherRevisionInfo#executablePath:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "executablePath: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "executablePath", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!BrowserFetcherRevisionInfo#folderPath:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "folderPath: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "folderPath", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!BrowserFetcherRevisionInfo#local:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "local: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "local", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!BrowserFetcherRevisionInfo#product:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "product: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "product", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!BrowserFetcherRevisionInfo#revision:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "revision: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "revision", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!BrowserFetcherRevisionInfo#url:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "url: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "url", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "puppeteer-core!BrowserLaunchArgumentOptions:interface", + "docComment": "/**\n * Launcher options that only apply to Chrome.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface BrowserLaunchArgumentOptions " + } + ], + "fileUrlPath": "src/node/LaunchOptions.ts", + "releaseTag": "Public", + "name": "BrowserLaunchArgumentOptions", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!BrowserLaunchArgumentOptions#args:member", + "docComment": "/**\n * Additional command line arguments to pass to the browser instance.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "args?: " + }, + { + "kind": "Content", + "text": "string[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "args", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!BrowserLaunchArgumentOptions#debuggingPort:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "debuggingPort?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "debuggingPort", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!BrowserLaunchArgumentOptions#devtools:member", + "docComment": "/**\n * Whether to auto-open a DevTools panel for each tab. If this is set to `true`, then `headless` will be forced to `false`.\n *\n * @defaultValue\n *\n * `false`\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "devtools?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "devtools", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!BrowserLaunchArgumentOptions#headless:member", + "docComment": "/**\n * Whether to run the browser in headless mode.\n *\n * @defaultValue\n *\n * true\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "headless?: " + }, + { + "kind": "Content", + "text": "boolean | 'new'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "headless", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!BrowserLaunchArgumentOptions#userDataDir:member", + "docComment": "/**\n * Path to a user data directory. {@link https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/user_data_dir.md | see the Chromium docs} for more info.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "userDataDir?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "userDataDir", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "puppeteer-core!CDPSession:class", + "docComment": "/**\n * The `CDPSession` instances are used to talk raw Chrome Devtools Protocol.\n *\n * @remarks\n *\n * Protocol methods can be called with {@link CDPSession.send} method and protocol events can be subscribed to with `CDPSession.on` method.\n *\n * Useful links: {@link https://chromedevtools.github.io/devtools-protocol/ | DevTools Protocol Viewer} and {@link https://github.com/aslushnikov/getting-started-with-cdp/blob/HEAD/README.md | Getting Started with DevTools Protocol}.\n *\n * The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `CDPSession` class.\n *\n * @example\n * ```ts\n * const client = await page.target().createCDPSession();\n * await client.send('Animation.enable');\n * client.on('Animation.animationCreated', () =>\n * console.log('Animation created!')\n * );\n * const response = await client.send('Animation.getPlaybackRate');\n * console.log('playback rate is ' + response.playbackRate);\n * await client.send('Animation.setPlaybackRate', {\n * playbackRate: response.playbackRate / 2,\n * });\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class CDPSession extends " + }, + { + "kind": "Reference", + "text": "EventEmitter", + "canonicalReference": "puppeteer-core!EventEmitter:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/common/Connection.ts", + "releaseTag": "Public", + "name": "CDPSession", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Method", + "canonicalReference": "puppeteer-core!CDPSession#connection:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "connection(): " + }, + { + "kind": "Reference", + "text": "Connection", + "canonicalReference": "puppeteer-core!Connection:class" + }, + { + "kind": "Content", + "text": " | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "name": "connection" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!CDPSession#detach:member(1)", + "docComment": "/**\n * Detaches the cdpSession from the target. Once detached, the cdpSession object won't emit any events and can't be used to send messages.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "detach(): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "name": "detach" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!CDPSession#id:member(1)", + "docComment": "/**\n * Returns the session's id.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "id(): " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "name": "id" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!CDPSession#send:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "send(method: " + }, + { + "kind": "Content", + "text": "T" + }, + { + "kind": "Content", + "text": ", ...paramArgs: " + }, + { + "kind": "Reference", + "text": "ProtocolMapping.Commands", + "canonicalReference": "devtools-protocol!ProtocolMapping.Commands:interface" + }, + { + "kind": "Content", + "text": "[T]['paramsType']" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "ProtocolMapping.Commands", + "canonicalReference": "devtools-protocol!ProtocolMapping.Commands:interface" + }, + { + "kind": "Content", + "text": "[T]['returnType']>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 13 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "method", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "paramArgs", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 8 + }, + "isOptional": false + } + ], + "isOptional": false, + "name": "send" + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "puppeteer-core!CDPSessionOnMessageObject:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface CDPSessionOnMessageObject " + } + ], + "fileUrlPath": "src/common/Connection.ts", + "releaseTag": "Public", + "name": "CDPSessionOnMessageObject", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!CDPSessionOnMessageObject#error:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "error: " + }, + { + "kind": "Content", + "text": "{\n message: string;\n data: any;\n code: number;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "error", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!CDPSessionOnMessageObject#id:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "id?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "id", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!CDPSessionOnMessageObject#method:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "method: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "method", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!CDPSessionOnMessageObject#params:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "params: " + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "params", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!CDPSessionOnMessageObject#result:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "result?: " + }, + { + "kind": "Content", + "text": "any" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "result", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "puppeteer-core!ChromeReleaseChannel:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type ChromeReleaseChannel = " + }, + { + "kind": "Content", + "text": "'chrome' | 'chrome-beta' | 'chrome-canary' | 'chrome-dev'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "src/node/LaunchOptions.ts", + "releaseTag": "Public", + "name": "ChromeReleaseChannel", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "Function", + "canonicalReference": "puppeteer-core!clearCustomQueryHandlers:function(1)", + "docComment": "/**\n * @deprecated\n *\n * Import {@link Puppeteer} and use the static method {@link Puppeteer.clearCustomQueryHandlers}\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function clearCustomQueryHandlers(): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "src/common/QueryHandler.ts", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "clearCustomQueryHandlers" + }, + { + "kind": "Interface", + "canonicalReference": "puppeteer-core!ClickOptions:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface ClickOptions " + } + ], + "fileUrlPath": "src/common/JSHandle.ts", + "releaseTag": "Public", + "name": "ClickOptions", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!ClickOptions#button:member", + "docComment": "/**\n * @defaultValue\n *\n * 'left'\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "button?: " + }, + { + "kind": "Reference", + "text": "MouseButton", + "canonicalReference": "puppeteer-core!MouseButton:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "button", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!ClickOptions#clickCount:member", + "docComment": "/**\n * @defaultValue\n *\n * 1\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "clickCount?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "clickCount", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!ClickOptions#delay:member", + "docComment": "/**\n * Time to wait between `mousedown` and `mouseup` in milliseconds.\n *\n * @defaultValue\n *\n * 0\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "delay?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "delay", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!ClickOptions#offset:member", + "docComment": "/**\n * Offset for the clickable point relative to the top-left corner of the border box.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "offset?: " + }, + { + "kind": "Reference", + "text": "Offset", + "canonicalReference": "puppeteer-core!Offset:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "offset", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "puppeteer-core!CommonEventEmitter:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface CommonEventEmitter " + } + ], + "fileUrlPath": "src/common/EventEmitter.ts", + "releaseTag": "Public", + "name": "CommonEventEmitter", + "preserveMemberOrder": false, + "members": [ + { + "kind": "MethodSignature", + "canonicalReference": "puppeteer-core!CommonEventEmitter#addListener:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "addListener(event: " + }, + { + "kind": "Reference", + "text": "EventType", + "canonicalReference": "puppeteer-core!EventType:type" + }, + { + "kind": "Content", + "text": ", handler: " + }, + { + "kind": "Reference", + "text": "Handler", + "canonicalReference": "puppeteer-core!Handler:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "CommonEventEmitter", + "canonicalReference": "puppeteer-core!CommonEventEmitter:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "event", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "name": "addListener" + }, + { + "kind": "MethodSignature", + "canonicalReference": "puppeteer-core!CommonEventEmitter#emit:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "emit(event: " + }, + { + "kind": "Reference", + "text": "EventType", + "canonicalReference": "puppeteer-core!EventType:type" + }, + { + "kind": "Content", + "text": ", eventData?: " + }, + { + "kind": "Content", + "text": "unknown" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "event", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "eventData", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + } + ], + "name": "emit" + }, + { + "kind": "MethodSignature", + "canonicalReference": "puppeteer-core!CommonEventEmitter#listenerCount:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "listenerCount(event: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "event", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "listenerCount" + }, + { + "kind": "MethodSignature", + "canonicalReference": "puppeteer-core!CommonEventEmitter#off:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "off(event: " + }, + { + "kind": "Reference", + "text": "EventType", + "canonicalReference": "puppeteer-core!EventType:type" + }, + { + "kind": "Content", + "text": ", handler: " + }, + { + "kind": "Reference", + "text": "Handler", + "canonicalReference": "puppeteer-core!Handler:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "CommonEventEmitter", + "canonicalReference": "puppeteer-core!CommonEventEmitter:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "event", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "name": "off" + }, + { + "kind": "MethodSignature", + "canonicalReference": "puppeteer-core!CommonEventEmitter#on:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "on(event: " + }, + { + "kind": "Reference", + "text": "EventType", + "canonicalReference": "puppeteer-core!EventType:type" + }, + { + "kind": "Content", + "text": ", handler: " + }, + { + "kind": "Reference", + "text": "Handler", + "canonicalReference": "puppeteer-core!Handler:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "CommonEventEmitter", + "canonicalReference": "puppeteer-core!CommonEventEmitter:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "event", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "name": "on" + }, + { + "kind": "MethodSignature", + "canonicalReference": "puppeteer-core!CommonEventEmitter#once:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "once(event: " + }, + { + "kind": "Reference", + "text": "EventType", + "canonicalReference": "puppeteer-core!EventType:type" + }, + { + "kind": "Content", + "text": ", handler: " + }, + { + "kind": "Reference", + "text": "Handler", + "canonicalReference": "puppeteer-core!Handler:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "CommonEventEmitter", + "canonicalReference": "puppeteer-core!CommonEventEmitter:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "event", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "name": "once" + }, + { + "kind": "MethodSignature", + "canonicalReference": "puppeteer-core!CommonEventEmitter#removeAllListeners:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "removeAllListeners(event?: " + }, + { + "kind": "Reference", + "text": "EventType", + "canonicalReference": "puppeteer-core!EventType:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "CommonEventEmitter", + "canonicalReference": "puppeteer-core!CommonEventEmitter:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "event", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": true + } + ], + "name": "removeAllListeners" + }, + { + "kind": "MethodSignature", + "canonicalReference": "puppeteer-core!CommonEventEmitter#removeListener:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "removeListener(event: " + }, + { + "kind": "Reference", + "text": "EventType", + "canonicalReference": "puppeteer-core!EventType:type" + }, + { + "kind": "Content", + "text": ", handler: " + }, + { + "kind": "Reference", + "text": "Handler", + "canonicalReference": "puppeteer-core!Handler:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "CommonEventEmitter", + "canonicalReference": "puppeteer-core!CommonEventEmitter:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "event", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "name": "removeListener" + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "puppeteer-core!Configuration:interface", + "docComment": "/**\n * Defines options to configure Puppeteer's behavior during installation and runtime.\n *\n * See individual properties for more information.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface Configuration " + } + ], + "fileUrlPath": "src/common/Configuration.ts", + "releaseTag": "Public", + "name": "Configuration", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!Configuration#browserRevision:member", + "docComment": "/**\n * Specifies a certain version of the browser you'd like Puppeteer to use.\n *\n * Can be overridden by `PUPPETEER_BROWSER_REVISION`.\n *\n * See {@link PuppeteerNode.launch | puppeteer.launch} on how executable path is inferred.\n *\n * @defaultValue\n *\n * A compatible-revision of the browser.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "browserRevision?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "browserRevision", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!Configuration#cacheDirectory:member", + "docComment": "/**\n * Defines the directory to be used by Puppeteer for caching.\n *\n * Can be overridden by `PUPPETEER_CACHE_DIR`.\n *\n * @defaultValue\n *\n * `path.join(os.homedir(), '.cache', 'puppeteer')`\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "cacheDirectory?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "cacheDirectory", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!Configuration#defaultProduct:member", + "docComment": "/**\n * Specifies which browser you'd like Puppeteer to use.\n *\n * Can be overridden by `PUPPETEER_PRODUCT`.\n *\n * @defaultValue\n *\n * `'chrome'`\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "defaultProduct?: " + }, + { + "kind": "Reference", + "text": "Product", + "canonicalReference": "puppeteer-core!Product:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "defaultProduct", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!Configuration#downloadHost:member", + "docComment": "/**\n * Specifies the URL prefix that is used to download Chromium.\n *\n * Can be overridden by `PUPPETEER_DOWNLOAD_HOST`.\n *\n * @remarks\n *\n * This must include the protocol and may even need a path prefix.\n *\n * @defaultValue\n *\n * Either https://storage.googleapis.com or https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central, depending on the product.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "downloadHost?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "downloadHost", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!Configuration#downloadPath:member", + "docComment": "/**\n * Specifies the path for the downloads folder.\n *\n * Can be overridden by `PUPPETEER_DOWNLOAD_PATH`.\n *\n * @defaultValue\n *\n * `/` where `` is Puppeteer's cache directory and `` is the name of the browser.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "downloadPath?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "downloadPath", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!Configuration#executablePath:member", + "docComment": "/**\n * Specifies an executable path to be used in {@link PuppeteerNode.launch | puppeteer.launch}.\n *\n * Can be overridden by `PUPPETEER_EXECUTABLE_PATH`.\n *\n * @defaultValue\n *\n * Auto-computed.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "executablePath?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "executablePath", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!Configuration#experiments:member", + "docComment": "/**\n * Defines experimental options for Puppeteer.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "experiments?: " + }, + { + "kind": "Reference", + "text": "ExperimentsConfiguration", + "canonicalReference": "puppeteer-core!ExperimentsConfiguration:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "experiments", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!Configuration#logLevel:member", + "docComment": "/**\n * Tells Puppeteer to log at the given level.\n *\n * At the moment, any option silences logging.\n *\n * @defaultValue\n *\n * `undefined`\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "logLevel?: " + }, + { + "kind": "Content", + "text": "'silent' | 'error' | 'warn'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "logLevel", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!Configuration#skipDownload:member", + "docComment": "/**\n * Tells Puppeteer to not download during installation.\n *\n * Can be overridden by `PUPPETEER_SKIP_DOWNLOAD`.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "skipDownload?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "skipDownload", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!Configuration#temporaryDirectory:member", + "docComment": "/**\n * Defines the directory to be used by Puppeteer for creating temporary files.\n *\n * Can be overridden by `PUPPETEER_TMP_DIR`.\n *\n * @defaultValue\n *\n * `os.tmpdir()`\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "temporaryDirectory?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "temporaryDirectory", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Variable", + "canonicalReference": "puppeteer-core!connect:var", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "connect: " + }, + { + "kind": "Content", + "text": "(options: import(\"./common/Puppeteer.js\")." + }, + { + "kind": "Reference", + "text": "ConnectOptions", + "canonicalReference": "puppeteer-core!ConnectOptions:interface" + }, + { + "kind": "Content", + "text": ") => " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + } + ], + "fileUrlPath": "src/puppeteer-core.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "connect", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 8 + } + }, + { + "kind": "Class", + "canonicalReference": "puppeteer-core!Connection:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class Connection extends " + }, + { + "kind": "Reference", + "text": "EventEmitter", + "canonicalReference": "puppeteer-core!EventEmitter:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/common/Connection.ts", + "releaseTag": "Public", + "name": "Connection", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "puppeteer-core!Connection:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `Connection` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(url: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", transport: " + }, + { + "kind": "Reference", + "text": "ConnectionTransport", + "canonicalReference": "puppeteer-core!ConnectionTransport:interface" + }, + { + "kind": "Content", + "text": ", delay?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "url", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "transport", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "delay", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": true + } + ] + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!Connection#createSession:member(1)", + "docComment": "/**\n * @param targetInfo - The target info\n *\n * @returns The CDP session that is created\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "createSession(targetInfo: " + }, + { + "kind": "Reference", + "text": "Protocol.Target.TargetInfo", + "canonicalReference": "devtools-protocol!Protocol.Target.TargetInfo:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "CDPSession", + "canonicalReference": "puppeteer-core!CDPSession:class" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "targetInfo", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "name": "createSession" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!Connection#dispose:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "dispose(): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "name": "dispose" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!Connection.fromSession:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static fromSession(session: " + }, + { + "kind": "Reference", + "text": "CDPSession", + "canonicalReference": "puppeteer-core!CDPSession:class" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Connection", + "canonicalReference": "puppeteer-core!Connection:class" + }, + { + "kind": "Content", + "text": " | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "session", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "name": "fromSession" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!Connection#send:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "send(method: " + }, + { + "kind": "Content", + "text": "T" + }, + { + "kind": "Content", + "text": ", ...paramArgs: " + }, + { + "kind": "Reference", + "text": "ProtocolMapping.Commands", + "canonicalReference": "devtools-protocol!ProtocolMapping.Commands:interface" + }, + { + "kind": "Content", + "text": "[T]['paramsType']" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "ProtocolMapping.Commands", + "canonicalReference": "devtools-protocol!ProtocolMapping.Commands:interface" + }, + { + "kind": "Content", + "text": "[T]['returnType']>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 13 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "method", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "paramArgs", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 8 + }, + "isOptional": false + } + ], + "isOptional": false, + "name": "send" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!Connection#session:member(1)", + "docComment": "/**\n * @param sessionId - The session id\n *\n * @returns The current CDP session if it exists\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "session(sessionId: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "CDPSession", + "canonicalReference": "puppeteer-core!CDPSession:class" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "sessionId", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "name": "session" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!Connection#url:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "url(): " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "name": "url" + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "puppeteer-core!ConnectionCallback:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface ConnectionCallback " + } + ], + "fileUrlPath": "src/common/Connection.ts", + "releaseTag": "Public", + "name": "ConnectionCallback", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!ConnectionCallback#error:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "error: " + }, + { + "kind": "Reference", + "text": "ProtocolError", + "canonicalReference": "puppeteer-core!ProtocolError:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "error", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!ConnectionCallback#method:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "method: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "method", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "MethodSignature", + "canonicalReference": "puppeteer-core!ConnectionCallback#reject:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "reject(args: " + }, + { + "kind": "Content", + "text": "unknown" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "args", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "reject" + }, + { + "kind": "MethodSignature", + "canonicalReference": "puppeteer-core!ConnectionCallback#resolve:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "resolve(args: " + }, + { + "kind": "Content", + "text": "unknown" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "args", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "resolve" + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "puppeteer-core!ConnectionTransport:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface ConnectionTransport " + } + ], + "fileUrlPath": "src/common/ConnectionTransport.ts", + "releaseTag": "Public", + "name": "ConnectionTransport", + "preserveMemberOrder": false, + "members": [ + { + "kind": "MethodSignature", + "canonicalReference": "puppeteer-core!ConnectionTransport#close:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "close(): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "close" + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!ConnectionTransport#onclose:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onclose?: " + }, + { + "kind": "Content", + "text": "() => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onclose", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!ConnectionTransport#onmessage:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onmessage?: " + }, + { + "kind": "Content", + "text": "(message: string) => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onmessage", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "MethodSignature", + "canonicalReference": "puppeteer-core!ConnectionTransport#send:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "send(message: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "message", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "send" + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "puppeteer-core!ConnectOptions:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface ConnectOptions extends " + }, + { + "kind": "Reference", + "text": "BrowserConnectOptions", + "canonicalReference": "puppeteer-core!BrowserConnectOptions:interface" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/common/Puppeteer.ts", + "releaseTag": "Public", + "name": "ConnectOptions", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!ConnectOptions#browserURL:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "browserURL?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "browserURL", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!ConnectOptions#browserWSEndpoint:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "browserWSEndpoint?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "browserWSEndpoint", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!ConnectOptions#headers:member", + "docComment": "/**\n * Headers to use for the web socket connection.\n *\n * @remarks\n *\n * Only works in the Node.js environment.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "headers?: " + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "headers", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!ConnectOptions#transport:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "transport?: " + }, + { + "kind": "Reference", + "text": "ConnectionTransport", + "canonicalReference": "puppeteer-core!ConnectionTransport:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "transport", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [ + { + "startIndex": 1, + "endIndex": 2 + } + ] + }, + { + "kind": "Class", + "canonicalReference": "puppeteer-core!ConsoleMessage:class", + "docComment": "/**\n * ConsoleMessage objects are dispatched by page via the 'console' event.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class ConsoleMessage " + } + ], + "fileUrlPath": "src/common/ConsoleMessage.ts", + "releaseTag": "Public", + "name": "ConsoleMessage", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "puppeteer-core!ConsoleMessage:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `ConsoleMessage` class\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(type: " + }, + { + "kind": "Reference", + "text": "ConsoleMessageType", + "canonicalReference": "puppeteer-core!ConsoleMessageType:type" + }, + { + "kind": "Content", + "text": ", text: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", args: " + }, + { + "kind": "Reference", + "text": "JSHandle", + "canonicalReference": "puppeteer-core!JSHandle:class" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ", stackTraceLocations: " + }, + { + "kind": "Reference", + "text": "ConsoleMessageLocation", + "canonicalReference": "puppeteer-core!ConsoleMessageLocation:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "type", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "text", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "args", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "isOptional": false + }, + { + "parameterName": "stackTraceLocations", + "parameterTypeTokenRange": { + "startIndex": 8, + "endIndex": 10 + }, + "isOptional": false + } + ] + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!ConsoleMessage#args:member(1)", + "docComment": "/**\n * @returns An array of arguments passed to the console.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "args(): " + }, + { + "kind": "Reference", + "text": "JSHandle", + "canonicalReference": "puppeteer-core!JSHandle:class" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "name": "args" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!ConsoleMessage#location:member(1)", + "docComment": "/**\n * @returns The location of the console message.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "location(): " + }, + { + "kind": "Reference", + "text": "ConsoleMessageLocation", + "canonicalReference": "puppeteer-core!ConsoleMessageLocation:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "name": "location" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!ConsoleMessage#stackTrace:member(1)", + "docComment": "/**\n * @returns The array of locations on the stack of the console message.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "stackTrace(): " + }, + { + "kind": "Reference", + "text": "ConsoleMessageLocation", + "canonicalReference": "puppeteer-core!ConsoleMessageLocation:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "name": "stackTrace" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!ConsoleMessage#text:member(1)", + "docComment": "/**\n * @returns The text of the console message.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "text(): " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "name": "text" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!ConsoleMessage#type:member(1)", + "docComment": "/**\n * @returns The type of the console message.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "type(): " + }, + { + "kind": "Reference", + "text": "ConsoleMessageType", + "canonicalReference": "puppeteer-core!ConsoleMessageType:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "name": "type" + } + ], + "implementsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "puppeteer-core!ConsoleMessageLocation:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface ConsoleMessageLocation " + } + ], + "fileUrlPath": "src/common/ConsoleMessage.ts", + "releaseTag": "Public", + "name": "ConsoleMessageLocation", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!ConsoleMessageLocation#columnNumber:member", + "docComment": "/**\n * 0-based column number in the resource if known or `undefined` otherwise.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "columnNumber?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "columnNumber", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!ConsoleMessageLocation#lineNumber:member", + "docComment": "/**\n * 0-based line number in the resource if known or `undefined` otherwise.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "lineNumber?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "lineNumber", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!ConsoleMessageLocation#url:member", + "docComment": "/**\n * URL of the resource if known or `undefined` otherwise.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "url?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "url", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "puppeteer-core!ConsoleMessageType:type", + "docComment": "/**\n * The supported types for console messages.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type ConsoleMessageType = " + }, + { + "kind": "Content", + "text": "'log' | 'debug' | 'info' | 'error' | 'warning' | 'dir' | 'dirxml' | 'table' | 'trace' | 'clear' | 'startGroup' | 'startGroupCollapsed' | 'endGroup' | 'assert' | 'profile' | 'profileEnd' | 'count' | 'timeEnd' | 'verbose'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "src/common/ConsoleMessage.ts", + "releaseTag": "Public", + "name": "ConsoleMessageType", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "Interface", + "canonicalReference": "puppeteer-core!ContinueRequestOverrides:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface ContinueRequestOverrides " + } + ], + "fileUrlPath": "src/common/HTTPRequest.ts", + "releaseTag": "Public", + "name": "ContinueRequestOverrides", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!ContinueRequestOverrides#headers:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "headers?: " + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "headers", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!ContinueRequestOverrides#method:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "method?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "method", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!ContinueRequestOverrides#postData:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "postData?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "postData", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!ContinueRequestOverrides#url:member", + "docComment": "/**\n * If set, the request URL will change. This is not a redirect.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "url?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "url", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "puppeteer-core!Coverage:class", + "docComment": "/**\n * The Coverage class provides methods to gathers information about parts of JavaScript and CSS that were used by the page.\n *\n * @remarks\n *\n * To output coverage in a form consumable by {@link https://github.com/istanbuljs | Istanbul}, see {@link https://github.com/istanbuljs/puppeteer-to-istanbul | puppeteer-to-istanbul}.\n *\n * @example\n *\n * An example of using JavaScript and CSS coverage to get percentage of initially executed code:\n * ```ts\n * // Enable both JavaScript and CSS coverage\n * await Promise.all([\n * page.coverage.startJSCoverage(),\n * page.coverage.startCSSCoverage(),\n * ]);\n * // Navigate to page\n * await page.goto('https://example.com');\n * // Disable both JavaScript and CSS coverage\n * const [jsCoverage, cssCoverage] = await Promise.all([\n * page.coverage.stopJSCoverage(),\n * page.coverage.stopCSSCoverage(),\n * ]);\n * let totalBytes = 0;\n * let usedBytes = 0;\n * const coverage = [...jsCoverage, ...cssCoverage];\n * for (const entry of coverage) {\n * totalBytes += entry.text.length;\n * for (const range of entry.ranges) usedBytes += range.end - range.start - 1;\n * }\n * console.log(`Bytes used: ${(usedBytes / totalBytes) * 100}%`);\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class Coverage " + } + ], + "fileUrlPath": "src/common/Coverage.ts", + "releaseTag": "Public", + "name": "Coverage", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "puppeteer-core!Coverage:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `Coverage` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(client: " + }, + { + "kind": "Reference", + "text": "CDPSession", + "canonicalReference": "puppeteer-core!CDPSession:class" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "client", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ] + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!Coverage#startCSSCoverage:member(1)", + "docComment": "/**\n * @param options - Set of configurable options for coverage, defaults to `resetOnNavigation : true`\n *\n * @returns Promise that resolves when coverage is started.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "startCSSCoverage(options?: " + }, + { + "kind": "Reference", + "text": "CSSCoverageOptions", + "canonicalReference": "puppeteer-core!CSSCoverageOptions:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "options", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": true + } + ], + "isOptional": false, + "name": "startCSSCoverage" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!Coverage#startJSCoverage:member(1)", + "docComment": "/**\n * @remarks\n *\n * Anonymous scripts are ones that don't have an associated url. These are scripts that are dynamically created on the page using `eval` or `new Function`. If `reportAnonymousScripts` is set to `true`, anonymous scripts URL will start with `debugger://VM` (unless a magic //# sourceURL comment is present, in which case that will the be URL).\n *\n * @param options - Set of configurable options for coverage defaults to `resetOnNavigation : true, reportAnonymousScripts : false,` `includeRawScriptCoverage : false, useBlockCoverage : true`\n *\n * @returns Promise that resolves when coverage is started.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "startJSCoverage(options?: " + }, + { + "kind": "Reference", + "text": "JSCoverageOptions", + "canonicalReference": "puppeteer-core!JSCoverageOptions:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "options", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": true + } + ], + "isOptional": false, + "name": "startJSCoverage" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!Coverage#stopCSSCoverage:member(1)", + "docComment": "/**\n * @remarks\n *\n * CSS Coverage doesn't include dynamically injected style tags without sourceURLs.\n *\n * @returns Promise that resolves to the array of coverage reports for all stylesheets.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "stopCSSCoverage(): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "CoverageEntry", + "canonicalReference": "puppeteer-core!CoverageEntry:interface" + }, + { + "kind": "Content", + "text": "[]>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "name": "stopCSSCoverage" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!Coverage#stopJSCoverage:member(1)", + "docComment": "/**\n * @remarks\n *\n * JavaScript Coverage doesn't include anonymous scripts by default. However, scripts with sourceURLs are reported.\n *\n * @returns Promise that resolves to the array of coverage reports for all scripts.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "stopJSCoverage(): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "JSCoverageEntry", + "canonicalReference": "puppeteer-core!JSCoverageEntry:interface" + }, + { + "kind": "Content", + "text": "[]>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "name": "stopJSCoverage" + } + ], + "implementsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "puppeteer-core!CoverageEntry:interface", + "docComment": "/**\n * The CoverageEntry class represents one entry of the coverage report.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface CoverageEntry " + } + ], + "fileUrlPath": "src/common/Coverage.ts", + "releaseTag": "Public", + "name": "CoverageEntry", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!CoverageEntry#ranges:member", + "docComment": "/**\n * The covered range as start and end positions.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "ranges: " + }, + { + "kind": "Reference", + "text": "Array", + "canonicalReference": "!Array:interface" + }, + { + "kind": "Content", + "text": "<{\n start: number;\n end: number;\n }>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "ranges", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!CoverageEntry#text:member", + "docComment": "/**\n * The content of the style sheet or script.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "text: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "text", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!CoverageEntry#url:member", + "docComment": "/**\n * The URL of the style sheet or script.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "url: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "url", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Variable", + "canonicalReference": "puppeteer-core!createBrowserFetcher:var", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "createBrowserFetcher: " + }, + { + "kind": "Content", + "text": "(options?: " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": ") => import(\"./node/BrowserFetcher.js\")." + }, + { + "kind": "Reference", + "text": "BrowserFetcher", + "canonicalReference": "puppeteer-core!BrowserFetcher:class" + } + ], + "fileUrlPath": "src/puppeteer-core.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "createBrowserFetcher", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 7 + } + }, + { + "kind": "Interface", + "canonicalReference": "puppeteer-core!Credentials:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface Credentials " + } + ], + "fileUrlPath": "src/common/NetworkManager.ts", + "releaseTag": "Public", + "name": "Credentials", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!Credentials#password:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "password: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "password", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!Credentials#username:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "username: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "username", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "puppeteer-core!CSSCoverage:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class CSSCoverage " + } + ], + "fileUrlPath": "src/common/Coverage.ts", + "releaseTag": "Public", + "name": "CSSCoverage", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "puppeteer-core!CSSCoverage:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `CSSCoverage` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(client: " + }, + { + "kind": "Reference", + "text": "CDPSession", + "canonicalReference": "puppeteer-core!CDPSession:class" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "client", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ] + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!CSSCoverage#start:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "start(options?: " + }, + { + "kind": "Content", + "text": "{\n resetOnNavigation?: boolean;\n }" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "options", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": true + } + ], + "isOptional": false, + "name": "start" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!CSSCoverage#stop:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "stop(): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "CoverageEntry", + "canonicalReference": "puppeteer-core!CoverageEntry:interface" + }, + { + "kind": "Content", + "text": "[]>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "name": "stop" + } + ], + "implementsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "puppeteer-core!CSSCoverageOptions:interface", + "docComment": "/**\n * Set of configurable options for CSS coverage.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface CSSCoverageOptions " + } + ], + "fileUrlPath": "src/common/Coverage.ts", + "releaseTag": "Public", + "name": "CSSCoverageOptions", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!CSSCoverageOptions#resetOnNavigation:member", + "docComment": "/**\n * Whether to reset coverage on every navigation.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "resetOnNavigation?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "resetOnNavigation", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "puppeteer-core!CustomError:class", + "docComment": "/**\n * @remarks\n *\n * The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `CustomError` class.\n *\n * @deprecated\n *\n * Do not use.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class CustomError extends " + }, + { + "kind": "Reference", + "text": "Error", + "canonicalReference": "!Error:interface" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/common/Errors.ts", + "releaseTag": "Public", + "name": "CustomError", + "preserveMemberOrder": false, + "members": [], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "puppeteer-core!CustomQueryHandler:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface CustomQueryHandler " + } + ], + "fileUrlPath": "src/common/QueryHandler.ts", + "releaseTag": "Public", + "name": "CustomQueryHandler", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!CustomQueryHandler#queryAll:member", + "docComment": "/**\n * @returns Some {@link Node}s matching the given `selector` from {@link node}.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "queryAll?: " + }, + { + "kind": "Content", + "text": "(node: " + }, + { + "kind": "Reference", + "text": "Node", + "canonicalReference": "!Node:interface" + }, + { + "kind": "Content", + "text": ", selector: string) => " + }, + { + "kind": "Reference", + "text": "Node", + "canonicalReference": "!Node:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "queryAll", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!CustomQueryHandler#queryOne:member", + "docComment": "/**\n * @returns A {@link Node} matching the given `selector` from {@link node}.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "queryOne?: " + }, + { + "kind": "Content", + "text": "(node: " + }, + { + "kind": "Reference", + "text": "Node", + "canonicalReference": "!Node:interface" + }, + { + "kind": "Content", + "text": ", selector: string) => " + }, + { + "kind": "Reference", + "text": "Node", + "canonicalReference": "!Node:interface" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "queryOne", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Function", + "canonicalReference": "puppeteer-core!customQueryHandlerNames:function(1)", + "docComment": "/**\n * @deprecated\n *\n * Import {@link Puppeteer} and use the static method {@link Puppeteer.customQueryHandlerNames}\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function customQueryHandlerNames(): " + }, + { + "kind": "Content", + "text": "string[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "src/common/QueryHandler.ts", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "customQueryHandlerNames" + }, + { + "kind": "Variable", + "canonicalReference": "puppeteer-core!DEFAULT_INTERCEPT_RESOLUTION_PRIORITY:var", + "docComment": "/**\n * The default cooperative request interception resolution priority\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "DEFAULT_INTERCEPT_RESOLUTION_PRIORITY = " + }, + { + "kind": "Content", + "text": "0" + } + ], + "fileUrlPath": "src/common/HTTPRequest.ts", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isReadonly": true, + "releaseTag": "Public", + "name": "DEFAULT_INTERCEPT_RESOLUTION_PRIORITY", + "variableTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + }, + { + "kind": "Variable", + "canonicalReference": "puppeteer-core!defaultArgs:var", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "defaultArgs: " + }, + { + "kind": "Content", + "text": "(options?: import(\"./node/LaunchOptions.js\")." + }, + { + "kind": "Reference", + "text": "BrowserLaunchArgumentOptions", + "canonicalReference": "puppeteer-core!BrowserLaunchArgumentOptions:interface" + }, + { + "kind": "Content", + "text": ") => string[]" + } + ], + "fileUrlPath": "src/puppeteer-core.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "defaultArgs", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Interface", + "canonicalReference": "puppeteer-core!Device:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface Device " + } + ], + "fileUrlPath": "src/common/Device.ts", + "releaseTag": "Public", + "name": "Device", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!Device#userAgent:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "userAgent: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "userAgent", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer-core!Device#viewport:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "viewport: " + }, + { + "kind": "Reference", + "text": "Viewport", + "canonicalReference": "puppeteer-core!Viewport:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "viewport", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Variable", + "canonicalReference": "puppeteer-core!devices:var", + "docComment": "/**\n * @deprecated\n *\n * Import {@link KnownDevices}\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "devices: " + }, + { + "kind": "Reference", + "text": "Readonly", + "canonicalReference": "!Readonly:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": "<\"Blackberry PlayBook\" | \"Blackberry PlayBook landscape\" | \"BlackBerry Z30\" | \"BlackBerry Z30 landscape\" | \"Galaxy Note 3\" | \"Galaxy Note 3 landscape\" | \"Galaxy Note II\" | \"Galaxy Note II landscape\" | \"Galaxy S III\" | \"Galaxy S III landscape\" | \"Galaxy S5\" | \"Galaxy S5 landscape\" | \"Galaxy S8\" | \"Galaxy S8 landscape\" | \"Galaxy S9+\" | \"Galaxy S9+ landscape\" | \"Galaxy Tab S4\" | \"Galaxy Tab S4 landscape\" | \"iPad\" | \"iPad landscape\" | \"iPad (gen 6)\" | \"iPad (gen 6) landscape\" | \"iPad (gen 7)\" | \"iPad (gen 7) landscape\" | \"iPad Mini\" | \"iPad Mini landscape\" | \"iPad Pro\" | \"iPad Pro landscape\" | \"iPad Pro 11\" | \"iPad Pro 11 landscape\" | \"iPhone 4\" | \"iPhone 4 landscape\" | \"iPhone 5\" | \"iPhone 5 landscape\" | \"iPhone 6\" | \"iPhone 6 landscape\" | \"iPhone 6 Plus\" | \"iPhone 6 Plus landscape\" | \"iPhone 7\" | \"iPhone 7 landscape\" | \"iPhone 7 Plus\" | \"iPhone 7 Plus landscape\" | \"iPhone 8\" | \"iPhone 8 landscape\" | \"iPhone 8 Plus\" | \"iPhone 8 Plus landscape\" | \"iPhone SE\" | \"iPhone SE landscape\" | \"iPhone X\" | \"iPhone X landscape\" | \"iPhone XR\" | \"iPhone XR landscape\" | \"iPhone 11\" | \"iPhone 11 landscape\" | \"iPhone 11 Pro\" | \"iPhone 11 Pro landscape\" | \"iPhone 11 Pro Max\" | \"iPhone 11 Pro Max landscape\" | \"iPhone 12\" | \"iPhone 12 landscape\" | \"iPhone 12 Pro\" | \"iPhone 12 Pro landscape\" | \"iPhone 12 Pro Max\" | \"iPhone 12 Pro Max landscape\" | \"iPhone 12 Mini\" | \"iPhone 12 Mini landscape\" | \"iPhone 13\" | \"iPhone 13 landscape\" | \"iPhone 13 Pro\" | \"iPhone 13 Pro landscape\" | \"iPhone 13 Pro Max\" | \"iPhone 13 Pro Max landscape\" | \"iPhone 13 Mini\" | \"iPhone 13 Mini landscape\" | \"JioPhone 2\" | \"JioPhone 2 landscape\" | \"Kindle Fire HDX\" | \"Kindle Fire HDX landscape\" | \"LG Optimus L70\" | \"LG Optimus L70 landscape\" | \"Microsoft Lumia 550\" | \"Microsoft Lumia 950\" | \"Microsoft Lumia 950 landscape\" | \"Nexus 10\" | \"Nexus 10 landscape\" | \"Nexus 4\" | \"Nexus 4 landscape\" | \"Nexus 5\" | \"Nexus 5 landscape\" | \"Nexus 5X\" | \"Nexus 5X landscape\" | \"Nexus 6\" | \"Nexus 6 landscape\" | \"Nexus 6P\" | \"Nexus 6P landscape\" | \"Nexus 7\" | \"Nexus 7 landscape\" | \"Nokia Lumia 520\" | \"Nokia Lumia 520 landscape\" | \"Nokia N9\" | \"Nokia N9 landscape\" | \"Pixel 2\" | \"Pixel 2 landscape\" | \"Pixel 2 XL\" | \"Pixel 2 XL landscape\" | \"Pixel 3\" | \"Pixel 3 landscape\" | \"Pixel 4\" | \"Pixel 4 landscape\" | \"Pixel 4a (5G)\" | \"Pixel 4a (5G) landscape\" | \"Pixel 5\" | \"Pixel 5 landscape\" | \"Moto G4\" | \"Moto G4 landscape\", " + }, + { + "kind": "Reference", + "text": "Device", + "canonicalReference": "puppeteer-core!Device:interface" + }, + { + "kind": "Content", + "text": ">>" + } + ], + "fileUrlPath": "src/common/Device.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "devices", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 7 + } + }, + { + "kind": "Class", + "canonicalReference": "puppeteer-core!Dialog:class", + "docComment": "/**\n * Dialog instances are dispatched by the {@link Page} via the `dialog` event.\n *\n * @remarks\n *\n * The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `Dialog` class.\n *\n * @example\n * ```ts\n * import puppeteer from 'puppeteer';\n *\n * (async () => {\n * const browser = await puppeteer.launch();\n * const page = await browser.newPage();\n * page.on('dialog', async dialog => {\n * console.log(dialog.message());\n * await dialog.dismiss();\n * await browser.close();\n * });\n * page.evaluate(() => alert('1'));\n * })();\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class Dialog " + } + ], + "fileUrlPath": "src/common/Dialog.ts", + "releaseTag": "Public", + "name": "Dialog", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Method", + "canonicalReference": "puppeteer-core!Dialog#accept:member(1)", + "docComment": "/**\n * @param promptText - optional text that will be entered in the dialog prompt. Has no effect if the dialog's type is not `prompt`.\n *\n * @returns A promise that resolves when the dialog has been accepted.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "accept(promptText?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "promptText", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": true + } + ], + "isOptional": false, + "name": "accept" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!Dialog#defaultValue:member(1)", + "docComment": "/**\n * @returns The default value of the prompt, or an empty string if the dialog is not a `prompt`.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "defaultValue(): " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "name": "defaultValue" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!Dialog#dismiss:member(1)", + "docComment": "/**\n * @returns A promise which will resolve once the dialog has been dismissed\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "dismiss(): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "name": "dismiss" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!Dialog#message:member(1)", + "docComment": "/**\n * @returns The message displayed in the dialog.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "message(): " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "name": "message" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer-core!Dialog#type:member(1)", + "docComment": "/**\n * @returns The type of the dialog.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "type(): " + }, + { + "kind": "Reference", + "text": "Protocol.Page.DialogType", + "canonicalReference": "devtools-protocol!Protocol.Page.DialogType:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "name": "type" + } + ], + "implementsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "puppeteer-core!ElementFor:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type ElementFor = " + }, + { + "kind": "Content", + "text": "TagName extends keyof " + }, + { + "kind": "Reference", + "text": "HTMLElementTagNameMap", + "canonicalReference": "!HTMLElementTagNameMap:interface" + }, + { + "kind": "Content", + "text": " ? " + }, + { + "kind": "Reference", + "text": "HTMLElementTagNameMap", + "canonicalReference": "!HTMLElementTagNameMap:interface" + }, + { + "kind": "Content", + "text": "[TagName] : TagName extends keyof " + }, + { + "kind": "Reference", + "text": "SVGElementTagNameMap", + "canonicalReference": "!SVGElementTagNameMap:interface" + }, + { + "kind": "Content", + "text": " ? " + }, + { + "kind": "Reference", + "text": "SVGElementTagNameMap", + "canonicalReference": "!SVGElementTagNameMap:interface" + }, + { + "kind": "Content", + "text": "[TagName] : never" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "src/common/types.ts", + "releaseTag": "Public", + "name": "ElementFor", + "typeParameters": [ + { + "typeParameterName": "TagName", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 6, + "endIndex": 15 + } + }, + { + "kind": "Class", + "canonicalReference": "puppeteer-core!ElementHandle:class", + "docComment": "/**\n * ElementHandle represents an in-page DOM element.\n *\n * @remarks\n *\n * ElementHandles can be created with the {@link Page.$} method.\n * ```ts\n * import puppeteer from 'puppeteer';\n *\n * (async () => {\n * const browser = await puppeteer.launch();\n * const page = await browser.newPage();\n * await page.goto('https://example.com');\n * const hrefElement = await page.$('a');\n * await hrefElement.click();\n * // ...\n * })();\n * ```\n *\n * ElementHandle prevents the DOM element from being garbage-collected unless the handle is {@link JSHandle.dispose | disposed}. ElementHandles are auto-disposed when their origin frame gets navigated.\n *\n * ElementHandle instances can be used as arguments in {@link Page.$eval} and {@link Page.evaluate} methods.\n *\n * If you're using TypeScript, ElementHandle takes a generic argument that denotes the type of element the handle is holding within. For example, if you have a handle to a `` element matching `selector`, the method throws an error.\n *\n * @param values - Values of options to select. If the `