isomorfeus-puppetmaster 0.4.1 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isomorfeus/puppetmaster/driver/puppeteer.rb +21 -18
- data/lib/isomorfeus/puppetmaster/driver_registration.rb +4 -4
- data/lib/isomorfeus/puppetmaster/server_registration.rb +0 -52
- data/lib/isomorfeus/puppetmaster/version.rb +1 -1
- data/lib/isomorfeus/puppetmaster.rb +6 -3
- data/lib/isomorfeus-puppetmaster.rb +2 -1
- data/node_modules/.bin/extract-zip +12 -0
- data/node_modules/.bin/extract-zip.cmd +17 -0
- data/node_modules/.bin/extract-zip.ps1 +28 -0
- data/node_modules/.bin/mkdirp +12 -0
- data/node_modules/.bin/mkdirp.cmd +17 -0
- data/node_modules/.bin/mkdirp.ps1 +28 -0
- data/node_modules/.bin/rimraf +12 -0
- data/node_modules/.bin/rimraf.cmd +17 -0
- data/node_modules/.bin/rimraf.ps1 +28 -0
- data/node_modules/.package-lock.json +574 -0
- data/node_modules/@types/node/LICENSE +21 -0
- data/node_modules/@types/node/README.md +16 -0
- data/node_modules/@types/node/assert/strict.d.ts +8 -0
- data/node_modules/@types/node/assert.d.ts +912 -0
- data/node_modules/@types/node/async_hooks.d.ts +497 -0
- data/node_modules/@types/node/buffer.d.ts +2142 -0
- data/node_modules/@types/node/child_process.d.ts +1355 -0
- data/node_modules/@types/node/cluster.d.ts +414 -0
- data/node_modules/@types/node/console.d.ts +407 -0
- data/node_modules/@types/node/constants.d.ts +18 -0
- data/node_modules/@types/node/crypto.d.ts +3224 -0
- data/node_modules/@types/node/dgram.d.ts +545 -0
- data/node_modules/@types/node/diagnostics_channel.d.ts +128 -0
- data/node_modules/@types/node/dns/promises.d.ts +357 -0
- data/node_modules/@types/node/dns.d.ts +643 -0
- data/node_modules/@types/node/domain.d.ts +169 -0
- data/node_modules/@types/node/events.d.ts +623 -0
- data/node_modules/@types/node/fs/promises.d.ts +997 -0
- data/node_modules/@types/node/fs.d.ts +3723 -0
- data/node_modules/@types/node/globals.d.ts +285 -0
- data/node_modules/@types/node/globals.global.d.ts +1 -0
- data/node_modules/@types/node/http.d.ts +1358 -0
- data/node_modules/@types/node/http2.d.ts +2100 -0
- data/node_modules/@types/node/https.d.ts +391 -0
- data/node_modules/@types/node/index.d.ts +131 -0
- data/node_modules/@types/node/inspector.d.ts +2738 -0
- data/node_modules/@types/node/module.d.ts +114 -0
- data/node_modules/@types/node/net.d.ts +783 -0
- data/node_modules/@types/node/os.d.ts +455 -0
- data/node_modules/@types/node/package.json +230 -0
- data/node_modules/@types/node/path.d.ts +172 -0
- data/node_modules/@types/node/perf_hooks.d.ts +555 -0
- data/node_modules/@types/node/process.d.ts +1477 -0
- data/node_modules/@types/node/punycode.d.ts +117 -0
- data/node_modules/@types/node/querystring.d.ts +131 -0
- data/node_modules/@types/node/readline.d.ts +542 -0
- data/node_modules/@types/node/repl.d.ts +424 -0
- data/node_modules/@types/node/stream/consumers.d.ts +24 -0
- data/node_modules/@types/node/stream/promises.d.ts +42 -0
- data/node_modules/@types/node/stream/web.d.ts +6 -0
- data/node_modules/@types/node/stream.d.ts +1181 -0
- data/node_modules/@types/node/string_decoder.d.ts +67 -0
- data/node_modules/@types/node/timers/promises.d.ts +68 -0
- data/node_modules/@types/node/timers.d.ts +94 -0
- data/node_modules/@types/node/tls.d.ts +1019 -0
- data/node_modules/@types/node/trace_events.d.ts +161 -0
- data/node_modules/@types/node/tty.d.ts +206 -0
- data/node_modules/@types/node/url.d.ts +798 -0
- data/node_modules/@types/node/util.d.ts +1556 -0
- data/node_modules/@types/node/v8.d.ts +378 -0
- data/node_modules/@types/node/vm.d.ts +504 -0
- data/node_modules/@types/node/wasi.d.ts +153 -0
- data/node_modules/@types/node/worker_threads.d.ts +649 -0
- data/node_modules/@types/node/zlib.d.ts +517 -0
- data/node_modules/@types/yauzl/LICENSE +21 -0
- data/node_modules/@types/yauzl/README.md +16 -0
- data/node_modules/@types/yauzl/index.d.ts +98 -0
- data/node_modules/@types/yauzl/package.json +27 -0
- data/node_modules/agent-base/README.md +145 -0
- data/node_modules/agent-base/dist/src/index.d.ts +78 -0
- data/node_modules/agent-base/dist/src/index.js +203 -0
- data/node_modules/agent-base/dist/src/index.js.map +1 -0
- data/node_modules/agent-base/dist/src/promisify.d.ts +4 -0
- data/node_modules/agent-base/dist/src/promisify.js +18 -0
- data/node_modules/agent-base/dist/src/promisify.js.map +1 -0
- data/node_modules/agent-base/package.json +64 -0
- data/node_modules/agent-base/src/index.ts +345 -0
- data/node_modules/agent-base/src/promisify.ts +33 -0
- data/node_modules/balanced-match/.github/FUNDING.yml +2 -0
- data/node_modules/balanced-match/LICENSE.md +21 -0
- data/node_modules/balanced-match/README.md +97 -0
- data/node_modules/balanced-match/index.js +62 -0
- data/node_modules/balanced-match/package.json +48 -0
- data/node_modules/base64-js/LICENSE +21 -0
- data/node_modules/base64-js/README.md +34 -0
- data/node_modules/base64-js/base64js.min.js +1 -0
- data/node_modules/base64-js/index.d.ts +3 -0
- data/node_modules/base64-js/index.js +150 -0
- data/node_modules/base64-js/package.json +47 -0
- data/node_modules/bl/.travis.yml +17 -0
- data/node_modules/bl/BufferList.js +396 -0
- data/node_modules/bl/LICENSE.md +13 -0
- data/node_modules/bl/README.md +247 -0
- data/node_modules/bl/bl.js +84 -0
- data/node_modules/bl/package.json +37 -0
- data/node_modules/bl/test/convert.js +21 -0
- data/node_modules/bl/test/indexOf.js +492 -0
- data/node_modules/bl/test/isBufferList.js +32 -0
- data/node_modules/bl/test/test.js +869 -0
- data/node_modules/brace-expansion/LICENSE +21 -0
- data/node_modules/brace-expansion/README.md +129 -0
- data/node_modules/brace-expansion/index.js +201 -0
- data/node_modules/brace-expansion/package.json +47 -0
- data/node_modules/buffer/AUTHORS.md +70 -0
- data/node_modules/buffer/LICENSE +21 -0
- data/node_modules/buffer/README.md +410 -0
- data/node_modules/buffer/index.d.ts +186 -0
- data/node_modules/buffer/index.js +1817 -0
- data/node_modules/buffer/package.json +96 -0
- data/node_modules/buffer-crc32/LICENSE +19 -0
- data/node_modules/buffer-crc32/README.md +47 -0
- data/node_modules/buffer-crc32/index.js +111 -0
- data/node_modules/buffer-crc32/package.json +39 -0
- data/node_modules/chownr/LICENSE +15 -0
- data/node_modules/chownr/README.md +3 -0
- data/node_modules/chownr/chownr.js +167 -0
- data/node_modules/chownr/package.json +29 -0
- data/node_modules/concat-map/.travis.yml +4 -0
- data/node_modules/concat-map/LICENSE +18 -0
- data/node_modules/concat-map/README.markdown +62 -0
- data/node_modules/concat-map/example/map.js +6 -0
- data/node_modules/concat-map/index.js +13 -0
- data/node_modules/concat-map/package.json +43 -0
- data/node_modules/concat-map/test/map.js +39 -0
- data/node_modules/debug/LICENSE +19 -0
- data/node_modules/debug/README.md +455 -0
- data/node_modules/debug/package.json +59 -0
- data/node_modules/debug/src/browser.js +269 -0
- data/node_modules/debug/src/common.js +261 -0
- data/node_modules/debug/src/index.js +10 -0
- data/node_modules/debug/src/node.js +263 -0
- data/node_modules/devtools-protocol/LICENSE +27 -0
- data/node_modules/devtools-protocol/README.md +12 -0
- data/node_modules/devtools-protocol/changelog.md +10491 -0
- data/node_modules/devtools-protocol/externs/protocol_externs.js +9734 -0
- data/node_modules/devtools-protocol/json/browser_protocol.json +20641 -0
- data/node_modules/devtools-protocol/json/js_protocol.json +3581 -0
- data/node_modules/devtools-protocol/package.json +18 -0
- data/node_modules/devtools-protocol/pdl/browser_protocol.pdl +9637 -0
- data/node_modules/devtools-protocol/pdl/js_protocol.pdl +1678 -0
- data/node_modules/devtools-protocol/types/protocol-mapping.d.ts +4321 -0
- data/node_modules/devtools-protocol/types/protocol-proxy-api.d.ts +3683 -0
- data/node_modules/devtools-protocol/types/protocol.d.ts +15538 -0
- data/node_modules/end-of-stream/LICENSE +21 -0
- data/node_modules/end-of-stream/README.md +54 -0
- data/node_modules/end-of-stream/index.js +94 -0
- data/node_modules/end-of-stream/package.json +37 -0
- data/node_modules/extract-zip/LICENSE +23 -0
- data/node_modules/extract-zip/cli.js +19 -0
- data/node_modules/extract-zip/index.d.ts +21 -0
- data/node_modules/extract-zip/index.js +173 -0
- data/node_modules/extract-zip/package.json +80 -0
- data/node_modules/extract-zip/readme.md +57 -0
- data/node_modules/fd-slicer/.npmignore +2 -0
- data/node_modules/fd-slicer/.travis.yml +7 -0
- data/node_modules/fd-slicer/CHANGELOG.md +49 -0
- data/node_modules/fd-slicer/LICENSE +21 -0
- data/node_modules/fd-slicer/README.md +199 -0
- data/node_modules/fd-slicer/index.js +296 -0
- data/node_modules/fd-slicer/package.json +36 -0
- data/node_modules/fd-slicer/test/test.js +350 -0
- data/node_modules/find-up/index.d.ts +137 -0
- data/node_modules/find-up/index.js +89 -0
- data/node_modules/find-up/license +9 -0
- data/node_modules/find-up/package.json +53 -0
- data/node_modules/find-up/readme.md +156 -0
- data/node_modules/fs-constants/LICENSE +21 -0
- data/node_modules/fs-constants/README.md +26 -0
- data/node_modules/fs-constants/browser.js +1 -0
- data/node_modules/fs-constants/index.js +1 -0
- data/node_modules/fs-constants/package.json +19 -0
- data/node_modules/fs.realpath/LICENSE +43 -0
- data/node_modules/fs.realpath/README.md +33 -0
- data/node_modules/fs.realpath/index.js +66 -0
- data/node_modules/fs.realpath/old.js +303 -0
- data/node_modules/fs.realpath/package.json +26 -0
- data/node_modules/get-stream/buffer-stream.js +52 -0
- data/node_modules/get-stream/index.d.ts +108 -0
- data/node_modules/get-stream/index.js +60 -0
- data/node_modules/get-stream/license +9 -0
- data/node_modules/get-stream/package.json +50 -0
- data/node_modules/get-stream/readme.md +124 -0
- data/node_modules/glob/LICENSE +21 -0
- data/node_modules/glob/README.md +375 -0
- data/node_modules/glob/changelog.md +67 -0
- data/node_modules/glob/common.js +234 -0
- data/node_modules/glob/glob.js +788 -0
- data/node_modules/glob/package.json +51 -0
- data/node_modules/glob/sync.js +484 -0
- data/node_modules/https-proxy-agent/README.md +137 -0
- data/node_modules/https-proxy-agent/dist/agent.d.ts +30 -0
- data/node_modules/https-proxy-agent/dist/agent.js +180 -0
- data/node_modules/https-proxy-agent/dist/agent.js.map +1 -0
- data/node_modules/https-proxy-agent/dist/index.d.ts +23 -0
- data/node_modules/https-proxy-agent/dist/index.js +14 -0
- data/node_modules/https-proxy-agent/dist/index.js.map +1 -0
- data/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +7 -0
- data/node_modules/https-proxy-agent/dist/parse-proxy-response.js +66 -0
- data/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +1 -0
- data/node_modules/https-proxy-agent/package.json +56 -0
- data/node_modules/ieee754/LICENSE +11 -0
- data/node_modules/ieee754/README.md +51 -0
- data/node_modules/ieee754/index.d.ts +10 -0
- data/node_modules/ieee754/index.js +85 -0
- data/node_modules/ieee754/package.json +52 -0
- data/node_modules/inflight/LICENSE +15 -0
- data/node_modules/inflight/README.md +37 -0
- data/node_modules/inflight/inflight.js +54 -0
- data/node_modules/inflight/package.json +29 -0
- data/node_modules/inherits/LICENSE +16 -0
- data/node_modules/inherits/README.md +42 -0
- data/node_modules/inherits/inherits.js +9 -0
- data/node_modules/inherits/inherits_browser.js +27 -0
- data/node_modules/inherits/package.json +29 -0
- data/node_modules/locate-path/index.d.ts +83 -0
- data/node_modules/locate-path/index.js +65 -0
- data/node_modules/locate-path/license +9 -0
- data/node_modules/locate-path/package.json +45 -0
- data/node_modules/locate-path/readme.md +122 -0
- data/node_modules/minimatch/LICENSE +15 -0
- data/node_modules/minimatch/README.md +209 -0
- data/node_modules/minimatch/minimatch.js +923 -0
- data/node_modules/minimatch/package.json +30 -0
- data/node_modules/minimist/.travis.yml +8 -0
- data/node_modules/minimist/LICENSE +18 -0
- data/node_modules/minimist/example/parse.js +2 -0
- data/node_modules/minimist/index.js +245 -0
- data/node_modules/minimist/package.json +45 -0
- data/node_modules/minimist/readme.markdown +95 -0
- data/node_modules/minimist/test/all_bool.js +32 -0
- data/node_modules/minimist/test/bool.js +178 -0
- data/node_modules/minimist/test/dash.js +31 -0
- data/node_modules/minimist/test/default_bool.js +35 -0
- data/node_modules/minimist/test/dotted.js +22 -0
- data/node_modules/minimist/test/kv_short.js +16 -0
- data/node_modules/minimist/test/long.js +31 -0
- data/node_modules/minimist/test/num.js +36 -0
- data/node_modules/minimist/test/parse.js +197 -0
- data/node_modules/minimist/test/parse_modified.js +9 -0
- data/node_modules/minimist/test/proto.js +44 -0
- data/node_modules/minimist/test/short.js +67 -0
- data/node_modules/minimist/test/stop_early.js +15 -0
- data/node_modules/minimist/test/unknown.js +102 -0
- data/node_modules/minimist/test/whitespace.js +8 -0
- data/node_modules/mkdirp/LICENSE +21 -0
- data/node_modules/mkdirp/bin/cmd.js +33 -0
- data/node_modules/mkdirp/bin/usage.txt +12 -0
- data/node_modules/mkdirp/index.js +99 -0
- data/node_modules/mkdirp/package.json +34 -0
- data/node_modules/mkdirp/readme.markdown +100 -0
- data/node_modules/ms/index.js +162 -0
- data/node_modules/ms/license.md +21 -0
- data/node_modules/ms/package.json +37 -0
- data/node_modules/ms/readme.md +60 -0
- data/node_modules/node-fetch/CHANGELOG.md +272 -0
- data/node_modules/node-fetch/LICENSE.md +22 -0
- data/node_modules/node-fetch/README.md +590 -0
- data/node_modules/node-fetch/browser.js +25 -0
- data/node_modules/node-fetch/lib/index.es.js +1640 -0
- data/node_modules/node-fetch/lib/index.js +1649 -0
- data/node_modules/node-fetch/lib/index.mjs +1638 -0
- data/node_modules/node-fetch/package.json +66 -0
- data/node_modules/once/LICENSE +15 -0
- data/node_modules/once/README.md +79 -0
- data/node_modules/once/once.js +42 -0
- data/node_modules/once/package.json +33 -0
- data/node_modules/p-limit/index.d.ts +38 -0
- data/node_modules/p-limit/index.js +57 -0
- data/node_modules/p-limit/license +9 -0
- data/node_modules/p-limit/package.json +52 -0
- data/node_modules/p-limit/readme.md +101 -0
- data/node_modules/p-locate/index.d.ts +64 -0
- data/node_modules/p-locate/index.js +52 -0
- data/node_modules/p-locate/license +9 -0
- data/node_modules/p-locate/package.json +53 -0
- data/node_modules/p-locate/readme.md +90 -0
- data/node_modules/p-try/index.d.ts +39 -0
- data/node_modules/p-try/index.js +9 -0
- data/node_modules/p-try/license +9 -0
- data/node_modules/p-try/package.json +42 -0
- data/node_modules/p-try/readme.md +58 -0
- data/node_modules/path-exists/index.d.ts +28 -0
- data/node_modules/path-exists/index.js +23 -0
- data/node_modules/path-exists/license +9 -0
- data/node_modules/path-exists/package.json +39 -0
- data/node_modules/path-exists/readme.md +52 -0
- data/node_modules/path-is-absolute/index.js +20 -0
- data/node_modules/path-is-absolute/license +21 -0
- data/node_modules/path-is-absolute/package.json +43 -0
- data/node_modules/path-is-absolute/readme.md +59 -0
- data/node_modules/pend/LICENSE +23 -0
- data/node_modules/pend/README.md +41 -0
- data/node_modules/pend/index.js +55 -0
- data/node_modules/pend/package.json +18 -0
- data/node_modules/pend/test.js +137 -0
- data/node_modules/pkg-dir/index.d.ts +44 -0
- data/node_modules/pkg-dir/index.js +17 -0
- data/node_modules/pkg-dir/license +9 -0
- data/node_modules/pkg-dir/package.json +56 -0
- data/node_modules/pkg-dir/readme.md +66 -0
- data/node_modules/progress/CHANGELOG.md +115 -0
- data/node_modules/progress/LICENSE +22 -0
- data/node_modules/progress/Makefile +8 -0
- data/node_modules/progress/Readme.md +146 -0
- data/node_modules/progress/index.js +1 -0
- data/node_modules/progress/lib/node-progress.js +235 -0
- data/node_modules/progress/package.json +26 -0
- data/node_modules/proxy-from-env/.eslintrc +29 -0
- data/node_modules/proxy-from-env/.travis.yml +10 -0
- data/node_modules/proxy-from-env/LICENSE +20 -0
- data/node_modules/proxy-from-env/README.md +131 -0
- data/node_modules/proxy-from-env/index.js +108 -0
- data/node_modules/proxy-from-env/package.json +34 -0
- data/node_modules/proxy-from-env/test.js +483 -0
- data/node_modules/pump/.travis.yml +5 -0
- data/node_modules/pump/LICENSE +21 -0
- data/node_modules/pump/README.md +65 -0
- data/node_modules/pump/index.js +82 -0
- data/node_modules/pump/package.json +24 -0
- data/node_modules/pump/test-browser.js +66 -0
- data/node_modules/pump/test-node.js +53 -0
- data/node_modules/puppeteer-core/CHANGELOG.md +226 -0
- data/node_modules/puppeteer-core/LICENSE +202 -0
- data/node_modules/puppeteer-core/README.md +483 -0
- data/node_modules/puppeteer-core/cjs-entry-core.js +29 -0
- data/node_modules/puppeteer-core/cjs-entry.js +29 -0
- data/node_modules/puppeteer-core/install.js +89 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/api-docs-entry.d.ts +111 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/api-docs-entry.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/api-docs-entry.js +81 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/api-docs-entry.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Accessibility.d.ts +176 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Accessibility.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Accessibility.js +361 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Accessibility.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/AriaQueryHandler.d.ts +21 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/AriaQueryHandler.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/AriaQueryHandler.js +85 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/AriaQueryHandler.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Browser.d.ts +438 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Browser.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Browser.js +528 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Browser.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/BrowserConnector.d.ts +54 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/BrowserConnector.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/BrowserConnector.js +98 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/BrowserConnector.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/BrowserWebSocketTransport.d.ts +26 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/BrowserWebSocketTransport.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/BrowserWebSocketTransport.js +35 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/BrowserWebSocketTransport.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Connection.d.ts +130 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Connection.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Connection.js +281 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Connection.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/ConnectionTransport.d.ts +25 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/ConnectionTransport.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/ConnectionTransport.js +18 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/ConnectionTransport.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/ConsoleMessage.d.ts +73 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/ConsoleMessage.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/ConsoleMessage.js +65 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/ConsoleMessage.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Coverage.d.ts +189 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Coverage.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Coverage.js +329 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Coverage.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/DOMWorld.d.ts +173 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/DOMWorld.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/DOMWorld.js +655 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/DOMWorld.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Debug.d.ts +53 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Debug.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Debug.js +82 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Debug.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/DeviceDescriptors.d.ts +41 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/DeviceDescriptors.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/DeviceDescriptors.js +951 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/DeviceDescriptors.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Dialog.d.ts +75 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Dialog.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Dialog.js +98 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Dialog.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/EmulationManager.d.ts +25 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/EmulationManager.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/EmulationManager.js +38 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/EmulationManager.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Errors.d.ts +42 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Errors.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Errors.js +49 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Errors.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/EvalTypes.d.ts +61 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/EvalTypes.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/EvalTypes.js +18 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/EvalTypes.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/EventEmitter.d.ts +93 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/EventEmitter.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/EventEmitter.js +117 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/EventEmitter.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Events.d.ts +82 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Events.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Events.js +87 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Events.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/ExecutionContext.d.ts +194 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/ExecutionContext.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/ExecutionContext.js +322 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/ExecutionContext.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/FileChooser.d.ts +59 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/FileChooser.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/FileChooser.js +72 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/FileChooser.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/FrameManager.d.ts +733 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/FrameManager.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/FrameManager.js +965 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/FrameManager.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/HTTPRequest.d.ts +341 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/HTTPRequest.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/HTTPRequest.js +547 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/HTTPRequest.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/HTTPResponse.d.ts +126 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/HTTPResponse.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/HTTPResponse.js +155 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/HTTPResponse.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Input.d.ts +360 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Input.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Input.js +545 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Input.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/JSHandle.d.ts +469 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/JSHandle.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/JSHandle.js +803 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/JSHandle.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/LifecycleWatcher.d.ts +66 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/LifecycleWatcher.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/LifecycleWatcher.js +149 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/LifecycleWatcher.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/NetworkConditions.d.ts +27 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/NetworkConditions.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/NetworkConditions.js +34 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/NetworkConditions.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/NetworkManager.d.ts +97 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/NetworkManager.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/NetworkManager.js +341 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/NetworkManager.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/PDFOptions.d.ts +157 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/PDFOptions.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/PDFOptions.js +35 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/PDFOptions.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Page.d.ts +2011 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Page.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Page.js +2427 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Page.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Product.d.ts +21 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Product.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Product.js +18 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Product.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Puppeteer.d.ts +160 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Puppeteer.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Puppeteer.js +162 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Puppeteer.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/PuppeteerViewport.d.ts +52 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/PuppeteerViewport.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/PuppeteerViewport.js +3 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/PuppeteerViewport.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/QueryHandler.d.ts +65 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/QueryHandler.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/QueryHandler.js +166 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/QueryHandler.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/SecurityDetails.d.ts +61 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/SecurityDetails.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/SecurityDetails.js +77 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/SecurityDetails.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Target.d.ts +99 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Target.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Target.js +145 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Target.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/TimeoutSettings.d.ts +28 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/TimeoutSettings.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/TimeoutSettings.js +48 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/TimeoutSettings.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Tracing.d.ts +47 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Tracing.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Tracing.js +104 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Tracing.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/USKeyboardLayout.d.ts +40 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/USKeyboardLayout.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/USKeyboardLayout.js +407 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/USKeyboardLayout.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/WebWorker.d.ts +99 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/WebWorker.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/WebWorker.js +113 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/WebWorker.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/assert.d.ts +22 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/assert.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/assert.js +29 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/assert.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/fetch.d.ts +17 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/fetch.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/fetch.js +44 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/fetch.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/helper.d.ts +85 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/helper.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/helper.js +328 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/helper.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/environment.d.ts +17 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/environment.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/environment.js +20 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/environment.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/initialize-node.d.ts +18 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/initialize-node.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/initialize-node.js +45 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/initialize-node.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/initialize-web.d.ts +18 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/initialize-web.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/initialize-web.js +27 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/initialize-web.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/BrowserFetcher.d.ts +134 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/BrowserFetcher.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/BrowserFetcher.js +502 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/BrowserFetcher.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/BrowserRunner.d.ts +40 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/BrowserRunner.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/BrowserRunner.js +225 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/BrowserRunner.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/LaunchOptions.d.ts +131 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/LaunchOptions.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/LaunchOptions.js +18 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/LaunchOptions.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/Launcher.d.ts +17 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/Launcher.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/Launcher.js +574 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/Launcher.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/NodeWebSocketTransport.d.ts +27 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/NodeWebSocketTransport.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/NodeWebSocketTransport.js +42 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/NodeWebSocketTransport.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/PipeTransport.d.ts +30 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/PipeTransport.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/PipeTransport.js +65 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/PipeTransport.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/Puppeteer.d.ts +154 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/Puppeteer.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/Puppeteer.js +189 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/Puppeteer.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/install.d.ts +18 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/install.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/install.js +160 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/install.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node-puppeteer-core.d.ts +18 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node-puppeteer-core.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node-puppeteer-core.js +25 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node-puppeteer-core.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node.d.ts +18 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node.js +24 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/revisions.d.ts +22 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/revisions.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/revisions.js +23 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/revisions.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/web.d.ts +18 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/web.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/web.js +24 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/web.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/vendor/mitt/src/index.d.ts +28 -0
- data/node_modules/puppeteer-core/lib/cjs/vendor/mitt/src/index.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/vendor/mitt/src/index.js +57 -0
- data/node_modules/puppeteer-core/lib/cjs/vendor/mitt/src/index.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/api-docs-entry.d.ts +111 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/api-docs-entry.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/api-docs-entry.js +81 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/api-docs-entry.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Accessibility.d.ts +176 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Accessibility.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Accessibility.js +357 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Accessibility.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/AriaQueryHandler.d.ts +21 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/AriaQueryHandler.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/AriaQueryHandler.js +82 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/AriaQueryHandler.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Browser.d.ts +438 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Browser.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Browser.js +523 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Browser.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/BrowserConnector.d.ts +54 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/BrowserConnector.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/BrowserConnector.js +75 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/BrowserConnector.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/BrowserWebSocketTransport.d.ts +26 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/BrowserWebSocketTransport.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/BrowserWebSocketTransport.js +31 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/BrowserWebSocketTransport.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Connection.d.ts +130 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Connection.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Connection.js +276 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Connection.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/ConnectionTransport.d.ts +25 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/ConnectionTransport.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/ConnectionTransport.js +17 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/ConnectionTransport.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/ConsoleMessage.d.ts +73 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/ConsoleMessage.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/ConsoleMessage.js +61 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/ConsoleMessage.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Coverage.d.ts +189 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Coverage.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Coverage.js +323 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Coverage.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/DOMWorld.d.ts +173 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/DOMWorld.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/DOMWorld.js +650 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/DOMWorld.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Debug.d.ts +53 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Debug.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Debug.js +78 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Debug.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/DeviceDescriptors.d.ts +41 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/DeviceDescriptors.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/DeviceDescriptors.js +948 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/DeviceDescriptors.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Dialog.d.ts +75 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Dialog.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Dialog.js +94 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Dialog.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/EmulationManager.d.ts +25 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/EmulationManager.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/EmulationManager.js +34 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/EmulationManager.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Errors.d.ts +42 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Errors.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Errors.js +44 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Errors.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/EvalTypes.d.ts +61 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/EvalTypes.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/EvalTypes.js +17 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/EvalTypes.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/EventEmitter.d.ts +93 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/EventEmitter.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/EventEmitter.js +110 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/EventEmitter.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Events.d.ts +82 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Events.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Events.js +84 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Events.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/ExecutionContext.d.ts +194 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/ExecutionContext.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/ExecutionContext.js +318 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/ExecutionContext.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/FileChooser.d.ts +59 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/FileChooser.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/FileChooser.js +68 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/FileChooser.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/FrameManager.d.ts +733 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/FrameManager.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/FrameManager.js +960 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/FrameManager.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/HTTPRequest.d.ts +341 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/HTTPRequest.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/HTTPRequest.js +543 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/HTTPRequest.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/HTTPResponse.d.ts +126 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/HTTPResponse.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/HTTPResponse.js +151 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/HTTPResponse.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Input.d.ts +360 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Input.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Input.js +539 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Input.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/JSHandle.d.ts +469 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/JSHandle.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/JSHandle.js +778 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/JSHandle.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/LifecycleWatcher.d.ts +66 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/LifecycleWatcher.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/LifecycleWatcher.js +145 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/LifecycleWatcher.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/NetworkConditions.d.ts +27 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/NetworkConditions.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/NetworkConditions.js +31 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/NetworkConditions.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/NetworkManager.d.ts +97 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/NetworkManager.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/NetworkManager.js +337 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/NetworkManager.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/PDFOptions.d.ts +157 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/PDFOptions.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/PDFOptions.js +32 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/PDFOptions.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Page.d.ts +2011 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Page.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Page.js +2423 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Page.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Product.d.ts +21 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Product.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Product.js +17 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Product.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Puppeteer.d.ts +160 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Puppeteer.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Puppeteer.js +158 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Puppeteer.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/PuppeteerViewport.d.ts +52 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/PuppeteerViewport.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/PuppeteerViewport.js +2 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/PuppeteerViewport.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/QueryHandler.d.ts +65 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/QueryHandler.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/QueryHandler.js +158 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/QueryHandler.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/SecurityDetails.d.ts +61 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/SecurityDetails.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/SecurityDetails.js +73 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/SecurityDetails.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Target.d.ts +99 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Target.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Target.js +141 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Target.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/TimeoutSettings.d.ts +28 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/TimeoutSettings.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/TimeoutSettings.js +44 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/TimeoutSettings.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Tracing.d.ts +47 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Tracing.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Tracing.js +100 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Tracing.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/USKeyboardLayout.d.ts +40 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/USKeyboardLayout.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/USKeyboardLayout.js +404 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/USKeyboardLayout.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/WebWorker.d.ts +99 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/WebWorker.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/WebWorker.js +109 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/WebWorker.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/assert.d.ts +22 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/assert.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/assert.js +25 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/assert.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/fetch.d.ts +17 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/fetch.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/fetch.js +21 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/fetch.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/helper.d.ts +85 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/helper.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/helper.js +306 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/helper.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/environment.d.ts +17 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/environment.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/environment.js +17 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/environment.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/initialize-node.d.ts +18 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/initialize-node.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/initialize-node.js +38 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/initialize-node.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/initialize-web.d.ts +18 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/initialize-web.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/initialize-web.js +23 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/initialize-web.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/BrowserFetcher.d.ts +134 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/BrowserFetcher.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/BrowserFetcher.js +476 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/BrowserFetcher.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/BrowserRunner.d.ts +40 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/BrowserRunner.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/BrowserRunner.js +199 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/BrowserRunner.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/LaunchOptions.d.ts +131 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/LaunchOptions.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/LaunchOptions.js +17 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/LaunchOptions.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/Launcher.d.ts +17 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/Launcher.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/Launcher.js +552 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/Launcher.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/NodeWebSocketTransport.d.ts +27 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/NodeWebSocketTransport.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/NodeWebSocketTransport.js +35 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/NodeWebSocketTransport.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/PipeTransport.d.ts +30 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/PipeTransport.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/PipeTransport.js +61 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/PipeTransport.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/Puppeteer.d.ts +154 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/Puppeteer.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/Puppeteer.js +182 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/Puppeteer.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/install.d.ts +18 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/install.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/install.js +152 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/install.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node-puppeteer-core.d.ts +18 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node-puppeteer-core.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node-puppeteer-core.js +23 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node-puppeteer-core.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node.d.ts +18 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node.js +22 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/revisions.d.ts +22 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/revisions.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/revisions.js +20 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/revisions.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/web.d.ts +18 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/web.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/web.js +22 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/web.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/vendor/mitt/src/index.d.ts +28 -0
- data/node_modules/puppeteer-core/lib/esm/vendor/mitt/src/index.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/vendor/mitt/src/index.js +54 -0
- data/node_modules/puppeteer-core/lib/esm/vendor/mitt/src/index.js.map +1 -0
- data/node_modules/puppeteer-core/lib/types.d.ts +6911 -0
- data/node_modules/puppeteer-core/package.json +122 -0
- data/node_modules/puppeteer-core/typescript-if-required.js +61 -0
- data/node_modules/readable-stream/CONTRIBUTING.md +38 -0
- data/node_modules/readable-stream/GOVERNANCE.md +136 -0
- data/node_modules/readable-stream/LICENSE +47 -0
- data/node_modules/readable-stream/README.md +106 -0
- data/node_modules/readable-stream/errors-browser.js +127 -0
- data/node_modules/readable-stream/errors.js +116 -0
- data/node_modules/readable-stream/experimentalWarning.js +17 -0
- data/node_modules/readable-stream/lib/_stream_duplex.js +139 -0
- data/node_modules/readable-stream/lib/_stream_passthrough.js +39 -0
- data/node_modules/readable-stream/lib/_stream_readable.js +1124 -0
- data/node_modules/readable-stream/lib/_stream_transform.js +201 -0
- data/node_modules/readable-stream/lib/_stream_writable.js +697 -0
- data/node_modules/readable-stream/lib/internal/streams/async_iterator.js +207 -0
- data/node_modules/readable-stream/lib/internal/streams/buffer_list.js +210 -0
- data/node_modules/readable-stream/lib/internal/streams/destroy.js +105 -0
- data/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +104 -0
- data/node_modules/readable-stream/lib/internal/streams/from-browser.js +3 -0
- data/node_modules/readable-stream/lib/internal/streams/from.js +64 -0
- data/node_modules/readable-stream/lib/internal/streams/pipeline.js +97 -0
- data/node_modules/readable-stream/lib/internal/streams/state.js +27 -0
- data/node_modules/readable-stream/lib/internal/streams/stream-browser.js +1 -0
- data/node_modules/readable-stream/lib/internal/streams/stream.js +1 -0
- data/node_modules/readable-stream/package.json +68 -0
- data/node_modules/readable-stream/readable-browser.js +9 -0
- data/node_modules/readable-stream/readable.js +16 -0
- data/node_modules/rimraf/CHANGELOG.md +65 -0
- data/node_modules/rimraf/LICENSE +15 -0
- data/node_modules/rimraf/README.md +101 -0
- data/node_modules/rimraf/bin.js +68 -0
- data/node_modules/rimraf/package.json +32 -0
- data/node_modules/rimraf/rimraf.js +360 -0
- data/node_modules/safe-buffer/LICENSE +21 -0
- data/node_modules/safe-buffer/README.md +584 -0
- data/node_modules/safe-buffer/index.d.ts +187 -0
- data/node_modules/safe-buffer/index.js +65 -0
- data/node_modules/safe-buffer/package.json +51 -0
- data/node_modules/string_decoder/LICENSE +48 -0
- data/node_modules/string_decoder/README.md +47 -0
- data/node_modules/string_decoder/lib/string_decoder.js +296 -0
- data/node_modules/string_decoder/package.json +34 -0
- data/node_modules/tar-fs/.travis.yml +5 -0
- data/node_modules/tar-fs/LICENSE +21 -0
- data/node_modules/tar-fs/README.md +163 -0
- data/node_modules/tar-fs/index.js +348 -0
- data/node_modules/tar-fs/package.json +41 -0
- data/node_modules/tar-fs/test/fixtures/a/hello.txt +1 -0
- data/node_modules/tar-fs/test/fixtures/b/a/test.txt +1 -0
- data/node_modules/tar-fs/test/fixtures/d/file1 +0 -0
- data/node_modules/tar-fs/test/fixtures/d/file2 +0 -0
- data/node_modules/tar-fs/test/fixtures/d/sub-dir/file5 +0 -0
- data/node_modules/tar-fs/test/fixtures/d/sub-files/file3 +0 -0
- data/node_modules/tar-fs/test/fixtures/d/sub-files/file4 +0 -0
- data/node_modules/tar-fs/test/fixtures/e/directory/.ignore +0 -0
- data/node_modules/tar-fs/test/fixtures/e/file +0 -0
- data/node_modules/tar-fs/test/fixtures/invalid.tar +0 -0
- data/node_modules/tar-fs/test/index.js +346 -0
- data/node_modules/tar-stream/LICENSE +21 -0
- data/node_modules/tar-stream/README.md +168 -0
- data/node_modules/tar-stream/extract.js +257 -0
- data/node_modules/tar-stream/headers.js +295 -0
- data/node_modules/tar-stream/index.js +2 -0
- data/node_modules/tar-stream/pack.js +255 -0
- data/node_modules/tar-stream/package.json +58 -0
- data/node_modules/tar-stream/sandbox.js +11 -0
- data/node_modules/through/.travis.yml +5 -0
- data/node_modules/through/LICENSE.APACHE2 +15 -0
- data/node_modules/through/LICENSE.MIT +24 -0
- data/node_modules/through/index.js +108 -0
- data/node_modules/through/package.json +36 -0
- data/node_modules/through/readme.markdown +64 -0
- data/node_modules/through/test/async.js +28 -0
- data/node_modules/through/test/auto-destroy.js +30 -0
- data/node_modules/through/test/buffering.js +71 -0
- data/node_modules/through/test/end.js +45 -0
- data/node_modules/through/test/index.js +133 -0
- data/node_modules/unbzip2-stream/LICENSE +24 -0
- data/node_modules/unbzip2-stream/README.md +59 -0
- data/node_modules/unbzip2-stream/dist/unbzip2-stream.min.js +1 -0
- data/node_modules/unbzip2-stream/index.js +92 -0
- data/node_modules/unbzip2-stream/lib/bit_iterator.js +39 -0
- data/node_modules/unbzip2-stream/lib/bzip2.js +367 -0
- data/node_modules/unbzip2-stream/package.json +51 -0
- data/node_modules/util-deprecate/History.md +16 -0
- data/node_modules/util-deprecate/LICENSE +24 -0
- data/node_modules/util-deprecate/README.md +53 -0
- data/node_modules/util-deprecate/browser.js +67 -0
- data/node_modules/util-deprecate/node.js +6 -0
- data/node_modules/util-deprecate/package.json +27 -0
- data/node_modules/wrappy/LICENSE +15 -0
- data/node_modules/wrappy/README.md +36 -0
- data/node_modules/wrappy/package.json +29 -0
- data/node_modules/wrappy/wrappy.js +33 -0
- data/node_modules/ws/LICENSE +21 -0
- data/node_modules/ws/README.md +496 -0
- data/node_modules/ws/browser.js +8 -0
- data/node_modules/ws/index.js +10 -0
- data/node_modules/ws/lib/buffer-util.js +129 -0
- data/node_modules/ws/lib/constants.js +10 -0
- data/node_modules/ws/lib/event-target.js +184 -0
- data/node_modules/ws/lib/extension.js +223 -0
- data/node_modules/ws/lib/limiter.js +55 -0
- data/node_modules/ws/lib/permessage-deflate.js +517 -0
- data/node_modules/ws/lib/receiver.js +507 -0
- data/node_modules/ws/lib/sender.js +405 -0
- data/node_modules/ws/lib/stream.js +165 -0
- data/node_modules/ws/lib/validation.js +104 -0
- data/node_modules/ws/lib/websocket-server.js +418 -0
- data/node_modules/ws/lib/websocket.js +942 -0
- data/node_modules/ws/package.json +56 -0
- data/node_modules/yauzl/LICENSE +21 -0
- data/node_modules/yauzl/README.md +658 -0
- data/node_modules/yauzl/index.js +796 -0
- data/node_modules/yauzl/package.json +40 -0
- data/package.json +6 -0
- metadata +940 -58
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"NetworkManager.js","sourceRoot":"","sources":["../../../../src/common/NetworkManager.ts"],"names":[],"mappings":"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"}
|
@@ -0,0 +1,157 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright 2020 Google Inc. All rights reserved.
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
/**
|
17
|
+
* @public
|
18
|
+
*/
|
19
|
+
export interface PDFMargin {
|
20
|
+
top?: string | number;
|
21
|
+
bottom?: string | number;
|
22
|
+
left?: string | number;
|
23
|
+
right?: string | number;
|
24
|
+
}
|
25
|
+
/**
|
26
|
+
* All the valid paper format types when printing a PDF.
|
27
|
+
*
|
28
|
+
* @remarks
|
29
|
+
*
|
30
|
+
* The sizes of each format are as follows:
|
31
|
+
* - `Letter`: 8.5in x 11in
|
32
|
+
*
|
33
|
+
* - `Legal`: 8.5in x 14in
|
34
|
+
*
|
35
|
+
* - `Tabloid`: 11in x 17in
|
36
|
+
*
|
37
|
+
* - `Ledger`: 17in x 11in
|
38
|
+
*
|
39
|
+
* - `A0`: 33.1in x 46.8in
|
40
|
+
*
|
41
|
+
* - `A1`: 23.4in x 33.1in
|
42
|
+
*
|
43
|
+
* - `A2`: 16.54in x 23.4in
|
44
|
+
*
|
45
|
+
* - `A3`: 11.7in x 16.54in
|
46
|
+
*
|
47
|
+
* - `A4`: 8.27in x 11.7in
|
48
|
+
*
|
49
|
+
* - `A5`: 5.83in x 8.27in
|
50
|
+
*
|
51
|
+
* - `A6`: 4.13in x 5.83in
|
52
|
+
*
|
53
|
+
* @public
|
54
|
+
*/
|
55
|
+
export declare type PaperFormat = 'letter' | 'legal' | 'tabloid' | 'ledger' | 'a0' | 'a1' | 'a2' | 'a3' | 'a4' | 'a5' | 'a6';
|
56
|
+
/**
|
57
|
+
* Valid options to configure PDF generation via {@link Page.pdf}.
|
58
|
+
* @public
|
59
|
+
*/
|
60
|
+
export interface PDFOptions {
|
61
|
+
/**
|
62
|
+
* Scales the rendering of the web page. Amount must be between `0.1` and `2`.
|
63
|
+
* @defaultValue 1
|
64
|
+
*/
|
65
|
+
scale?: number;
|
66
|
+
/**
|
67
|
+
* Whether to show the header and footer.
|
68
|
+
* @defaultValue false
|
69
|
+
*/
|
70
|
+
displayHeaderFooter?: boolean;
|
71
|
+
/**
|
72
|
+
* HTML template for the print header. Should be valid HTML with the following
|
73
|
+
* classes used to inject values into them:
|
74
|
+
* - `date` formatted print date
|
75
|
+
*
|
76
|
+
* - `title` document title
|
77
|
+
*
|
78
|
+
* - `url` document location
|
79
|
+
*
|
80
|
+
* - `pageNumber` current page number
|
81
|
+
*
|
82
|
+
* - `totalPages` total pages in the document
|
83
|
+
*/
|
84
|
+
headerTemplate?: string;
|
85
|
+
/**
|
86
|
+
* HTML template for the print footer. Has the same constraints and support
|
87
|
+
* for special classes as {@link PDFOptions.headerTemplate}.
|
88
|
+
*/
|
89
|
+
footerTemplate?: string;
|
90
|
+
/**
|
91
|
+
* Set to `true` to print background graphics.
|
92
|
+
* @defaultValue false
|
93
|
+
*/
|
94
|
+
printBackground?: boolean;
|
95
|
+
/**
|
96
|
+
* Whether to print in landscape orientation.
|
97
|
+
* @defaultValue = false
|
98
|
+
*/
|
99
|
+
landscape?: boolean;
|
100
|
+
/**
|
101
|
+
* Paper ranges to print, e.g. `1-5, 8, 11-13`.
|
102
|
+
* @defaultValue The empty string, which means all pages are printed.
|
103
|
+
*/
|
104
|
+
pageRanges?: string;
|
105
|
+
/**
|
106
|
+
* @remarks
|
107
|
+
* If set, this takes priority over the `width` and `height` options.
|
108
|
+
* @defaultValue `letter`.
|
109
|
+
*/
|
110
|
+
format?: PaperFormat;
|
111
|
+
/**
|
112
|
+
* Sets the width of paper. You can pass in a number or a string with a unit.
|
113
|
+
*/
|
114
|
+
width?: string | number;
|
115
|
+
/**
|
116
|
+
* Sets the height of paper. You can pass in a number or a string with a unit.
|
117
|
+
*/
|
118
|
+
height?: string | number;
|
119
|
+
/**
|
120
|
+
* Give any CSS `@page` size declared in the page priority over what is
|
121
|
+
* declared in the `width` or `height` or `format` option.
|
122
|
+
* @defaultValue `false`, which will scale the content to fit the paper size.
|
123
|
+
*/
|
124
|
+
preferCSSPageSize?: boolean;
|
125
|
+
/**
|
126
|
+
* Set the PDF margins.
|
127
|
+
* @defaultValue no margins are set.
|
128
|
+
*/
|
129
|
+
margin?: PDFMargin;
|
130
|
+
/**
|
131
|
+
* The path to save the file to.
|
132
|
+
*
|
133
|
+
* @remarks
|
134
|
+
*
|
135
|
+
* If the path is relative, it's resolved relative to the current working directory.
|
136
|
+
*
|
137
|
+
* @defaultValue the empty string, which means the PDF will not be written to disk.
|
138
|
+
*/
|
139
|
+
path?: string;
|
140
|
+
/**
|
141
|
+
* Hides default white background and allows generating pdfs with transparency.
|
142
|
+
* @defaultValue false
|
143
|
+
*/
|
144
|
+
omitBackground?: boolean;
|
145
|
+
}
|
146
|
+
/**
|
147
|
+
* @internal
|
148
|
+
*/
|
149
|
+
export interface PaperFormatDimensions {
|
150
|
+
width: number;
|
151
|
+
height: number;
|
152
|
+
}
|
153
|
+
/**
|
154
|
+
* @internal
|
155
|
+
*/
|
156
|
+
export declare const paperFormats: Record<PaperFormat, PaperFormatDimensions>;
|
157
|
+
//# sourceMappingURL=PDFOptions.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"PDFOptions.d.ts","sourceRoot":"","sources":["../../../../src/common/PDFOptions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,oBAAY,WAAW,GACnB,QAAQ,GACR,OAAO,GACP,SAAS,GACT,QAAQ,GACR,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,CAAC;AAET;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;;;;;;;;;;OAYG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;;;;;;;OAQG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,WAAW,EAAE,qBAAqB,CAY1D,CAAC"}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright 2020 Google Inc. All rights reserved.
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
/**
|
17
|
+
* @internal
|
18
|
+
*/
|
19
|
+
export const paperFormats = {
|
20
|
+
letter: { width: 8.5, height: 11 },
|
21
|
+
legal: { width: 8.5, height: 14 },
|
22
|
+
tabloid: { width: 11, height: 17 },
|
23
|
+
ledger: { width: 17, height: 11 },
|
24
|
+
a0: { width: 33.1, height: 46.8 },
|
25
|
+
a1: { width: 23.4, height: 33.1 },
|
26
|
+
a2: { width: 16.54, height: 23.4 },
|
27
|
+
a3: { width: 11.7, height: 16.54 },
|
28
|
+
a4: { width: 8.27, height: 11.7 },
|
29
|
+
a5: { width: 5.83, height: 8.27 },
|
30
|
+
a6: { width: 4.13, height: 5.83 },
|
31
|
+
};
|
32
|
+
//# sourceMappingURL=PDFOptions.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"PDFOptions.js","sourceRoot":"","sources":["../../../../src/common/PDFOptions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AA0JH;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAA+C;IACtE,MAAM,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE;IAClC,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE;IACjC,OAAO,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;IAClC,MAAM,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;IACjC,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;IACjC,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;IACjC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE;IAClC,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE;IAClC,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;IACjC,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;IACjC,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;CACzB,CAAC"}
|
@@ -0,0 +1,2011 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright 2017 Google Inc. All rights reserved.
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
/// <reference types="node" />
|
17
|
+
import type { Readable } from 'stream';
|
18
|
+
import { EventEmitter } from './EventEmitter.js';
|
19
|
+
import { CDPSession } from './Connection.js';
|
20
|
+
import { Dialog } from './Dialog.js';
|
21
|
+
import { Frame } from './FrameManager.js';
|
22
|
+
import { Keyboard, Mouse, Touchscreen, MouseButton } from './Input.js';
|
23
|
+
import { Tracing } from './Tracing.js';
|
24
|
+
import { Coverage } from './Coverage.js';
|
25
|
+
import { WebWorker } from './WebWorker.js';
|
26
|
+
import { Browser, BrowserContext } from './Browser.js';
|
27
|
+
import { Target } from './Target.js';
|
28
|
+
import { JSHandle, ElementHandle } from './JSHandle.js';
|
29
|
+
import { Viewport } from './PuppeteerViewport.js';
|
30
|
+
import { Credentials, NetworkConditions } from './NetworkManager.js';
|
31
|
+
import { HTTPRequest } from './HTTPRequest.js';
|
32
|
+
import { HTTPResponse } from './HTTPResponse.js';
|
33
|
+
import { Accessibility } from './Accessibility.js';
|
34
|
+
import { FileChooser } from './FileChooser.js';
|
35
|
+
import { ConsoleMessage } from './ConsoleMessage.js';
|
36
|
+
import { PuppeteerLifeCycleEvent } from './LifecycleWatcher.js';
|
37
|
+
import { Protocol } from 'devtools-protocol';
|
38
|
+
import { SerializableOrJSHandle, EvaluateHandleFn, WrapElementHandle, EvaluateFn, EvaluateFnReturnType, UnwrapPromiseLike } from './EvalTypes.js';
|
39
|
+
import { PDFOptions } from './PDFOptions.js';
|
40
|
+
/**
|
41
|
+
* @public
|
42
|
+
*/
|
43
|
+
export interface Metrics {
|
44
|
+
Timestamp?: number;
|
45
|
+
Documents?: number;
|
46
|
+
Frames?: number;
|
47
|
+
JSEventListeners?: number;
|
48
|
+
Nodes?: number;
|
49
|
+
LayoutCount?: number;
|
50
|
+
RecalcStyleCount?: number;
|
51
|
+
LayoutDuration?: number;
|
52
|
+
RecalcStyleDuration?: number;
|
53
|
+
ScriptDuration?: number;
|
54
|
+
TaskDuration?: number;
|
55
|
+
JSHeapUsedSize?: number;
|
56
|
+
JSHeapTotalSize?: number;
|
57
|
+
}
|
58
|
+
/**
|
59
|
+
* @public
|
60
|
+
*/
|
61
|
+
export interface WaitTimeoutOptions {
|
62
|
+
/**
|
63
|
+
* Maximum wait time in milliseconds, defaults to 30 seconds, pass `0` to
|
64
|
+
* disable the timeout.
|
65
|
+
*
|
66
|
+
* @remarks
|
67
|
+
* The default value can be changed by using the
|
68
|
+
* {@link Page.setDefaultTimeout} method.
|
69
|
+
*/
|
70
|
+
timeout?: number;
|
71
|
+
}
|
72
|
+
/**
|
73
|
+
* @public
|
74
|
+
*/
|
75
|
+
export interface WaitForOptions {
|
76
|
+
/**
|
77
|
+
* Maximum wait time in milliseconds, defaults to 30 seconds, pass `0` to
|
78
|
+
* disable the timeout.
|
79
|
+
*
|
80
|
+
* @remarks
|
81
|
+
* The default value can be changed by using the
|
82
|
+
* {@link Page.setDefaultTimeout} or {@link Page.setDefaultNavigationTimeout}
|
83
|
+
* methods.
|
84
|
+
*/
|
85
|
+
timeout?: number;
|
86
|
+
waitUntil?: PuppeteerLifeCycleEvent | PuppeteerLifeCycleEvent[];
|
87
|
+
}
|
88
|
+
/**
|
89
|
+
* @public
|
90
|
+
*/
|
91
|
+
export interface GeolocationOptions {
|
92
|
+
/**
|
93
|
+
* Latitude between -90 and 90.
|
94
|
+
*/
|
95
|
+
longitude: number;
|
96
|
+
/**
|
97
|
+
* Longitude between -180 and 180.
|
98
|
+
*/
|
99
|
+
latitude: number;
|
100
|
+
/**
|
101
|
+
* Optional non-negative accuracy value.
|
102
|
+
*/
|
103
|
+
accuracy?: number;
|
104
|
+
}
|
105
|
+
/**
|
106
|
+
* @public
|
107
|
+
*/
|
108
|
+
export interface MediaFeature {
|
109
|
+
name: string;
|
110
|
+
value: string;
|
111
|
+
}
|
112
|
+
/**
|
113
|
+
* @public
|
114
|
+
*/
|
115
|
+
export interface ScreenshotClip {
|
116
|
+
x: number;
|
117
|
+
y: number;
|
118
|
+
width: number;
|
119
|
+
height: number;
|
120
|
+
}
|
121
|
+
/**
|
122
|
+
* @public
|
123
|
+
*/
|
124
|
+
export interface ScreenshotOptions {
|
125
|
+
/**
|
126
|
+
* @defaultValue 'png'
|
127
|
+
*/
|
128
|
+
type?: 'png' | 'jpeg';
|
129
|
+
/**
|
130
|
+
* The file path to save the image to. The screenshot type will be inferred
|
131
|
+
* from file extension. If path is a relative path, then it is resolved
|
132
|
+
* relative to current working directory. If no path is provided, the image
|
133
|
+
* won't be saved to the disk.
|
134
|
+
*/
|
135
|
+
path?: string;
|
136
|
+
/**
|
137
|
+
* When true, takes a screenshot of the full page.
|
138
|
+
* @defaultValue false
|
139
|
+
*/
|
140
|
+
fullPage?: boolean;
|
141
|
+
/**
|
142
|
+
* An object which specifies the clipping region of the page.
|
143
|
+
*/
|
144
|
+
clip?: ScreenshotClip;
|
145
|
+
/**
|
146
|
+
* Quality of the image, between 0-100. Not applicable to `png` images.
|
147
|
+
*/
|
148
|
+
quality?: number;
|
149
|
+
/**
|
150
|
+
* Hides default white background and allows capturing screenshots with transparency.
|
151
|
+
* @defaultValue false
|
152
|
+
*/
|
153
|
+
omitBackground?: boolean;
|
154
|
+
/**
|
155
|
+
* Encoding of the image.
|
156
|
+
* @defaultValue 'binary'
|
157
|
+
*/
|
158
|
+
encoding?: 'base64' | 'binary';
|
159
|
+
/**
|
160
|
+
* If you need a screenshot bigger than the Viewport
|
161
|
+
* @defaultValue true
|
162
|
+
*/
|
163
|
+
captureBeyondViewport?: boolean;
|
164
|
+
}
|
165
|
+
/**
|
166
|
+
* All the events that a page instance may emit.
|
167
|
+
*
|
168
|
+
* @public
|
169
|
+
*/
|
170
|
+
export declare const enum PageEmittedEvents {
|
171
|
+
/** Emitted when the page closes. */
|
172
|
+
Close = "close",
|
173
|
+
/**
|
174
|
+
* Emitted when JavaScript within the page calls one of console API methods,
|
175
|
+
* e.g. `console.log` or `console.dir`. Also emitted if the page throws an
|
176
|
+
* error or a warning.
|
177
|
+
*
|
178
|
+
* @remarks
|
179
|
+
*
|
180
|
+
* A `console` event provides a {@link ConsoleMessage} representing the
|
181
|
+
* console message that was logged.
|
182
|
+
*
|
183
|
+
* @example
|
184
|
+
* An example of handling `console` event:
|
185
|
+
* ```js
|
186
|
+
* page.on('console', msg => {
|
187
|
+
* for (let i = 0; i < msg.args().length; ++i)
|
188
|
+
* console.log(`${i}: ${msg.args()[i]}`);
|
189
|
+
* });
|
190
|
+
* page.evaluate(() => console.log('hello', 5, {foo: 'bar'}));
|
191
|
+
* ```
|
192
|
+
*/
|
193
|
+
Console = "console",
|
194
|
+
/**
|
195
|
+
* Emitted when a JavaScript dialog appears, such as `alert`, `prompt`,
|
196
|
+
* `confirm` or `beforeunload`. Puppeteer can respond to the dialog via
|
197
|
+
* {@link Dialog.accept} or {@link Dialog.dismiss}.
|
198
|
+
*/
|
199
|
+
Dialog = "dialog",
|
200
|
+
/**
|
201
|
+
* Emitted when the JavaScript
|
202
|
+
* {@link https://developer.mozilla.org/en-US/docs/Web/Events/DOMContentLoaded | DOMContentLoaded } event is dispatched.
|
203
|
+
*/
|
204
|
+
DOMContentLoaded = "domcontentloaded",
|
205
|
+
/**
|
206
|
+
* Emitted when the page crashes. Will contain an `Error`.
|
207
|
+
*/
|
208
|
+
Error = "error",
|
209
|
+
/** Emitted when a frame is attached. Will contain a {@link Frame}. */
|
210
|
+
FrameAttached = "frameattached",
|
211
|
+
/** Emitted when a frame is detached. Will contain a {@link Frame}. */
|
212
|
+
FrameDetached = "framedetached",
|
213
|
+
/** Emitted when a frame is navigated to a new URL. Will contain a {@link Frame}. */
|
214
|
+
FrameNavigated = "framenavigated",
|
215
|
+
/**
|
216
|
+
* Emitted when the JavaScript
|
217
|
+
* {@link https://developer.mozilla.org/en-US/docs/Web/Events/load | load}
|
218
|
+
* event is dispatched.
|
219
|
+
*/
|
220
|
+
Load = "load",
|
221
|
+
/**
|
222
|
+
* Emitted when the JavaScript code makes a call to `console.timeStamp`. For
|
223
|
+
* the list of metrics see {@link Page.metrics | page.metrics}.
|
224
|
+
*
|
225
|
+
* @remarks
|
226
|
+
* Contains an object with two properties:
|
227
|
+
* - `title`: the title passed to `console.timeStamp`
|
228
|
+
* - `metrics`: objec containing metrics as key/value pairs. The values will
|
229
|
+
* be `number`s.
|
230
|
+
*/
|
231
|
+
Metrics = "metrics",
|
232
|
+
/**
|
233
|
+
* Emitted when an uncaught exception happens within the page.
|
234
|
+
* Contains an `Error`.
|
235
|
+
*/
|
236
|
+
PageError = "pageerror",
|
237
|
+
/**
|
238
|
+
* Emitted when the page opens a new tab or window.
|
239
|
+
*
|
240
|
+
* Contains a {@link Page} corresponding to the popup window.
|
241
|
+
*
|
242
|
+
* @example
|
243
|
+
*
|
244
|
+
* ```js
|
245
|
+
* const [popup] = await Promise.all([
|
246
|
+
* new Promise(resolve => page.once('popup', resolve)),
|
247
|
+
* page.click('a[target=_blank]'),
|
248
|
+
* ]);
|
249
|
+
* ```
|
250
|
+
*
|
251
|
+
* ```js
|
252
|
+
* const [popup] = await Promise.all([
|
253
|
+
* new Promise(resolve => page.once('popup', resolve)),
|
254
|
+
* page.evaluate(() => window.open('https://example.com')),
|
255
|
+
* ]);
|
256
|
+
* ```
|
257
|
+
*/
|
258
|
+
Popup = "popup",
|
259
|
+
/**
|
260
|
+
* Emitted when a page issues a request and contains a {@link HTTPRequest}.
|
261
|
+
*
|
262
|
+
* @remarks
|
263
|
+
* The object is readonly. See {@link Page.setRequestInterception} for intercepting
|
264
|
+
* and mutating requests.
|
265
|
+
*/
|
266
|
+
Request = "request",
|
267
|
+
/**
|
268
|
+
* Emitted when a request ended up loading from cache. Contains a {@link HTTPRequest}.
|
269
|
+
*
|
270
|
+
* @remarks
|
271
|
+
* For certain requests, might contain undefined.
|
272
|
+
* {@link https://crbug.com/750469}
|
273
|
+
*/
|
274
|
+
RequestServedFromCache = "requestservedfromcache",
|
275
|
+
/**
|
276
|
+
* Emitted when a request fails, for example by timing out.
|
277
|
+
*
|
278
|
+
* Contains a {@link HTTPRequest}.
|
279
|
+
*
|
280
|
+
* @remarks
|
281
|
+
*
|
282
|
+
* NOTE: HTTP Error responses, such as 404 or 503, are still successful
|
283
|
+
* responses from HTTP standpoint, so request will complete with
|
284
|
+
* `requestfinished` event and not with `requestfailed`.
|
285
|
+
*/
|
286
|
+
RequestFailed = "requestfailed",
|
287
|
+
/**
|
288
|
+
* Emitted when a request finishes successfully. Contains a {@link HTTPRequest}.
|
289
|
+
*/
|
290
|
+
RequestFinished = "requestfinished",
|
291
|
+
/**
|
292
|
+
* Emitted when a response is received. Contains a {@link HTTPResponse}.
|
293
|
+
*/
|
294
|
+
Response = "response",
|
295
|
+
/**
|
296
|
+
* Emitted when a dedicated
|
297
|
+
* {@link https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API | WebWorker}
|
298
|
+
* is spawned by the page.
|
299
|
+
*/
|
300
|
+
WorkerCreated = "workercreated",
|
301
|
+
/**
|
302
|
+
* Emitted when a dedicated
|
303
|
+
* {@link https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API | WebWorker}
|
304
|
+
* is destroyed by the page.
|
305
|
+
*/
|
306
|
+
WorkerDestroyed = "workerdestroyed"
|
307
|
+
}
|
308
|
+
/**
|
309
|
+
* Denotes the objects received by callback functions for page events.
|
310
|
+
*
|
311
|
+
* See {@link PageEmittedEvents} for more detail on the events and when they are
|
312
|
+
* emitted.
|
313
|
+
* @public
|
314
|
+
*/
|
315
|
+
export interface PageEventObject {
|
316
|
+
close: never;
|
317
|
+
console: ConsoleMessage;
|
318
|
+
dialog: Dialog;
|
319
|
+
domcontentloaded: never;
|
320
|
+
error: Error;
|
321
|
+
frameattached: Frame;
|
322
|
+
framedetached: Frame;
|
323
|
+
framenavigated: Frame;
|
324
|
+
load: never;
|
325
|
+
metrics: {
|
326
|
+
title: string;
|
327
|
+
metrics: Metrics;
|
328
|
+
};
|
329
|
+
pageerror: Error;
|
330
|
+
popup: Page;
|
331
|
+
request: HTTPRequest;
|
332
|
+
response: HTTPResponse;
|
333
|
+
requestfailed: HTTPRequest;
|
334
|
+
requestfinished: HTTPRequest;
|
335
|
+
requestservedfromcache: HTTPRequest;
|
336
|
+
workercreated: WebWorker;
|
337
|
+
workerdestroyed: WebWorker;
|
338
|
+
}
|
339
|
+
/**
|
340
|
+
* Page provides methods to interact with a single tab or
|
341
|
+
* {@link https://developer.chrome.com/extensions/background_pages | extension background page} in Chromium.
|
342
|
+
*
|
343
|
+
* @remarks
|
344
|
+
*
|
345
|
+
* One Browser instance might have multiple Page instances.
|
346
|
+
*
|
347
|
+
* @example
|
348
|
+
* This example creates a page, navigates it to a URL, and then * saves a screenshot:
|
349
|
+
* ```js
|
350
|
+
* const puppeteer = require('puppeteer');
|
351
|
+
*
|
352
|
+
* (async () => {
|
353
|
+
* const browser = await puppeteer.launch();
|
354
|
+
* const page = await browser.newPage();
|
355
|
+
* await page.goto('https://example.com');
|
356
|
+
* await page.screenshot({path: 'screenshot.png'});
|
357
|
+
* await browser.close();
|
358
|
+
* })();
|
359
|
+
* ```
|
360
|
+
*
|
361
|
+
* The Page class extends from Puppeteer's {@link EventEmitter} class and will
|
362
|
+
* emit various events which are documented in the {@link PageEmittedEvents} enum.
|
363
|
+
*
|
364
|
+
* @example
|
365
|
+
* This example logs a message for a single page `load` event:
|
366
|
+
* ```js
|
367
|
+
* page.once('load', () => console.log('Page loaded!'));
|
368
|
+
* ```
|
369
|
+
*
|
370
|
+
* To unsubscribe from events use the `off` method:
|
371
|
+
*
|
372
|
+
* ```js
|
373
|
+
* function logRequest(interceptedRequest) {
|
374
|
+
* console.log('A request was made:', interceptedRequest.url());
|
375
|
+
* }
|
376
|
+
* page.on('request', logRequest);
|
377
|
+
* // Sometime later...
|
378
|
+
* page.off('request', logRequest);
|
379
|
+
* ```
|
380
|
+
* @public
|
381
|
+
*/
|
382
|
+
export declare class Page extends EventEmitter {
|
383
|
+
/**
|
384
|
+
* @internal
|
385
|
+
*/
|
386
|
+
static create(client: CDPSession, target: Target, ignoreHTTPSErrors: boolean, defaultViewport: Viewport | null): Promise<Page>;
|
387
|
+
private _closed;
|
388
|
+
private _client;
|
389
|
+
private _target;
|
390
|
+
private _keyboard;
|
391
|
+
private _mouse;
|
392
|
+
private _timeoutSettings;
|
393
|
+
private _touchscreen;
|
394
|
+
private _accessibility;
|
395
|
+
private _frameManager;
|
396
|
+
private _emulationManager;
|
397
|
+
private _tracing;
|
398
|
+
private _pageBindings;
|
399
|
+
private _coverage;
|
400
|
+
private _javascriptEnabled;
|
401
|
+
private _viewport;
|
402
|
+
private _screenshotTaskQueue;
|
403
|
+
private _workers;
|
404
|
+
private _fileChooserInterceptors;
|
405
|
+
private _disconnectPromise?;
|
406
|
+
private _userDragInterceptionEnabled;
|
407
|
+
/**
|
408
|
+
* @internal
|
409
|
+
*/
|
410
|
+
constructor(client: CDPSession, target: Target, ignoreHTTPSErrors: boolean);
|
411
|
+
private _initialize;
|
412
|
+
private _onFileChooser;
|
413
|
+
/**
|
414
|
+
* @returns `true` if drag events are being intercepted, `false` otherwise.
|
415
|
+
*/
|
416
|
+
isDragInterceptionEnabled(): boolean;
|
417
|
+
/**
|
418
|
+
* @returns `true` if the page has JavaScript enabled, `false` otherwise.
|
419
|
+
*/
|
420
|
+
isJavaScriptEnabled(): boolean;
|
421
|
+
/**
|
422
|
+
* Listen to page events.
|
423
|
+
*/
|
424
|
+
on<K extends keyof PageEventObject>(eventName: K, handler: (event: PageEventObject[K]) => void): EventEmitter;
|
425
|
+
once<K extends keyof PageEventObject>(eventName: K, handler: (event: PageEventObject[K]) => void): EventEmitter;
|
426
|
+
/**
|
427
|
+
* This method is typically coupled with an action that triggers file
|
428
|
+
* choosing. The following example clicks a button that issues a file chooser
|
429
|
+
* and then responds with `/tmp/myfile.pdf` as if a user has selected this file.
|
430
|
+
*
|
431
|
+
* ```js
|
432
|
+
* const [fileChooser] = await Promise.all([
|
433
|
+
* page.waitForFileChooser(),
|
434
|
+
* page.click('#upload-file-button'),
|
435
|
+
* // some button that triggers file selection
|
436
|
+
* ]);
|
437
|
+
* await fileChooser.accept(['/tmp/myfile.pdf']);
|
438
|
+
* ```
|
439
|
+
*
|
440
|
+
* NOTE: This must be called before the file chooser is launched. It will not
|
441
|
+
* return a currently active file chooser.
|
442
|
+
* @param options - Optional waiting parameters
|
443
|
+
* @returns Resolves after a page requests a file picker.
|
444
|
+
* @remarks
|
445
|
+
* NOTE: In non-headless Chromium, this method results in the native file picker
|
446
|
+
* dialog `not showing up` for the user.
|
447
|
+
*/
|
448
|
+
waitForFileChooser(options?: WaitTimeoutOptions): Promise<FileChooser>;
|
449
|
+
/**
|
450
|
+
* Sets the page's geolocation.
|
451
|
+
* @remarks
|
452
|
+
* NOTE: Consider using {@link BrowserContext.overridePermissions} to grant
|
453
|
+
* permissions for the page to read its geolocation.
|
454
|
+
* @example
|
455
|
+
* ```js
|
456
|
+
* await page.setGeolocation({latitude: 59.95, longitude: 30.31667});
|
457
|
+
* ```
|
458
|
+
*/
|
459
|
+
setGeolocation(options: GeolocationOptions): Promise<void>;
|
460
|
+
/**
|
461
|
+
* @returns A target this page was created from.
|
462
|
+
*/
|
463
|
+
target(): Target;
|
464
|
+
/**
|
465
|
+
* Get the browser the page belongs to.
|
466
|
+
*/
|
467
|
+
browser(): Browser;
|
468
|
+
/**
|
469
|
+
* Get the browser context that the page belongs to.
|
470
|
+
*/
|
471
|
+
browserContext(): BrowserContext;
|
472
|
+
private _onTargetCrashed;
|
473
|
+
private _onLogEntryAdded;
|
474
|
+
/**
|
475
|
+
* @returns The page's main frame.
|
476
|
+
* @remarks
|
477
|
+
* Page is guaranteed to have a main frame which persists during navigations.
|
478
|
+
*/
|
479
|
+
mainFrame(): Frame;
|
480
|
+
get keyboard(): Keyboard;
|
481
|
+
get touchscreen(): Touchscreen;
|
482
|
+
get coverage(): Coverage;
|
483
|
+
get tracing(): Tracing;
|
484
|
+
get accessibility(): Accessibility;
|
485
|
+
/**
|
486
|
+
* @returns An array of all frames attached to the page.
|
487
|
+
*/
|
488
|
+
frames(): Frame[];
|
489
|
+
/**
|
490
|
+
* @returns all of the dedicated
|
491
|
+
* {@link https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API |
|
492
|
+
* WebWorkers}
|
493
|
+
* associated with the page.
|
494
|
+
* @remarks
|
495
|
+
* NOTE: This does not contain ServiceWorkers
|
496
|
+
*/
|
497
|
+
workers(): WebWorker[];
|
498
|
+
/**
|
499
|
+
* @param value - Whether to enable request interception.
|
500
|
+
*
|
501
|
+
* @remarks
|
502
|
+
* Activating request interception enables {@link HTTPRequest.abort},
|
503
|
+
* {@link HTTPRequest.continue} and {@link HTTPRequest.respond} methods. This
|
504
|
+
* provides the capability to modify network requests that are made by a page.
|
505
|
+
*
|
506
|
+
* Once request interception is enabled, every request will stall unless it's
|
507
|
+
* continued, responded or aborted; or completed using the browser cache.
|
508
|
+
*
|
509
|
+
* @example
|
510
|
+
* An example of a naïve request interceptor that aborts all image requests:
|
511
|
+
* ```js
|
512
|
+
* const puppeteer = require('puppeteer');
|
513
|
+
* (async () => {
|
514
|
+
* const browser = await puppeteer.launch();
|
515
|
+
* const page = await browser.newPage();
|
516
|
+
* await page.setRequestInterception(true);
|
517
|
+
* page.on('request', interceptedRequest => {
|
518
|
+
* if (interceptedRequest.url().endsWith('.png') ||
|
519
|
+
* interceptedRequest.url().endsWith('.jpg'))
|
520
|
+
* interceptedRequest.abort();
|
521
|
+
* else
|
522
|
+
* interceptedRequest.continue();
|
523
|
+
* });
|
524
|
+
* await page.goto('https://example.com');
|
525
|
+
* await browser.close();
|
526
|
+
* })();
|
527
|
+
* ```
|
528
|
+
* NOTE: Enabling request interception disables page caching.
|
529
|
+
*/
|
530
|
+
setRequestInterception(value: boolean): Promise<void>;
|
531
|
+
/**
|
532
|
+
* @param enabled - Whether to enable drag interception.
|
533
|
+
*
|
534
|
+
* @remarks
|
535
|
+
* Activating drag interception enables the `Input.drag`,
|
536
|
+
* methods This provides the capability to capture drag events emitted
|
537
|
+
* on the page, which can then be used to simulate drag-and-drop.
|
538
|
+
*/
|
539
|
+
setDragInterception(enabled: boolean): Promise<void>;
|
540
|
+
/**
|
541
|
+
* @param enabled - When `true`, enables offline mode for the page.
|
542
|
+
* @remarks
|
543
|
+
* NOTE: while this method sets the network connection to offline, it does
|
544
|
+
* not change the parameters used in [page.emulateNetworkConditions(networkConditions)]
|
545
|
+
* (#pageemulatenetworkconditionsnetworkconditions)
|
546
|
+
*/
|
547
|
+
setOfflineMode(enabled: boolean): Promise<void>;
|
548
|
+
/**
|
549
|
+
* @param networkConditions - Passing `null` disables network condition emulation.
|
550
|
+
* @example
|
551
|
+
* ```js
|
552
|
+
* const puppeteer = require('puppeteer');
|
553
|
+
* const slow3G = puppeteer.networkConditions['Slow 3G'];
|
554
|
+
*
|
555
|
+
* (async () => {
|
556
|
+
* const browser = await puppeteer.launch();
|
557
|
+
* const page = await browser.newPage();
|
558
|
+
* await page.emulateNetworkConditions(slow3G);
|
559
|
+
* await page.goto('https://www.google.com');
|
560
|
+
* // other actions...
|
561
|
+
* await browser.close();
|
562
|
+
* })();
|
563
|
+
* ```
|
564
|
+
* @remarks
|
565
|
+
* NOTE: This does not affect WebSockets and WebRTC PeerConnections (see
|
566
|
+
* https://crbug.com/563644). To set the page offline, you can use
|
567
|
+
* [page.setOfflineMode(enabled)](#pagesetofflinemodeenabled).
|
568
|
+
*/
|
569
|
+
emulateNetworkConditions(networkConditions: NetworkConditions | null): Promise<void>;
|
570
|
+
/**
|
571
|
+
* This setting will change the default maximum navigation time for the
|
572
|
+
* following methods and related shortcuts:
|
573
|
+
*
|
574
|
+
* - {@link Page.goBack | page.goBack(options)}
|
575
|
+
*
|
576
|
+
* - {@link Page.goForward | page.goForward(options)}
|
577
|
+
*
|
578
|
+
* - {@link Page.goto | page.goto(url,options)}
|
579
|
+
*
|
580
|
+
* - {@link Page.reload | page.reload(options)}
|
581
|
+
*
|
582
|
+
* - {@link Page.setContent | page.setContent(html,options)}
|
583
|
+
*
|
584
|
+
* - {@link Page.waitForNavigation | page.waitForNavigation(options)}
|
585
|
+
* @param timeout - Maximum navigation time in milliseconds.
|
586
|
+
*/
|
587
|
+
setDefaultNavigationTimeout(timeout: number): void;
|
588
|
+
/**
|
589
|
+
* @param timeout - Maximum time in milliseconds.
|
590
|
+
*/
|
591
|
+
setDefaultTimeout(timeout: number): void;
|
592
|
+
/**
|
593
|
+
* Runs `document.querySelector` within the page. If no element matches the
|
594
|
+
* selector, the return value resolves to `null`.
|
595
|
+
*
|
596
|
+
* @remarks
|
597
|
+
* Shortcut for {@link Frame.$ | Page.mainFrame().$(selector) }.
|
598
|
+
*
|
599
|
+
* @param selector - A `selector` to query page for
|
600
|
+
* {@link https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors | selector}
|
601
|
+
* to query page for.
|
602
|
+
*/
|
603
|
+
$<T extends Element = Element>(selector: string): Promise<ElementHandle<T> | null>;
|
604
|
+
/**
|
605
|
+
* @remarks
|
606
|
+
*
|
607
|
+
* The only difference between {@link Page.evaluate | page.evaluate} and
|
608
|
+
* `page.evaluateHandle` is that `evaluateHandle` will return the value
|
609
|
+
* wrapped in an in-page object.
|
610
|
+
*
|
611
|
+
* If the function passed to `page.evaluteHandle` returns a Promise, the
|
612
|
+
* function will wait for the promise to resolve and return its value.
|
613
|
+
*
|
614
|
+
* You can pass a string instead of a function (although functions are
|
615
|
+
* recommended as they are easier to debug and use with TypeScript):
|
616
|
+
*
|
617
|
+
* @example
|
618
|
+
* ```
|
619
|
+
* const aHandle = await page.evaluateHandle('document')
|
620
|
+
* ```
|
621
|
+
*
|
622
|
+
* @example
|
623
|
+
* {@link JSHandle} instances can be passed as arguments to the `pageFunction`:
|
624
|
+
* ```
|
625
|
+
* const aHandle = await page.evaluateHandle(() => document.body);
|
626
|
+
* const resultHandle = await page.evaluateHandle(body => body.innerHTML, aHandle);
|
627
|
+
* console.log(await resultHandle.jsonValue());
|
628
|
+
* await resultHandle.dispose();
|
629
|
+
* ```
|
630
|
+
*
|
631
|
+
* Most of the time this function returns a {@link JSHandle},
|
632
|
+
* but if `pageFunction` returns a reference to an element,
|
633
|
+
* you instead get an {@link ElementHandle} back:
|
634
|
+
*
|
635
|
+
* @example
|
636
|
+
* ```
|
637
|
+
* const button = await page.evaluateHandle(() => document.querySelector('button'));
|
638
|
+
* // can call `click` because `button` is an `ElementHandle`
|
639
|
+
* await button.click();
|
640
|
+
* ```
|
641
|
+
*
|
642
|
+
* The TypeScript definitions assume that `evaluateHandle` returns
|
643
|
+
* a `JSHandle`, but if you know it's going to return an
|
644
|
+
* `ElementHandle`, pass it as the generic argument:
|
645
|
+
*
|
646
|
+
* ```
|
647
|
+
* const button = await page.evaluateHandle<ElementHandle>(...);
|
648
|
+
* ```
|
649
|
+
*
|
650
|
+
* @param pageFunction - a function that is run within the page
|
651
|
+
* @param args - arguments to be passed to the pageFunction
|
652
|
+
*/
|
653
|
+
evaluateHandle<HandlerType extends JSHandle = JSHandle>(pageFunction: EvaluateHandleFn, ...args: SerializableOrJSHandle[]): Promise<HandlerType>;
|
654
|
+
/**
|
655
|
+
* This method iterates the JavaScript heap and finds all objects with the
|
656
|
+
* given prototype.
|
657
|
+
*
|
658
|
+
* @remarks
|
659
|
+
* Shortcut for
|
660
|
+
* {@link ExecutionContext.queryObjects |
|
661
|
+
* page.mainFrame().executionContext().queryObjects(prototypeHandle)}.
|
662
|
+
*
|
663
|
+
* @example
|
664
|
+
*
|
665
|
+
* ```js
|
666
|
+
* // Create a Map object
|
667
|
+
* await page.evaluate(() => window.map = new Map());
|
668
|
+
* // Get a handle to the Map object prototype
|
669
|
+
* const mapPrototype = await page.evaluateHandle(() => Map.prototype);
|
670
|
+
* // Query all map instances into an array
|
671
|
+
* const mapInstances = await page.queryObjects(mapPrototype);
|
672
|
+
* // Count amount of map objects in heap
|
673
|
+
* const count = await page.evaluate(maps => maps.length, mapInstances);
|
674
|
+
* await mapInstances.dispose();
|
675
|
+
* await mapPrototype.dispose();
|
676
|
+
* ```
|
677
|
+
* @param prototypeHandle - a handle to the object prototype.
|
678
|
+
* @returns Promise which resolves to a handle to an array of objects with
|
679
|
+
* this prototype.
|
680
|
+
*/
|
681
|
+
queryObjects(prototypeHandle: JSHandle): Promise<JSHandle>;
|
682
|
+
/**
|
683
|
+
* This method runs `document.querySelector` within the page and passes the
|
684
|
+
* result as the first argument to the `pageFunction`.
|
685
|
+
*
|
686
|
+
* @remarks
|
687
|
+
*
|
688
|
+
* If no element is found matching `selector`, the method will throw an error.
|
689
|
+
*
|
690
|
+
* If `pageFunction` returns a promise `$eval` will wait for the promise to
|
691
|
+
* resolve and then return its value.
|
692
|
+
*
|
693
|
+
* @example
|
694
|
+
*
|
695
|
+
* ```
|
696
|
+
* const searchValue = await page.$eval('#search', el => el.value);
|
697
|
+
* const preloadHref = await page.$eval('link[rel=preload]', el => el.href);
|
698
|
+
* const html = await page.$eval('.main-container', el => el.outerHTML);
|
699
|
+
* ```
|
700
|
+
*
|
701
|
+
* If you are using TypeScript, you may have to provide an explicit type to the
|
702
|
+
* first argument of the `pageFunction`.
|
703
|
+
* By default it is typed as `Element`, but you may need to provide a more
|
704
|
+
* specific sub-type:
|
705
|
+
*
|
706
|
+
* @example
|
707
|
+
*
|
708
|
+
* ```
|
709
|
+
* // if you don't provide HTMLInputElement here, TS will error
|
710
|
+
* // as `value` is not on `Element`
|
711
|
+
* const searchValue = await page.$eval('#search', (el: HTMLInputElement) => el.value);
|
712
|
+
* ```
|
713
|
+
*
|
714
|
+
* The compiler should be able to infer the return type
|
715
|
+
* from the `pageFunction` you provide. If it is unable to, you can use the generic
|
716
|
+
* type to tell the compiler what return type you expect from `$eval`:
|
717
|
+
*
|
718
|
+
* @example
|
719
|
+
*
|
720
|
+
* ```
|
721
|
+
* // The compiler can infer the return type in this case, but if it can't
|
722
|
+
* // or if you want to be more explicit, provide it as the generic type.
|
723
|
+
* const searchValue = await page.$eval<string>(
|
724
|
+
* '#search', (el: HTMLInputElement) => el.value
|
725
|
+
* );
|
726
|
+
* ```
|
727
|
+
*
|
728
|
+
* @param selector - the
|
729
|
+
* {@link https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors | selector}
|
730
|
+
* to query for
|
731
|
+
* @param pageFunction - the function to be evaluated in the page context.
|
732
|
+
* Will be passed the result of `document.querySelector(selector)` as its
|
733
|
+
* first argument.
|
734
|
+
* @param args - any additional arguments to pass through to `pageFunction`.
|
735
|
+
*
|
736
|
+
* @returns The result of calling `pageFunction`. If it returns an element it
|
737
|
+
* is wrapped in an {@link ElementHandle}, else the raw value itself is
|
738
|
+
* returned.
|
739
|
+
*/
|
740
|
+
$eval<ReturnType>(selector: string, pageFunction: (element: Element, ...args: unknown[]) => ReturnType | Promise<ReturnType>, ...args: SerializableOrJSHandle[]): Promise<WrapElementHandle<ReturnType>>;
|
741
|
+
/**
|
742
|
+
* This method runs `Array.from(document.querySelectorAll(selector))` within
|
743
|
+
* the page and passes the result as the first argument to the `pageFunction`.
|
744
|
+
*
|
745
|
+
* @remarks
|
746
|
+
*
|
747
|
+
* If `pageFunction` returns a promise `$$eval` will wait for the promise to
|
748
|
+
* resolve and then return its value.
|
749
|
+
*
|
750
|
+
* @example
|
751
|
+
*
|
752
|
+
* ```
|
753
|
+
* // get the amount of divs on the page
|
754
|
+
* const divCount = await page.$$eval('div', divs => divs.length);
|
755
|
+
*
|
756
|
+
* // get the text content of all the `.options` elements:
|
757
|
+
* const options = await page.$$eval('div > span.options', options => {
|
758
|
+
* return options.map(option => option.textContent)
|
759
|
+
* });
|
760
|
+
* ```
|
761
|
+
*
|
762
|
+
* If you are using TypeScript, you may have to provide an explicit type to the
|
763
|
+
* first argument of the `pageFunction`.
|
764
|
+
* By default it is typed as `Element[]`, but you may need to provide a more
|
765
|
+
* specific sub-type:
|
766
|
+
*
|
767
|
+
* @example
|
768
|
+
*
|
769
|
+
* ```
|
770
|
+
* // if you don't provide HTMLInputElement here, TS will error
|
771
|
+
* // as `value` is not on `Element`
|
772
|
+
* await page.$$eval('input', (elements: HTMLInputElement[]) => {
|
773
|
+
* return elements.map(e => e.value);
|
774
|
+
* });
|
775
|
+
* ```
|
776
|
+
*
|
777
|
+
* The compiler should be able to infer the return type
|
778
|
+
* from the `pageFunction` you provide. If it is unable to, you can use the generic
|
779
|
+
* type to tell the compiler what return type you expect from `$$eval`:
|
780
|
+
*
|
781
|
+
* @example
|
782
|
+
*
|
783
|
+
* ```
|
784
|
+
* // The compiler can infer the return type in this case, but if it can't
|
785
|
+
* // or if you want to be more explicit, provide it as the generic type.
|
786
|
+
* const allInputValues = await page.$$eval<string[]>(
|
787
|
+
* 'input', (elements: HTMLInputElement[]) => elements.map(e => e.textContent)
|
788
|
+
* );
|
789
|
+
* ```
|
790
|
+
*
|
791
|
+
* @param selector - the
|
792
|
+
* {@link https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors | selector}
|
793
|
+
* to query for
|
794
|
+
* @param pageFunction - the function to be evaluated in the page context. Will
|
795
|
+
* be passed the result of `Array.from(document.querySelectorAll(selector))`
|
796
|
+
* as its first argument.
|
797
|
+
* @param args - any additional arguments to pass through to `pageFunction`.
|
798
|
+
*
|
799
|
+
* @returns The result of calling `pageFunction`. If it returns an element it
|
800
|
+
* is wrapped in an {@link ElementHandle}, else the raw value itself is
|
801
|
+
* returned.
|
802
|
+
*/
|
803
|
+
$$eval<ReturnType>(selector: string, pageFunction: (elements: Element[], ...args: unknown[]) => ReturnType | Promise<ReturnType>, ...args: SerializableOrJSHandle[]): Promise<WrapElementHandle<ReturnType>>;
|
804
|
+
/**
|
805
|
+
* The method runs `document.querySelectorAll` within the page. If no elements
|
806
|
+
* match the selector, the return value resolves to `[]`.
|
807
|
+
* @remarks
|
808
|
+
* Shortcut for {@link Frame.$$ | Page.mainFrame().$$(selector) }.
|
809
|
+
* @param selector - A `selector` to query page for
|
810
|
+
*/
|
811
|
+
$$<T extends Element = Element>(selector: string): Promise<Array<ElementHandle<T>>>;
|
812
|
+
/**
|
813
|
+
* The method evaluates the XPath expression relative to the page document as
|
814
|
+
* its context node. If there are no such elements, the method resolves to an
|
815
|
+
* empty array.
|
816
|
+
* @remarks
|
817
|
+
* Shortcut for {@link Frame.$x | Page.mainFrame().$x(expression) }.
|
818
|
+
* @param expression - Expression to evaluate
|
819
|
+
*/
|
820
|
+
$x(expression: string): Promise<ElementHandle[]>;
|
821
|
+
/**
|
822
|
+
* If no URLs are specified, this method returns cookies for the current page
|
823
|
+
* URL. If URLs are specified, only cookies for those URLs are returned.
|
824
|
+
*/
|
825
|
+
cookies(...urls: string[]): Promise<Protocol.Network.Cookie[]>;
|
826
|
+
deleteCookie(...cookies: Protocol.Network.DeleteCookiesRequest[]): Promise<void>;
|
827
|
+
/**
|
828
|
+
* @example
|
829
|
+
* ```js
|
830
|
+
* await page.setCookie(cookieObject1, cookieObject2);
|
831
|
+
* ```
|
832
|
+
*/
|
833
|
+
setCookie(...cookies: Protocol.Network.CookieParam[]): Promise<void>;
|
834
|
+
/**
|
835
|
+
* Adds a `<script>` tag into the page with the desired URL or content.
|
836
|
+
* @remarks
|
837
|
+
* Shortcut for {@link Frame.addScriptTag | page.mainFrame().addScriptTag(options) }.
|
838
|
+
* @returns Promise which resolves to the added tag when the script's onload fires or
|
839
|
+
* when the script content was injected into frame.
|
840
|
+
*/
|
841
|
+
addScriptTag(options: {
|
842
|
+
url?: string;
|
843
|
+
path?: string;
|
844
|
+
content?: string;
|
845
|
+
type?: string;
|
846
|
+
}): Promise<ElementHandle>;
|
847
|
+
/**
|
848
|
+
* Adds a `<link rel="stylesheet">` tag into the page with the desired URL or a
|
849
|
+
* `<style type="text/css">` tag with the content.
|
850
|
+
* @returns Promise which resolves to the added tag when the stylesheet's
|
851
|
+
* onload fires or when the CSS content was injected into frame.
|
852
|
+
*/
|
853
|
+
addStyleTag(options: {
|
854
|
+
url?: string;
|
855
|
+
path?: string;
|
856
|
+
content?: string;
|
857
|
+
}): Promise<ElementHandle>;
|
858
|
+
/**
|
859
|
+
* The method adds a function called `name` on the page's `window` object. When
|
860
|
+
* called, the function executes `puppeteerFunction` in node.js and returns a
|
861
|
+
* `Promise` which resolves to the return value of `puppeteerFunction`.
|
862
|
+
*
|
863
|
+
* If the puppeteerFunction returns a `Promise`, it will be awaited.
|
864
|
+
*
|
865
|
+
* NOTE: Functions installed via `page.exposeFunction` survive navigations.
|
866
|
+
* @param name - Name of the function on the window object
|
867
|
+
* @param puppeteerFunction - Callback function which will be called in
|
868
|
+
* Puppeteer's context.
|
869
|
+
* @example
|
870
|
+
* An example of adding an `md5` function into the page:
|
871
|
+
* ```js
|
872
|
+
* const puppeteer = require('puppeteer');
|
873
|
+
* const crypto = require('crypto');
|
874
|
+
*
|
875
|
+
* (async () => {
|
876
|
+
* const browser = await puppeteer.launch();
|
877
|
+
* const page = await browser.newPage();
|
878
|
+
* page.on('console', (msg) => console.log(msg.text()));
|
879
|
+
* await page.exposeFunction('md5', (text) =>
|
880
|
+
* crypto.createHash('md5').update(text).digest('hex')
|
881
|
+
* );
|
882
|
+
* await page.evaluate(async () => {
|
883
|
+
* // use window.md5 to compute hashes
|
884
|
+
* const myString = 'PUPPETEER';
|
885
|
+
* const myHash = await window.md5(myString);
|
886
|
+
* console.log(`md5 of ${myString} is ${myHash}`);
|
887
|
+
* });
|
888
|
+
* await browser.close();
|
889
|
+
* })();
|
890
|
+
* ```
|
891
|
+
* An example of adding a `window.readfile` function into the page:
|
892
|
+
* ```js
|
893
|
+
* const puppeteer = require('puppeteer');
|
894
|
+
* const fs = require('fs');
|
895
|
+
*
|
896
|
+
* (async () => {
|
897
|
+
* const browser = await puppeteer.launch();
|
898
|
+
* const page = await browser.newPage();
|
899
|
+
* page.on('console', (msg) => console.log(msg.text()));
|
900
|
+
* await page.exposeFunction('readfile', async (filePath) => {
|
901
|
+
* return new Promise((resolve, reject) => {
|
902
|
+
* fs.readFile(filePath, 'utf8', (err, text) => {
|
903
|
+
* if (err) reject(err);
|
904
|
+
* else resolve(text);
|
905
|
+
* });
|
906
|
+
* });
|
907
|
+
* });
|
908
|
+
* await page.evaluate(async () => {
|
909
|
+
* // use window.readfile to read contents of a file
|
910
|
+
* const content = await window.readfile('/etc/hosts');
|
911
|
+
* console.log(content);
|
912
|
+
* });
|
913
|
+
* await browser.close();
|
914
|
+
* })();
|
915
|
+
* ```
|
916
|
+
*/
|
917
|
+
exposeFunction(name: string, puppeteerFunction: Function): Promise<void>;
|
918
|
+
/**
|
919
|
+
* Provide credentials for `HTTP authentication`.
|
920
|
+
* @remarks To disable authentication, pass `null`.
|
921
|
+
*/
|
922
|
+
authenticate(credentials: Credentials): Promise<void>;
|
923
|
+
/**
|
924
|
+
* The extra HTTP headers will be sent with every request the page initiates.
|
925
|
+
* NOTE: All HTTP header names are lowercased. (HTTP headers are
|
926
|
+
* case-insensitive, so this shouldn’t impact your server code.)
|
927
|
+
* NOTE: page.setExtraHTTPHeaders does not guarantee the order of headers in
|
928
|
+
* the outgoing requests.
|
929
|
+
* @param headers - An object containing additional HTTP headers to be sent
|
930
|
+
* with every request. All header values must be strings.
|
931
|
+
* @returns
|
932
|
+
*/
|
933
|
+
setExtraHTTPHeaders(headers: Record<string, string>): Promise<void>;
|
934
|
+
/**
|
935
|
+
* @param userAgent - Specific user agent to use in this page
|
936
|
+
* @param userAgentData - Specific user agent client hint data to use in this
|
937
|
+
* page
|
938
|
+
* @returns Promise which resolves when the user agent is set.
|
939
|
+
*/
|
940
|
+
setUserAgent(userAgent: string, userAgentMetadata?: Protocol.Emulation.UserAgentMetadata): Promise<void>;
|
941
|
+
/**
|
942
|
+
* @returns Object containing metrics as key/value pairs.
|
943
|
+
*
|
944
|
+
* - `Timestamp` : The timestamp when the metrics sample was taken.
|
945
|
+
*
|
946
|
+
* - `Documents` : Number of documents in the page.
|
947
|
+
*
|
948
|
+
* - `Frames` : Number of frames in the page.
|
949
|
+
*
|
950
|
+
* - `JSEventListeners` : Number of events in the page.
|
951
|
+
*
|
952
|
+
* - `Nodes` : Number of DOM nodes in the page.
|
953
|
+
*
|
954
|
+
* - `LayoutCount` : Total number of full or partial page layout.
|
955
|
+
*
|
956
|
+
* - `RecalcStyleCount` : Total number of page style recalculations.
|
957
|
+
*
|
958
|
+
* - `LayoutDuration` : Combined durations of all page layouts.
|
959
|
+
*
|
960
|
+
* - `RecalcStyleDuration` : Combined duration of all page style
|
961
|
+
* recalculations.
|
962
|
+
*
|
963
|
+
* - `ScriptDuration` : Combined duration of JavaScript execution.
|
964
|
+
*
|
965
|
+
* - `TaskDuration` : Combined duration of all tasks performed by the browser.
|
966
|
+
*
|
967
|
+
*
|
968
|
+
* - `JSHeapUsedSize` : Used JavaScript heap size.
|
969
|
+
*
|
970
|
+
* - `JSHeapTotalSize` : Total JavaScript heap size.
|
971
|
+
* @remarks
|
972
|
+
* NOTE: All timestamps are in monotonic time: monotonically increasing time
|
973
|
+
* in seconds since an arbitrary point in the past.
|
974
|
+
*/
|
975
|
+
metrics(): Promise<Metrics>;
|
976
|
+
private _emitMetrics;
|
977
|
+
private _buildMetricsObject;
|
978
|
+
private _handleException;
|
979
|
+
private _onConsoleAPI;
|
980
|
+
private _onBindingCalled;
|
981
|
+
private _addConsoleMessage;
|
982
|
+
private _onDialog;
|
983
|
+
/**
|
984
|
+
* Resets default white background
|
985
|
+
*/
|
986
|
+
private _resetDefaultBackgroundColor;
|
987
|
+
/**
|
988
|
+
* Hides default white background
|
989
|
+
*/
|
990
|
+
private _setTransparentBackgroundColor;
|
991
|
+
/**
|
992
|
+
*
|
993
|
+
* @returns
|
994
|
+
* @remarks Shortcut for
|
995
|
+
* {@link Frame.url | page.mainFrame().url()}.
|
996
|
+
*/
|
997
|
+
url(): string;
|
998
|
+
content(): Promise<string>;
|
999
|
+
/**
|
1000
|
+
* @param html - HTML markup to assign to the page.
|
1001
|
+
* @param options - Parameters that has some properties.
|
1002
|
+
* @remarks
|
1003
|
+
* The parameter `options` might have the following options.
|
1004
|
+
*
|
1005
|
+
* - `timeout` : Maximum time in milliseconds for resources to load, defaults
|
1006
|
+
* to 30 seconds, pass `0` to disable timeout. The default value can be
|
1007
|
+
* changed by using the
|
1008
|
+
* {@link Page.setDefaultNavigationTimeout |
|
1009
|
+
* page.setDefaultNavigationTimeout(timeout)}
|
1010
|
+
* or {@link Page.setDefaultTimeout | page.setDefaultTimeout(timeout)}
|
1011
|
+
* methods.
|
1012
|
+
*
|
1013
|
+
* - `waitUntil`: When to consider setting markup succeeded, defaults to `load`.
|
1014
|
+
* Given an array of event strings, setting content is considered to be
|
1015
|
+
* successful after all events have been fired. Events can be either:<br/>
|
1016
|
+
* - `load` : consider setting content to be finished when the `load` event is
|
1017
|
+
* fired.<br/>
|
1018
|
+
* - `domcontentloaded` : consider setting content to be finished when the
|
1019
|
+
* `DOMContentLoaded` event is fired.<br/>
|
1020
|
+
* - `networkidle0` : consider setting content to be finished when there are no
|
1021
|
+
* more than 0 network connections for at least `500` ms.<br/>
|
1022
|
+
* - `networkidle2` : consider setting content to be finished when there are no
|
1023
|
+
* more than 2 network connections for at least `500` ms.
|
1024
|
+
*/
|
1025
|
+
setContent(html: string, options?: WaitForOptions): Promise<void>;
|
1026
|
+
/**
|
1027
|
+
* @param url - URL to navigate page to. The URL should include scheme, e.g.
|
1028
|
+
* `https://`
|
1029
|
+
* @param options - Navigation Parameter
|
1030
|
+
* @returns Promise which resolves to the main resource response. In case of
|
1031
|
+
* multiple redirects, the navigation will resolve with the response of the
|
1032
|
+
* last redirect.
|
1033
|
+
* @remarks
|
1034
|
+
* The argument `options` might have the following properties:
|
1035
|
+
*
|
1036
|
+
* - `timeout` : Maximum navigation time in milliseconds, defaults to 30
|
1037
|
+
* seconds, pass 0 to disable timeout. The default value can be changed by
|
1038
|
+
* using the
|
1039
|
+
* {@link Page.setDefaultNavigationTimeout |
|
1040
|
+
* page.setDefaultNavigationTimeout(timeout)}
|
1041
|
+
* or {@link Page.setDefaultTimeout | page.setDefaultTimeout(timeout)}
|
1042
|
+
* methods.
|
1043
|
+
*
|
1044
|
+
* - `waitUntil`:When to consider navigation succeeded, defaults to `load`.
|
1045
|
+
* Given an array of event strings, navigation is considered to be successful
|
1046
|
+
* after all events have been fired. Events can be either:<br/>
|
1047
|
+
* - `load` : consider navigation to be finished when the load event is
|
1048
|
+
* fired.<br/>
|
1049
|
+
* - `domcontentloaded` : consider navigation to be finished when the
|
1050
|
+
* DOMContentLoaded event is fired.<br/>
|
1051
|
+
* - `networkidle0` : consider navigation to be finished when there are no
|
1052
|
+
* more than 0 network connections for at least `500` ms.<br/>
|
1053
|
+
* - `networkidle2` : consider navigation to be finished when there are no
|
1054
|
+
* more than 2 network connections for at least `500` ms.
|
1055
|
+
*
|
1056
|
+
* - `referer` : Referer header value. If provided it will take preference
|
1057
|
+
* over the referer header value set by
|
1058
|
+
* {@link Page.setExtraHTTPHeaders |page.setExtraHTTPHeaders()}.
|
1059
|
+
*
|
1060
|
+
* `page.goto` will throw an error if:
|
1061
|
+
* - there's an SSL error (e.g. in case of self-signed certificates).
|
1062
|
+
* - target URL is invalid.
|
1063
|
+
* - the timeout is exceeded during navigation.
|
1064
|
+
* - the remote server does not respond or is unreachable.
|
1065
|
+
* - the main resource failed to load.
|
1066
|
+
*
|
1067
|
+
* `page.goto` will not throw an error when any valid HTTP status code is
|
1068
|
+
* returned by the remote server, including 404 "Not Found" and 500
|
1069
|
+
* "Internal Server Error". The status code for such responses can be
|
1070
|
+
* retrieved by calling response.status().
|
1071
|
+
*
|
1072
|
+
* NOTE: `page.goto` either throws an error or returns a main resource
|
1073
|
+
* response. The only exceptions are navigation to about:blank or navigation
|
1074
|
+
* to the same URL with a different hash, which would succeed and return null.
|
1075
|
+
*
|
1076
|
+
* NOTE: Headless mode doesn't support navigation to a PDF document. See the
|
1077
|
+
* {@link https://bugs.chromium.org/p/chromium/issues/detail?id=761295
|
1078
|
+
* | upstream issue}.
|
1079
|
+
*
|
1080
|
+
* Shortcut for {@link Frame.goto | page.mainFrame().goto(url, options)}.
|
1081
|
+
*/
|
1082
|
+
goto(url: string, options?: WaitForOptions & {
|
1083
|
+
referer?: string;
|
1084
|
+
}): Promise<HTTPResponse>;
|
1085
|
+
/**
|
1086
|
+
* @param options - Navigation parameters which might have the following
|
1087
|
+
* properties:
|
1088
|
+
* @returns Promise which resolves to the main resource response. In case of
|
1089
|
+
* multiple redirects, the navigation will resolve with the response of the
|
1090
|
+
* last redirect.
|
1091
|
+
* @remarks
|
1092
|
+
* The argument `options` might have the following properties:
|
1093
|
+
*
|
1094
|
+
* - `timeout` : Maximum navigation time in milliseconds, defaults to 30
|
1095
|
+
* seconds, pass 0 to disable timeout. The default value can be changed by
|
1096
|
+
* using the
|
1097
|
+
* {@link Page.setDefaultNavigationTimeout |
|
1098
|
+
* page.setDefaultNavigationTimeout(timeout)}
|
1099
|
+
* or {@link Page.setDefaultTimeout | page.setDefaultTimeout(timeout)}
|
1100
|
+
* methods.
|
1101
|
+
*
|
1102
|
+
* - `waitUntil`: When to consider navigation succeeded, defaults to `load`.
|
1103
|
+
* Given an array of event strings, navigation is considered to be
|
1104
|
+
* successful after all events have been fired. Events can be either:<br/>
|
1105
|
+
* - `load` : consider navigation to be finished when the load event is fired.<br/>
|
1106
|
+
* - `domcontentloaded` : consider navigation to be finished when the
|
1107
|
+
* DOMContentLoaded event is fired.<br/>
|
1108
|
+
* - `networkidle0` : consider navigation to be finished when there are no
|
1109
|
+
* more than 0 network connections for at least `500` ms.<br/>
|
1110
|
+
* - `networkidle2` : consider navigation to be finished when there are no
|
1111
|
+
* more than 2 network connections for at least `500` ms.
|
1112
|
+
*/
|
1113
|
+
reload(options?: WaitForOptions): Promise<HTTPResponse | null>;
|
1114
|
+
/**
|
1115
|
+
* This resolves when the page navigates to a new URL or reloads. It is useful
|
1116
|
+
* when you run code that will indirectly cause the page to navigate. Consider
|
1117
|
+
* this example:
|
1118
|
+
* ```js
|
1119
|
+
* const [response] = await Promise.all([
|
1120
|
+
* page.waitForNavigation(), // The promise resolves after navigation has finished
|
1121
|
+
* page.click('a.my-link'), // Clicking the link will indirectly cause a navigation
|
1122
|
+
* ]);
|
1123
|
+
* ```
|
1124
|
+
*
|
1125
|
+
* @param options - Navigation parameters which might have the following properties:
|
1126
|
+
* @returns Promise which resolves to the main resource response. In case of
|
1127
|
+
* multiple redirects, the navigation will resolve with the response of the
|
1128
|
+
* last redirect. In case of navigation to a different anchor or navigation
|
1129
|
+
* due to History API usage, the navigation will resolve with `null`.
|
1130
|
+
* @remarks
|
1131
|
+
* NOTE: Usage of the
|
1132
|
+
* {@link https://developer.mozilla.org/en-US/docs/Web/API/History_API | History API}
|
1133
|
+
* to change the URL is considered a navigation.
|
1134
|
+
*
|
1135
|
+
* Shortcut for
|
1136
|
+
* {@link Frame.waitForNavigation | page.mainFrame().waitForNavigation(options)}.
|
1137
|
+
*/
|
1138
|
+
waitForNavigation(options?: WaitForOptions): Promise<HTTPResponse | null>;
|
1139
|
+
private _sessionClosePromise;
|
1140
|
+
/**
|
1141
|
+
* @param urlOrPredicate - A URL or predicate to wait for
|
1142
|
+
* @param options - Optional waiting parameters
|
1143
|
+
* @returns Promise which resolves to the matched response
|
1144
|
+
* @example
|
1145
|
+
* ```js
|
1146
|
+
* const firstResponse = await page.waitForResponse(
|
1147
|
+
* 'https://example.com/resource'
|
1148
|
+
* );
|
1149
|
+
* const finalResponse = await page.waitForResponse(
|
1150
|
+
* (response) =>
|
1151
|
+
* response.url() === 'https://example.com' && response.status() === 200
|
1152
|
+
* );
|
1153
|
+
* const finalResponse = await page.waitForResponse(async (response) => {
|
1154
|
+
* return (await response.text()).includes('<html>');
|
1155
|
+
* });
|
1156
|
+
* return finalResponse.ok();
|
1157
|
+
* ```
|
1158
|
+
* @remarks
|
1159
|
+
* Optional Waiting Parameters have:
|
1160
|
+
*
|
1161
|
+
* - `timeout`: Maximum wait time in milliseconds, defaults to `30` seconds, pass
|
1162
|
+
* `0` to disable the timeout. The default value can be changed by using the
|
1163
|
+
* {@link Page.setDefaultTimeout} method.
|
1164
|
+
*/
|
1165
|
+
waitForRequest(urlOrPredicate: string | ((req: HTTPRequest) => boolean | Promise<boolean>), options?: {
|
1166
|
+
timeout?: number;
|
1167
|
+
}): Promise<HTTPRequest>;
|
1168
|
+
/**
|
1169
|
+
* @param urlOrPredicate - A URL or predicate to wait for.
|
1170
|
+
* @param options - Optional waiting parameters
|
1171
|
+
* @returns Promise which resolves to the matched response.
|
1172
|
+
* @example
|
1173
|
+
* ```js
|
1174
|
+
* const firstResponse = await page.waitForResponse(
|
1175
|
+
* 'https://example.com/resource'
|
1176
|
+
* );
|
1177
|
+
* const finalResponse = await page.waitForResponse(
|
1178
|
+
* (response) =>
|
1179
|
+
* response.url() === 'https://example.com' && response.status() === 200
|
1180
|
+
* );
|
1181
|
+
* const finalResponse = await page.waitForResponse(async (response) => {
|
1182
|
+
* return (await response.text()).includes('<html>');
|
1183
|
+
* });
|
1184
|
+
* return finalResponse.ok();
|
1185
|
+
* ```
|
1186
|
+
* @remarks
|
1187
|
+
* Optional Parameter have:
|
1188
|
+
*
|
1189
|
+
* - `timeout`: Maximum wait time in milliseconds, defaults to `30` seconds,
|
1190
|
+
* pass `0` to disable the timeout. The default value can be changed by using
|
1191
|
+
* the {@link Page.setDefaultTimeout} method.
|
1192
|
+
*/
|
1193
|
+
waitForResponse(urlOrPredicate: string | ((res: HTTPResponse) => boolean | Promise<boolean>), options?: {
|
1194
|
+
timeout?: number;
|
1195
|
+
}): Promise<HTTPResponse>;
|
1196
|
+
/**
|
1197
|
+
* This method navigate to the previous page in history.
|
1198
|
+
* @param options - Navigation parameters
|
1199
|
+
* @returns Promise which resolves to the main resource response. In case of
|
1200
|
+
* multiple redirects, the navigation will resolve with the response of the
|
1201
|
+
* last redirect. If can not go back, resolves to `null`.
|
1202
|
+
* @remarks
|
1203
|
+
* The argument `options` might have the following properties:
|
1204
|
+
*
|
1205
|
+
* - `timeout` : Maximum navigation time in milliseconds, defaults to 30
|
1206
|
+
* seconds, pass 0 to disable timeout. The default value can be changed by
|
1207
|
+
* using the
|
1208
|
+
* {@link Page.setDefaultNavigationTimeout
|
1209
|
+
* | page.setDefaultNavigationTimeout(timeout)}
|
1210
|
+
* or {@link Page.setDefaultTimeout | page.setDefaultTimeout(timeout)}
|
1211
|
+
* methods.
|
1212
|
+
*
|
1213
|
+
* - `waitUntil` : When to consider navigation succeeded, defaults to `load`.
|
1214
|
+
* Given an array of event strings, navigation is considered to be
|
1215
|
+
* successful after all events have been fired. Events can be either:<br/>
|
1216
|
+
* - `load` : consider navigation to be finished when the load event is fired.<br/>
|
1217
|
+
* - `domcontentloaded` : consider navigation to be finished when the
|
1218
|
+
* DOMContentLoaded event is fired.<br/>
|
1219
|
+
* - `networkidle0` : consider navigation to be finished when there are no
|
1220
|
+
* more than 0 network connections for at least `500` ms.<br/>
|
1221
|
+
* - `networkidle2` : consider navigation to be finished when there are no
|
1222
|
+
* more than 2 network connections for at least `500` ms.
|
1223
|
+
*/
|
1224
|
+
goBack(options?: WaitForOptions): Promise<HTTPResponse | null>;
|
1225
|
+
/**
|
1226
|
+
* This method navigate to the next page in history.
|
1227
|
+
* @param options - Navigation Parameter
|
1228
|
+
* @returns Promise which resolves to the main resource response. In case of
|
1229
|
+
* multiple redirects, the navigation will resolve with the response of the
|
1230
|
+
* last redirect. If can not go forward, resolves to `null`.
|
1231
|
+
* @remarks
|
1232
|
+
* The argument `options` might have the following properties:
|
1233
|
+
*
|
1234
|
+
* - `timeout` : Maximum navigation time in milliseconds, defaults to 30
|
1235
|
+
* seconds, pass 0 to disable timeout. The default value can be changed by
|
1236
|
+
* using the
|
1237
|
+
* {@link Page.setDefaultNavigationTimeout
|
1238
|
+
* | page.setDefaultNavigationTimeout(timeout)}
|
1239
|
+
* or {@link Page.setDefaultTimeout | page.setDefaultTimeout(timeout)}
|
1240
|
+
* methods.
|
1241
|
+
*
|
1242
|
+
* - `waitUntil`: When to consider navigation succeeded, defaults to `load`.
|
1243
|
+
* Given an array of event strings, navigation is considered to be
|
1244
|
+
* successful after all events have been fired. Events can be either:<br/>
|
1245
|
+
* - `load` : consider navigation to be finished when the load event is fired.<br/>
|
1246
|
+
* - `domcontentloaded` : consider navigation to be finished when the
|
1247
|
+
* DOMContentLoaded event is fired.<br/>
|
1248
|
+
* - `networkidle0` : consider navigation to be finished when there are no
|
1249
|
+
* more than 0 network connections for at least `500` ms.<br/>
|
1250
|
+
* - `networkidle2` : consider navigation to be finished when there are no
|
1251
|
+
* more than 2 network connections for at least `500` ms.
|
1252
|
+
*/
|
1253
|
+
goForward(options?: WaitForOptions): Promise<HTTPResponse | null>;
|
1254
|
+
private _go;
|
1255
|
+
/**
|
1256
|
+
* Brings page to front (activates tab).
|
1257
|
+
*/
|
1258
|
+
bringToFront(): Promise<void>;
|
1259
|
+
/**
|
1260
|
+
* Emulates given device metrics and user agent. This method is a shortcut for
|
1261
|
+
* calling two methods: {@link Page.setUserAgent} and {@link Page.setViewport}
|
1262
|
+
* To aid emulation, Puppeteer provides a list of device descriptors that can
|
1263
|
+
* be obtained via the {@link Puppeteer.devices} `page.emulate` will resize
|
1264
|
+
* the page. A lot of websites don't expect phones to change size, so you
|
1265
|
+
* should emulate before navigating to the page.
|
1266
|
+
* @example
|
1267
|
+
* ```js
|
1268
|
+
* const puppeteer = require('puppeteer');
|
1269
|
+
* const iPhone = puppeteer.devices['iPhone 6'];
|
1270
|
+
* (async () => {
|
1271
|
+
* const browser = await puppeteer.launch();
|
1272
|
+
* const page = await browser.newPage();
|
1273
|
+
* await page.emulate(iPhone);
|
1274
|
+
* await page.goto('https://www.google.com');
|
1275
|
+
* // other actions...
|
1276
|
+
* await browser.close();
|
1277
|
+
* })();
|
1278
|
+
* ```
|
1279
|
+
* @remarks List of all available devices is available in the source code:
|
1280
|
+
* {@link https://github.com/puppeteer/puppeteer/blob/main/src/common/DeviceDescriptors.ts | src/common/DeviceDescriptors.ts}.
|
1281
|
+
*/
|
1282
|
+
emulate(options: {
|
1283
|
+
viewport: Viewport;
|
1284
|
+
userAgent: string;
|
1285
|
+
}): Promise<void>;
|
1286
|
+
/**
|
1287
|
+
* @param enabled - Whether or not to enable JavaScript on the page.
|
1288
|
+
* @returns
|
1289
|
+
* @remarks
|
1290
|
+
* NOTE: changing this value won't affect scripts that have already been run.
|
1291
|
+
* It will take full effect on the next navigation.
|
1292
|
+
*/
|
1293
|
+
setJavaScriptEnabled(enabled: boolean): Promise<void>;
|
1294
|
+
/**
|
1295
|
+
* Toggles bypassing page's Content-Security-Policy.
|
1296
|
+
* @param enabled - sets bypassing of page's Content-Security-Policy.
|
1297
|
+
* @remarks
|
1298
|
+
* NOTE: CSP bypassing happens at the moment of CSP initialization rather than
|
1299
|
+
* evaluation. Usually, this means that `page.setBypassCSP` should be called
|
1300
|
+
* before navigating to the domain.
|
1301
|
+
*/
|
1302
|
+
setBypassCSP(enabled: boolean): Promise<void>;
|
1303
|
+
/**
|
1304
|
+
* @param type - Changes the CSS media type of the page. The only allowed
|
1305
|
+
* values are `screen`, `print` and `null`. Passing `null` disables CSS media
|
1306
|
+
* emulation.
|
1307
|
+
* @example
|
1308
|
+
* ```
|
1309
|
+
* await page.evaluate(() => matchMedia('screen').matches);
|
1310
|
+
* // → true
|
1311
|
+
* await page.evaluate(() => matchMedia('print').matches);
|
1312
|
+
* // → false
|
1313
|
+
*
|
1314
|
+
* await page.emulateMediaType('print');
|
1315
|
+
* await page.evaluate(() => matchMedia('screen').matches);
|
1316
|
+
* // → false
|
1317
|
+
* await page.evaluate(() => matchMedia('print').matches);
|
1318
|
+
* // → true
|
1319
|
+
*
|
1320
|
+
* await page.emulateMediaType(null);
|
1321
|
+
* await page.evaluate(() => matchMedia('screen').matches);
|
1322
|
+
* // → true
|
1323
|
+
* await page.evaluate(() => matchMedia('print').matches);
|
1324
|
+
* // → false
|
1325
|
+
* ```
|
1326
|
+
*/
|
1327
|
+
emulateMediaType(type?: string): Promise<void>;
|
1328
|
+
emulateCPUThrottling(factor: number | null): Promise<void>;
|
1329
|
+
/**
|
1330
|
+
* @param features - `<?Array<Object>>` Given an array of media feature
|
1331
|
+
* objects, emulates CSS media features on the page. Each media feature object
|
1332
|
+
* must have the following properties:
|
1333
|
+
* @example
|
1334
|
+
* ```js
|
1335
|
+
* await page.emulateMediaFeatures([
|
1336
|
+
* { name: 'prefers-color-scheme', value: 'dark' },
|
1337
|
+
* ]);
|
1338
|
+
* await page.evaluate(() => matchMedia('(prefers-color-scheme: dark)').matches);
|
1339
|
+
* // → true
|
1340
|
+
* await page.evaluate(() => matchMedia('(prefers-color-scheme: light)').matches);
|
1341
|
+
* // → false
|
1342
|
+
*
|
1343
|
+
* await page.emulateMediaFeatures([
|
1344
|
+
* { name: 'prefers-reduced-motion', value: 'reduce' },
|
1345
|
+
* ]);
|
1346
|
+
* await page.evaluate(
|
1347
|
+
* () => matchMedia('(prefers-reduced-motion: reduce)').matches
|
1348
|
+
* );
|
1349
|
+
* // → true
|
1350
|
+
* await page.evaluate(
|
1351
|
+
* () => matchMedia('(prefers-reduced-motion: no-preference)').matches
|
1352
|
+
* );
|
1353
|
+
* // → false
|
1354
|
+
*
|
1355
|
+
* await page.emulateMediaFeatures([
|
1356
|
+
* { name: 'prefers-color-scheme', value: 'dark' },
|
1357
|
+
* { name: 'prefers-reduced-motion', value: 'reduce' },
|
1358
|
+
* ]);
|
1359
|
+
* await page.evaluate(() => matchMedia('(prefers-color-scheme: dark)').matches);
|
1360
|
+
* // → true
|
1361
|
+
* await page.evaluate(() => matchMedia('(prefers-color-scheme: light)').matches);
|
1362
|
+
* // → false
|
1363
|
+
* await page.evaluate(
|
1364
|
+
* () => matchMedia('(prefers-reduced-motion: reduce)').matches
|
1365
|
+
* );
|
1366
|
+
* // → true
|
1367
|
+
* await page.evaluate(
|
1368
|
+
* () => matchMedia('(prefers-reduced-motion: no-preference)').matches
|
1369
|
+
* );
|
1370
|
+
* // → false
|
1371
|
+
*
|
1372
|
+
* await page.emulateMediaFeatures([{ name: 'color-gamut', value: 'p3' }]);
|
1373
|
+
* await page.evaluate(() => matchMedia('(color-gamut: srgb)').matches);
|
1374
|
+
* // → true
|
1375
|
+
* await page.evaluate(() => matchMedia('(color-gamut: p3)').matches);
|
1376
|
+
* // → true
|
1377
|
+
* await page.evaluate(() => matchMedia('(color-gamut: rec2020)').matches);
|
1378
|
+
* // → false
|
1379
|
+
* ```
|
1380
|
+
*/
|
1381
|
+
emulateMediaFeatures(features?: MediaFeature[]): Promise<void>;
|
1382
|
+
/**
|
1383
|
+
* @param timezoneId - Changes the timezone of the page. See
|
1384
|
+
* {@link https://source.chromium.org/chromium/chromium/deps/icu.git/+/faee8bc70570192d82d2978a71e2a615788597d1:source/data/misc/metaZones.txt | ICU’s metaZones.txt}
|
1385
|
+
* for a list of supported timezone IDs. Passing
|
1386
|
+
* `null` disables timezone emulation.
|
1387
|
+
*/
|
1388
|
+
emulateTimezone(timezoneId?: string): Promise<void>;
|
1389
|
+
/**
|
1390
|
+
* Emulates the idle state.
|
1391
|
+
* If no arguments set, clears idle state emulation.
|
1392
|
+
*
|
1393
|
+
* @example
|
1394
|
+
* ```js
|
1395
|
+
* // set idle emulation
|
1396
|
+
* await page.emulateIdleState({isUserActive: true, isScreenUnlocked: false});
|
1397
|
+
*
|
1398
|
+
* // do some checks here
|
1399
|
+
* ...
|
1400
|
+
*
|
1401
|
+
* // clear idle emulation
|
1402
|
+
* await page.emulateIdleState();
|
1403
|
+
* ```
|
1404
|
+
*
|
1405
|
+
* @param overrides - Mock idle state. If not set, clears idle overrides
|
1406
|
+
*/
|
1407
|
+
emulateIdleState(overrides?: {
|
1408
|
+
isUserActive: boolean;
|
1409
|
+
isScreenUnlocked: boolean;
|
1410
|
+
}): Promise<void>;
|
1411
|
+
/**
|
1412
|
+
* Simulates the given vision deficiency on the page.
|
1413
|
+
*
|
1414
|
+
* @example
|
1415
|
+
* ```js
|
1416
|
+
* const puppeteer = require('puppeteer');
|
1417
|
+
*
|
1418
|
+
* (async () => {
|
1419
|
+
* const browser = await puppeteer.launch();
|
1420
|
+
* const page = await browser.newPage();
|
1421
|
+
* await page.goto('https://v8.dev/blog/10-years');
|
1422
|
+
*
|
1423
|
+
* await page.emulateVisionDeficiency('achromatopsia');
|
1424
|
+
* await page.screenshot({ path: 'achromatopsia.png' });
|
1425
|
+
*
|
1426
|
+
* await page.emulateVisionDeficiency('deuteranopia');
|
1427
|
+
* await page.screenshot({ path: 'deuteranopia.png' });
|
1428
|
+
*
|
1429
|
+
* await page.emulateVisionDeficiency('blurredVision');
|
1430
|
+
* await page.screenshot({ path: 'blurred-vision.png' });
|
1431
|
+
*
|
1432
|
+
* await browser.close();
|
1433
|
+
* })();
|
1434
|
+
* ```
|
1435
|
+
*
|
1436
|
+
* @param type - the type of deficiency to simulate, or `'none'` to reset.
|
1437
|
+
*/
|
1438
|
+
emulateVisionDeficiency(type?: Protocol.Emulation.SetEmulatedVisionDeficiencyRequest['type']): Promise<void>;
|
1439
|
+
/**
|
1440
|
+
* `page.setViewport` will resize the page. A lot of websites don't expect
|
1441
|
+
* phones to change size, so you should set the viewport before navigating to
|
1442
|
+
* the page.
|
1443
|
+
*
|
1444
|
+
* In the case of multiple pages in a single browser, each page can have its
|
1445
|
+
* own viewport size.
|
1446
|
+
* @example
|
1447
|
+
* ```js
|
1448
|
+
* const page = await browser.newPage();
|
1449
|
+
* await page.setViewport({
|
1450
|
+
* width: 640,
|
1451
|
+
* height: 480,
|
1452
|
+
* deviceScaleFactor: 1,
|
1453
|
+
* });
|
1454
|
+
* await page.goto('https://example.com');
|
1455
|
+
* ```
|
1456
|
+
*
|
1457
|
+
* @param viewport -
|
1458
|
+
* @remarks
|
1459
|
+
* Argument viewport have following properties:
|
1460
|
+
*
|
1461
|
+
* - `width`: page width in pixels. required
|
1462
|
+
*
|
1463
|
+
* - `height`: page height in pixels. required
|
1464
|
+
*
|
1465
|
+
* - `deviceScaleFactor`: Specify device scale factor (can be thought of as
|
1466
|
+
* DPR). Defaults to `1`.
|
1467
|
+
*
|
1468
|
+
* - `isMobile`: Whether the meta viewport tag is taken into account. Defaults
|
1469
|
+
* to `false`.
|
1470
|
+
*
|
1471
|
+
* - `hasTouch`: Specifies if viewport supports touch events. Defaults to `false`
|
1472
|
+
*
|
1473
|
+
* - `isLandScape`: Specifies if viewport is in landscape mode. Defaults to false.
|
1474
|
+
*
|
1475
|
+
* NOTE: in certain cases, setting viewport will reload the page in order to
|
1476
|
+
* set the isMobile or hasTouch properties.
|
1477
|
+
*/
|
1478
|
+
setViewport(viewport: Viewport): Promise<void>;
|
1479
|
+
/**
|
1480
|
+
* @returns
|
1481
|
+
*
|
1482
|
+
* - `width`: page's width in pixels
|
1483
|
+
*
|
1484
|
+
* - `height`: page's height in pixels
|
1485
|
+
*
|
1486
|
+
* - `deviceScalarFactor`: Specify device scale factor (can be though of as
|
1487
|
+
* dpr). Defaults to `1`.
|
1488
|
+
*
|
1489
|
+
* - `isMobile`: Whether the meta viewport tag is taken into account. Defaults
|
1490
|
+
* to `false`.
|
1491
|
+
*
|
1492
|
+
* - `hasTouch`: Specifies if viewport supports touch events. Defaults to
|
1493
|
+
* `false`.
|
1494
|
+
*
|
1495
|
+
* - `isLandScape`: Specifies if viewport is in landscape mode. Defaults to
|
1496
|
+
* `false`.
|
1497
|
+
*/
|
1498
|
+
viewport(): Viewport | null;
|
1499
|
+
/**
|
1500
|
+
* @remarks
|
1501
|
+
*
|
1502
|
+
* Evaluates a function in the page's context and returns the result.
|
1503
|
+
*
|
1504
|
+
* If the function passed to `page.evaluteHandle` returns a Promise, the
|
1505
|
+
* function will wait for the promise to resolve and return its value.
|
1506
|
+
*
|
1507
|
+
* @example
|
1508
|
+
*
|
1509
|
+
* ```js
|
1510
|
+
* const result = await frame.evaluate(() => {
|
1511
|
+
* return Promise.resolve(8 * 7);
|
1512
|
+
* });
|
1513
|
+
* console.log(result); // prints "56"
|
1514
|
+
* ```
|
1515
|
+
*
|
1516
|
+
* You can pass a string instead of a function (although functions are
|
1517
|
+
* recommended as they are easier to debug and use with TypeScript):
|
1518
|
+
*
|
1519
|
+
* @example
|
1520
|
+
* ```
|
1521
|
+
* const aHandle = await page.evaluate('1 + 2');
|
1522
|
+
* ```
|
1523
|
+
*
|
1524
|
+
* To get the best TypeScript experience, you should pass in as the
|
1525
|
+
* generic the type of `pageFunction`:
|
1526
|
+
*
|
1527
|
+
* ```
|
1528
|
+
* const aHandle = await page.evaluate<() => number>(() => 2);
|
1529
|
+
* ```
|
1530
|
+
*
|
1531
|
+
* @example
|
1532
|
+
*
|
1533
|
+
* {@link ElementHandle} instances (including {@link JSHandle}s) can be passed
|
1534
|
+
* as arguments to the `pageFunction`:
|
1535
|
+
*
|
1536
|
+
* ```
|
1537
|
+
* const bodyHandle = await page.$('body');
|
1538
|
+
* const html = await page.evaluate(body => body.innerHTML, bodyHandle);
|
1539
|
+
* await bodyHandle.dispose();
|
1540
|
+
* ```
|
1541
|
+
*
|
1542
|
+
* @param pageFunction - a function that is run within the page
|
1543
|
+
* @param args - arguments to be passed to the pageFunction
|
1544
|
+
*
|
1545
|
+
* @returns the return value of `pageFunction`.
|
1546
|
+
*/
|
1547
|
+
evaluate<T extends EvaluateFn>(pageFunction: T, ...args: SerializableOrJSHandle[]): Promise<UnwrapPromiseLike<EvaluateFnReturnType<T>>>;
|
1548
|
+
/**
|
1549
|
+
* Adds a function which would be invoked in one of the following scenarios:
|
1550
|
+
*
|
1551
|
+
* - whenever the page is navigated
|
1552
|
+
*
|
1553
|
+
* - whenever the child frame is attached or navigated. In this case, the
|
1554
|
+
* function is invoked in the context of the newly attached frame.
|
1555
|
+
*
|
1556
|
+
* The function is invoked after the document was created but before any of
|
1557
|
+
* its scripts were run. This is useful to amend the JavaScript environment,
|
1558
|
+
* e.g. to seed `Math.random`.
|
1559
|
+
* @param pageFunction - Function to be evaluated in browser context
|
1560
|
+
* @param args - Arguments to pass to `pageFunction`
|
1561
|
+
* @example
|
1562
|
+
* An example of overriding the navigator.languages property before the page loads:
|
1563
|
+
* ```js
|
1564
|
+
* // preload.js
|
1565
|
+
*
|
1566
|
+
* // overwrite the `languages` property to use a custom getter
|
1567
|
+
* Object.defineProperty(navigator, 'languages', {
|
1568
|
+
* get: function () {
|
1569
|
+
* return ['en-US', 'en', 'bn'];
|
1570
|
+
* },
|
1571
|
+
* });
|
1572
|
+
*
|
1573
|
+
* // In your puppeteer script, assuming the preload.js file is
|
1574
|
+
* in same folder of our script
|
1575
|
+
* const preloadFile = fs.readFileSync('./preload.js', 'utf8');
|
1576
|
+
* await page.evaluateOnNewDocument(preloadFile);
|
1577
|
+
* ```
|
1578
|
+
*/
|
1579
|
+
evaluateOnNewDocument(pageFunction: Function | string, ...args: unknown[]): Promise<void>;
|
1580
|
+
/**
|
1581
|
+
* Toggles ignoring cache for each request based on the enabled state. By
|
1582
|
+
* default, caching is enabled.
|
1583
|
+
* @param enabled - sets the `enabled` state of cache
|
1584
|
+
*/
|
1585
|
+
setCacheEnabled(enabled?: boolean): Promise<void>;
|
1586
|
+
/**
|
1587
|
+
* @remarks
|
1588
|
+
* Options object which might have the following properties:
|
1589
|
+
*
|
1590
|
+
* - `path` : The file path to save the image to. The screenshot type
|
1591
|
+
* will be inferred from file extension. If `path` is a relative path, then
|
1592
|
+
* it is resolved relative to
|
1593
|
+
* {@link https://nodejs.org/api/process.html#process_process_cwd
|
1594
|
+
* | current working directory}.
|
1595
|
+
* If no path is provided, the image won't be saved to the disk.
|
1596
|
+
*
|
1597
|
+
* - `type` : Specify screenshot type, can be either `jpeg` or `png`.
|
1598
|
+
* Defaults to 'png'.
|
1599
|
+
*
|
1600
|
+
* - `quality` : The quality of the image, between 0-100. Not
|
1601
|
+
* applicable to `png` images.
|
1602
|
+
*
|
1603
|
+
* - `fullPage` : When true, takes a screenshot of the full
|
1604
|
+
* scrollable page. Defaults to `false`
|
1605
|
+
*
|
1606
|
+
* - `clip` : An object which specifies clipping region of the page.
|
1607
|
+
* Should have the following fields:<br/>
|
1608
|
+
* - `x` : x-coordinate of top-left corner of clip area.<br/>
|
1609
|
+
* - `y` : y-coordinate of top-left corner of clip area.<br/>
|
1610
|
+
* - `width` : width of clipping area.<br/>
|
1611
|
+
* - `height` : height of clipping area.
|
1612
|
+
*
|
1613
|
+
* - `omitBackground` : Hides default white background and allows
|
1614
|
+
* capturing screenshots with transparency. Defaults to `false`
|
1615
|
+
*
|
1616
|
+
* - `encoding` : The encoding of the image, can be either base64 or
|
1617
|
+
* binary. Defaults to `binary`.
|
1618
|
+
*
|
1619
|
+
*
|
1620
|
+
* NOTE: Screenshots take at least 1/6 second on OS X. See
|
1621
|
+
* {@link https://crbug.com/741689} for discussion.
|
1622
|
+
* @returns Promise which resolves to buffer or a base64 string (depending on
|
1623
|
+
* the value of `encoding`) with captured screenshot.
|
1624
|
+
*/
|
1625
|
+
screenshot(options?: ScreenshotOptions): Promise<Buffer | string | void>;
|
1626
|
+
private _screenshotTask;
|
1627
|
+
/**
|
1628
|
+
* Generatees a PDF of the page with the `print` CSS media type.
|
1629
|
+
* @remarks
|
1630
|
+
*
|
1631
|
+
* NOTE: PDF generation is only supported in Chrome headless mode.
|
1632
|
+
*
|
1633
|
+
* To generate a PDF with the `screen` media type, call
|
1634
|
+
* {@link Page.emulateMediaType | `page.emulateMediaType('screen')`} before
|
1635
|
+
* calling `page.pdf()`.
|
1636
|
+
*
|
1637
|
+
* By default, `page.pdf()` generates a pdf with modified colors for printing.
|
1638
|
+
* Use the
|
1639
|
+
* {@link https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-print-color-adjust | `-webkit-print-color-adjust`}
|
1640
|
+
* property to force rendering of exact colors.
|
1641
|
+
*
|
1642
|
+
*
|
1643
|
+
* @param options - options for generating the PDF.
|
1644
|
+
*/
|
1645
|
+
createPDFStream(options?: PDFOptions): Promise<Readable>;
|
1646
|
+
/**
|
1647
|
+
* @param options -
|
1648
|
+
* @returns
|
1649
|
+
*/
|
1650
|
+
pdf(options?: PDFOptions): Promise<Buffer>;
|
1651
|
+
/**
|
1652
|
+
* @returns The page's title
|
1653
|
+
* @remarks
|
1654
|
+
* Shortcut for {@link Frame.title | page.mainFrame().title()}.
|
1655
|
+
*/
|
1656
|
+
title(): Promise<string>;
|
1657
|
+
close(options?: {
|
1658
|
+
runBeforeUnload?: boolean;
|
1659
|
+
}): Promise<void>;
|
1660
|
+
/**
|
1661
|
+
* Indicates that the page has been closed.
|
1662
|
+
* @returns
|
1663
|
+
*/
|
1664
|
+
isClosed(): boolean;
|
1665
|
+
get mouse(): Mouse;
|
1666
|
+
/**
|
1667
|
+
* This method fetches an element with `selector`, scrolls it into view if
|
1668
|
+
* needed, and then uses {@link Page.mouse} to click in the center of the
|
1669
|
+
* element. If there's no element matching `selector`, the method throws an
|
1670
|
+
* error.
|
1671
|
+
* @remarks Bear in mind that if `click()` triggers a navigation event and
|
1672
|
+
* there's a separate `page.waitForNavigation()` promise to be resolved, you
|
1673
|
+
* may end up with a race condition that yields unexpected results. The
|
1674
|
+
* correct pattern for click and wait for navigation is the following:
|
1675
|
+
* ```js
|
1676
|
+
* const [response] = await Promise.all([
|
1677
|
+
* page.waitForNavigation(waitOptions),
|
1678
|
+
* page.click(selector, clickOptions),
|
1679
|
+
* ]);
|
1680
|
+
* ```
|
1681
|
+
* Shortcut for {@link Frame.click | page.mainFrame().click(selector[, options]) }.
|
1682
|
+
* @param selector - A `selector` to search for element to click. If there are
|
1683
|
+
* multiple elements satisfying the `selector`, the first will be clicked
|
1684
|
+
* @param options - `Object`
|
1685
|
+
* @returns Promise which resolves when the element matching `selector` is
|
1686
|
+
* successfully clicked. The Promise will be rejected if there is no element
|
1687
|
+
* matching `selector`.
|
1688
|
+
*/
|
1689
|
+
click(selector: string, options?: {
|
1690
|
+
delay?: number;
|
1691
|
+
button?: MouseButton;
|
1692
|
+
clickCount?: number;
|
1693
|
+
}): Promise<void>;
|
1694
|
+
/**
|
1695
|
+
* This method fetches an element with `selector` and focuses it. If there's no
|
1696
|
+
* element matching `selector`, the method throws an error.
|
1697
|
+
* @param selector - A
|
1698
|
+
* {@link https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors | selector }
|
1699
|
+
* of an element to focus. If there are multiple elements satisfying the
|
1700
|
+
* selector, the first will be focused.
|
1701
|
+
* @returns Promise which resolves when the element matching selector is
|
1702
|
+
* successfully focused. The promise will be rejected if there is no element
|
1703
|
+
* matching selector.
|
1704
|
+
* @remarks
|
1705
|
+
* Shortcut for {@link Frame.focus | page.mainFrame().focus(selector)}.
|
1706
|
+
*/
|
1707
|
+
focus(selector: string): Promise<void>;
|
1708
|
+
/**
|
1709
|
+
* This method fetches an element with `selector`, scrolls it into view if
|
1710
|
+
* needed, and then uses {@link Page.mouse} to hover over the center of the element.
|
1711
|
+
* If there's no element matching `selector`, the method throws an error.
|
1712
|
+
* @param selector - A
|
1713
|
+
* {@link https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors | selector}
|
1714
|
+
* to search for element to hover. If there are multiple elements satisfying
|
1715
|
+
* the selector, the first will be hovered.
|
1716
|
+
* @returns Promise which resolves when the element matching `selector` is
|
1717
|
+
* successfully hovered. Promise gets rejected if there's no element matching
|
1718
|
+
* `selector`.
|
1719
|
+
* @remarks
|
1720
|
+
* Shortcut for {@link Page.hover | page.mainFrame().hover(selector)}.
|
1721
|
+
*/
|
1722
|
+
hover(selector: string): Promise<void>;
|
1723
|
+
/**
|
1724
|
+
* Triggers a `change` and `input` event once all the provided options have been
|
1725
|
+
* selected. If there's no `<select>` element matching `selector`, the method
|
1726
|
+
* throws an error.
|
1727
|
+
*
|
1728
|
+
* @example
|
1729
|
+
* ```js
|
1730
|
+
* page.select('select#colors', 'blue'); // single selection
|
1731
|
+
* page.select('select#colors', 'red', 'green', 'blue'); // multiple selections
|
1732
|
+
* ```
|
1733
|
+
* @param selector - A
|
1734
|
+
* {@link https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors | Selector}
|
1735
|
+
* to query the page for
|
1736
|
+
* @param values - Values of options to select. If the `<select>` has the
|
1737
|
+
* `multiple` attribute, all values are considered, otherwise only the first one
|
1738
|
+
* is taken into account.
|
1739
|
+
* @returns
|
1740
|
+
*
|
1741
|
+
* @remarks
|
1742
|
+
* Shortcut for {@link Frame.select | page.mainFrame().select()}
|
1743
|
+
*/
|
1744
|
+
select(selector: string, ...values: string[]): Promise<string[]>;
|
1745
|
+
/**
|
1746
|
+
* This method fetches an element with `selector`, scrolls it into view if
|
1747
|
+
* needed, and then uses {@link Page.touchscreen} to tap in the center of the element.
|
1748
|
+
* If there's no element matching `selector`, the method throws an error.
|
1749
|
+
* @param selector - A
|
1750
|
+
* {@link https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors | Selector}
|
1751
|
+
* to search for element to tap. If there are multiple elements satisfying the
|
1752
|
+
* selector, the first will be tapped.
|
1753
|
+
* @returns
|
1754
|
+
* @remarks
|
1755
|
+
* Shortcut for {@link Frame.tap | page.mainFrame().tap(selector)}.
|
1756
|
+
*/
|
1757
|
+
tap(selector: string): Promise<void>;
|
1758
|
+
/**
|
1759
|
+
* Sends a `keydown`, `keypress/input`, and `keyup` event for each character
|
1760
|
+
* in the text.
|
1761
|
+
*
|
1762
|
+
* To press a special key, like `Control` or `ArrowDown`, use {@link Keyboard.press}.
|
1763
|
+
* @example
|
1764
|
+
* ```
|
1765
|
+
* await page.type('#mytextarea', 'Hello');
|
1766
|
+
* // Types instantly
|
1767
|
+
* await page.type('#mytextarea', 'World', { delay: 100 });
|
1768
|
+
* // Types slower, like a user
|
1769
|
+
* ```
|
1770
|
+
* @param selector - A
|
1771
|
+
* {@link https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors | selector}
|
1772
|
+
* of an element to type into. If there are multiple elements satisfying the
|
1773
|
+
* selector, the first will be used.
|
1774
|
+
* @param text - A text to type into a focused element.
|
1775
|
+
* @param options - have property `delay` which is the Time to wait between
|
1776
|
+
* key presses in milliseconds. Defaults to `0`.
|
1777
|
+
* @returns
|
1778
|
+
* @remarks
|
1779
|
+
*/
|
1780
|
+
type(selector: string, text: string, options?: {
|
1781
|
+
delay: number;
|
1782
|
+
}): Promise<void>;
|
1783
|
+
/**
|
1784
|
+
* @remarks
|
1785
|
+
*
|
1786
|
+
* This method behaves differently depending on the first parameter. If it's a
|
1787
|
+
* `string`, it will be treated as a `selector` or `xpath` (if the string
|
1788
|
+
* starts with `//`). This method then is a shortcut for
|
1789
|
+
* {@link Page.waitForSelector} or {@link Page.waitForXPath}.
|
1790
|
+
*
|
1791
|
+
* If the first argument is a function this method is a shortcut for
|
1792
|
+
* {@link Page.waitForFunction}.
|
1793
|
+
*
|
1794
|
+
* If the first argument is a `number`, it's treated as a timeout in
|
1795
|
+
* milliseconds and the method returns a promise which resolves after the
|
1796
|
+
* timeout.
|
1797
|
+
*
|
1798
|
+
* @param selectorOrFunctionOrTimeout - a selector, predicate or timeout to
|
1799
|
+
* wait for.
|
1800
|
+
* @param options - optional waiting parameters.
|
1801
|
+
* @param args - arguments to pass to `pageFunction`.
|
1802
|
+
*
|
1803
|
+
* @deprecated Don't use this method directly. Instead use the more explicit
|
1804
|
+
* methods available: {@link Page.waitForSelector},
|
1805
|
+
* {@link Page.waitForXPath}, {@link Page.waitForFunction} or
|
1806
|
+
* {@link Page.waitForTimeout}.
|
1807
|
+
*/
|
1808
|
+
waitFor(selectorOrFunctionOrTimeout: string | number | Function, options?: {
|
1809
|
+
visible?: boolean;
|
1810
|
+
hidden?: boolean;
|
1811
|
+
timeout?: number;
|
1812
|
+
polling?: string | number;
|
1813
|
+
}, ...args: SerializableOrJSHandle[]): Promise<JSHandle>;
|
1814
|
+
/**
|
1815
|
+
* Causes your script to wait for the given number of milliseconds.
|
1816
|
+
*
|
1817
|
+
* @remarks
|
1818
|
+
*
|
1819
|
+
* It's generally recommended to not wait for a number of seconds, but instead
|
1820
|
+
* use {@link Page.waitForSelector}, {@link Page.waitForXPath} or
|
1821
|
+
* {@link Page.waitForFunction} to wait for exactly the conditions you want.
|
1822
|
+
*
|
1823
|
+
* @example
|
1824
|
+
*
|
1825
|
+
* Wait for 1 second:
|
1826
|
+
*
|
1827
|
+
* ```
|
1828
|
+
* await page.waitForTimeout(1000);
|
1829
|
+
* ```
|
1830
|
+
*
|
1831
|
+
* @param milliseconds - the number of milliseconds to wait.
|
1832
|
+
*/
|
1833
|
+
waitForTimeout(milliseconds: number): Promise<void>;
|
1834
|
+
/**
|
1835
|
+
* Wait for the `selector` to appear in page. If at the moment of calling the
|
1836
|
+
* method the `selector` already exists, the method will return immediately. If
|
1837
|
+
* the `selector` doesn't appear after the `timeout` milliseconds of waiting, the
|
1838
|
+
* function will throw.
|
1839
|
+
*
|
1840
|
+
* This method works across navigations:
|
1841
|
+
* ```js
|
1842
|
+
* const puppeteer = require('puppeteer');
|
1843
|
+
* (async () => {
|
1844
|
+
* const browser = await puppeteer.launch();
|
1845
|
+
* const page = await browser.newPage();
|
1846
|
+
* let currentURL;
|
1847
|
+
* page
|
1848
|
+
* .waitForSelector('img')
|
1849
|
+
* .then(() => console.log('First URL with image: ' + currentURL));
|
1850
|
+
* for (currentURL of [
|
1851
|
+
* 'https://example.com',
|
1852
|
+
* 'https://google.com',
|
1853
|
+
* 'https://bbc.com',
|
1854
|
+
* ]) {
|
1855
|
+
* await page.goto(currentURL);
|
1856
|
+
* }
|
1857
|
+
* await browser.close();
|
1858
|
+
* })();
|
1859
|
+
* ```
|
1860
|
+
* @param selector - A
|
1861
|
+
* {@link https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors | selector}
|
1862
|
+
* of an element to wait for
|
1863
|
+
* @param options - Optional waiting parameters
|
1864
|
+
* @returns Promise which resolves when element specified by selector string
|
1865
|
+
* is added to DOM. Resolves to `null` if waiting for hidden: `true` and
|
1866
|
+
* selector is not found in DOM.
|
1867
|
+
* @remarks
|
1868
|
+
* The optional Parameter in Arguments `options` are :
|
1869
|
+
*
|
1870
|
+
* - `Visible`: A boolean wait for element to be present in DOM and to be
|
1871
|
+
* visible, i.e. to not have `display: none` or `visibility: hidden` CSS
|
1872
|
+
* properties. Defaults to `false`.
|
1873
|
+
*
|
1874
|
+
* - `hidden`: ait for element to not be found in the DOM or to be hidden,
|
1875
|
+
* i.e. have `display: none` or `visibility: hidden` CSS properties. Defaults to
|
1876
|
+
* `false`.
|
1877
|
+
*
|
1878
|
+
* - `timeout`: maximum time to wait for in milliseconds. Defaults to `30000`
|
1879
|
+
* (30 seconds). Pass `0` to disable timeout. The default value can be changed
|
1880
|
+
* by using the {@link Page.setDefaultTimeout} method.
|
1881
|
+
*/
|
1882
|
+
waitForSelector(selector: string, options?: {
|
1883
|
+
visible?: boolean;
|
1884
|
+
hidden?: boolean;
|
1885
|
+
timeout?: number;
|
1886
|
+
}): Promise<ElementHandle | null>;
|
1887
|
+
/**
|
1888
|
+
* Wait for the `xpath` to appear in page. If at the moment of calling the
|
1889
|
+
* method the `xpath` already exists, the method will return immediately. If
|
1890
|
+
* the `xpath` doesn't appear after the `timeout` milliseconds of waiting, the
|
1891
|
+
* function will throw.
|
1892
|
+
*
|
1893
|
+
* This method works across navigation
|
1894
|
+
* ```js
|
1895
|
+
* const puppeteer = require('puppeteer');
|
1896
|
+
* (async () => {
|
1897
|
+
* const browser = await puppeteer.launch();
|
1898
|
+
* const page = await browser.newPage();
|
1899
|
+
* let currentURL;
|
1900
|
+
* page
|
1901
|
+
* .waitForXPath('//img')
|
1902
|
+
* .then(() => console.log('First URL with image: ' + currentURL));
|
1903
|
+
* for (currentURL of [
|
1904
|
+
* 'https://example.com',
|
1905
|
+
* 'https://google.com',
|
1906
|
+
* 'https://bbc.com',
|
1907
|
+
* ]) {
|
1908
|
+
* await page.goto(currentURL);
|
1909
|
+
* }
|
1910
|
+
* await browser.close();
|
1911
|
+
* })();
|
1912
|
+
* ```
|
1913
|
+
* @param xpath - A
|
1914
|
+
* {@link https://developer.mozilla.org/en-US/docs/Web/XPath | xpath} of an
|
1915
|
+
* element to wait for
|
1916
|
+
* @param options - Optional waiting parameters
|
1917
|
+
* @returns Promise which resolves when element specified by xpath string is
|
1918
|
+
* added to DOM. Resolves to `null` if waiting for `hidden: true` and xpath is
|
1919
|
+
* not found in DOM.
|
1920
|
+
* @remarks
|
1921
|
+
* The optional Argument `options` have properties:
|
1922
|
+
*
|
1923
|
+
* - `visible`: A boolean to wait for element to be present in DOM and to be
|
1924
|
+
* visible, i.e. to not have `display: none` or `visibility: hidden` CSS
|
1925
|
+
* properties. Defaults to `false`.
|
1926
|
+
*
|
1927
|
+
* - `hidden`: A boolean wait for element to not be found in the DOM or to be
|
1928
|
+
* hidden, i.e. have `display: none` or `visibility: hidden` CSS properties.
|
1929
|
+
* Defaults to `false`.
|
1930
|
+
*
|
1931
|
+
* - `timeout`: A number which is maximum time to wait for in milliseconds.
|
1932
|
+
* Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default
|
1933
|
+
* value can be changed by using the {@link Page.setDefaultTimeout} method.
|
1934
|
+
*/
|
1935
|
+
waitForXPath(xpath: string, options?: {
|
1936
|
+
visible?: boolean;
|
1937
|
+
hidden?: boolean;
|
1938
|
+
timeout?: number;
|
1939
|
+
}): Promise<ElementHandle | null>;
|
1940
|
+
/**
|
1941
|
+
* The `waitForFunction` can be used to observe viewport size change:
|
1942
|
+
*
|
1943
|
+
* ```
|
1944
|
+
* const puppeteer = require('puppeteer');
|
1945
|
+
* (async () => {
|
1946
|
+
* const browser = await puppeteer.launch();
|
1947
|
+
* const page = await browser.newPage();
|
1948
|
+
* const watchDog = page.waitForFunction('window.innerWidth < 100');
|
1949
|
+
* await page.setViewport({ width: 50, height: 50 });
|
1950
|
+
* await watchDog;
|
1951
|
+
* await browser.close();
|
1952
|
+
* })();
|
1953
|
+
* ```
|
1954
|
+
* To pass arguments from node.js to the predicate of `page.waitForFunction` function:
|
1955
|
+
* ```
|
1956
|
+
* const selector = '.foo';
|
1957
|
+
* await page.waitForFunction(
|
1958
|
+
* (selector) => !!document.querySelector(selector),
|
1959
|
+
* {},
|
1960
|
+
* selector
|
1961
|
+
* );
|
1962
|
+
* ```
|
1963
|
+
* The predicate of `page.waitForFunction` can be asynchronous too:
|
1964
|
+
* ```
|
1965
|
+
* const username = 'github-username';
|
1966
|
+
* await page.waitForFunction(
|
1967
|
+
* async (username) => {
|
1968
|
+
* const githubResponse = await fetch(
|
1969
|
+
* `https://api.github.com/users/${username}`
|
1970
|
+
* );
|
1971
|
+
* const githubUser = await githubResponse.json();
|
1972
|
+
* // show the avatar
|
1973
|
+
* const img = document.createElement('img');
|
1974
|
+
* img.src = githubUser.avatar_url;
|
1975
|
+
* // wait 3 seconds
|
1976
|
+
* await new Promise((resolve, reject) => setTimeout(resolve, 3000));
|
1977
|
+
* img.remove();
|
1978
|
+
* },
|
1979
|
+
* {},
|
1980
|
+
* username
|
1981
|
+
* );
|
1982
|
+
* ```
|
1983
|
+
* @param pageFunction - Function to be evaluated in browser context
|
1984
|
+
* @param options - Optional waiting parameters
|
1985
|
+
* @param args - Arguments to pass to `pageFunction`
|
1986
|
+
* @returns Promise which resolves when the `pageFunction` returns a truthy
|
1987
|
+
* value. It resolves to a JSHandle of the truthy value.
|
1988
|
+
*
|
1989
|
+
* The optional waiting parameter can be:
|
1990
|
+
*
|
1991
|
+
* - `Polling`: An interval at which the `pageFunction` is executed, defaults to
|
1992
|
+
* `raf`. If `polling` is a number, then it is treated as an interval in
|
1993
|
+
* milliseconds at which the function would be executed. If polling is a
|
1994
|
+
* string, then it can be one of the following values:<br/>
|
1995
|
+
* - `raf`: to constantly execute `pageFunction` in `requestAnimationFrame`
|
1996
|
+
* callback. This is the tightest polling mode which is suitable to
|
1997
|
+
* observe styling changes.<br/>
|
1998
|
+
* - `mutation`: to execute pageFunction on every DOM mutation.
|
1999
|
+
*
|
2000
|
+
* - `timeout`: maximum time to wait for in milliseconds. Defaults to `30000`
|
2001
|
+
* (30 seconds). Pass `0` to disable timeout. The default value can be changed
|
2002
|
+
* by using the
|
2003
|
+
* {@link Page.setDefaultTimeout | page.setDefaultTimeout(timeout)} method.
|
2004
|
+
*
|
2005
|
+
*/
|
2006
|
+
waitForFunction(pageFunction: Function | string, options?: {
|
2007
|
+
timeout?: number;
|
2008
|
+
polling?: string | number;
|
2009
|
+
}, ...args: SerializableOrJSHandle[]): Promise<JSHandle>;
|
2010
|
+
}
|
2011
|
+
//# sourceMappingURL=Page.d.ts.map
|