diff --git a/.gitignore b/.gitignore index c5f0b19c..167bc446 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ test/coverage.json temp/ dependency-chart.png puppeteer-core-*.tgz +new-docs/ diff --git a/.travis.yml b/.travis.yml index b8b46964..30b3fc31 100644 --- a/.travis.yml +++ b/.travis.yml @@ -71,7 +71,8 @@ jobs: - CHROMIUM=true script: - npm run lint - - npm run ensure-new-docs-up-to-date + # Ensure that we can generate the new docs without erroring + - npm run generate-docs - npm run ensure-correct-devtools-protocol-revision # This bot runs separately as it changes package.json to test puppeteer-core diff --git a/new-docs/index.md b/new-docs/index.md deleted file mode 100644 index bf798762..00000000 --- a/new-docs/index.md +++ /dev/null @@ -1,12 +0,0 @@ - - -[Home](./index.md) - -## API Reference - -## Packages - -| Package | Description | -| --- | --- | -| [puppeteer](./puppeteer.md) | | - diff --git a/new-docs/puppeteer.accessibility.md b/new-docs/puppeteer.accessibility.md deleted file mode 100644 index 3f8b4b90..00000000 --- a/new-docs/puppeteer.accessibility.md +++ /dev/null @@ -1,30 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [Accessibility](./puppeteer.accessibility.md) - -## Accessibility class - -The Accessibility class provides methods for inspecting Chromium's accessibility tree. The accessibility tree is used by assistive technology such as [screen readers](https://en.wikipedia.org/wiki/Screen_reader) or [switches](https://en.wikipedia.org/wiki/Switch_access). - -Signature: - -```typescript -export declare class Accessibility -``` - -## Remarks - -Accessibility is a very platform-specific thing. On different platforms, there are different screen readers that might have wildly different output. - -Blink - Chrome's rendering engine - has a concept of "accessibility tree", which is then translated into different platform-specific APIs. Accessibility namespace gives users access to the Blink Accessibility Tree. - -Most of the accessibility tree gets filtered out when converting from Blink AX Tree to Platform-specific AX-Tree or by assistive technologies themselves. By default, Puppeteer tries to approximate this filtering, exposing only the "interesting" nodes of the tree. - -The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `Accessibility` class. - -## Methods - -| Method | Modifiers | Description | -| --- | --- | --- | -| [snapshot(options)](./puppeteer.accessibility.snapshot.md) | | Captures the current state of the accessibility tree. The returned object represents the root accessible node of the page. | - diff --git a/new-docs/puppeteer.accessibility.snapshot.md b/new-docs/puppeteer.accessibility.snapshot.md deleted file mode 100644 index b8547a1d..00000000 --- a/new-docs/puppeteer.accessibility.snapshot.md +++ /dev/null @@ -1,61 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [Accessibility](./puppeteer.accessibility.md) > [snapshot](./puppeteer.accessibility.snapshot.md) - -## Accessibility.snapshot() method - -Captures the current state of the accessibility tree. The returned object represents the root accessible node of the page. - -Signature: - -```typescript -snapshot(options?: SnapshotOptions): Promise; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| options | [SnapshotOptions](./puppeteer.snapshotoptions.md) | | - -Returns: - -Promise<[SerializedAXNode](./puppeteer.serializedaxnode.md)> - -An AXNode object representing the snapshot. - -## Remarks - -\*\*NOTE\*\* The Chromium accessibility tree contains nodes that go unused on most platforms and by most screen readers. Puppeteer will discard them as well for an easier to process tree, unless `interestingOnly` is set to `false`. - -## Example 1 - -An example of dumping the entire accessibility tree: - -```js -const snapshot = await page.accessibility.snapshot(); -console.log(snapshot); - -``` - -## Example 2 - -An example of logging the focused node's name: - -```js -const snapshot = await page.accessibility.snapshot(); -const node = findFocusedNode(snapshot); -console.log(node && node.name); - -function findFocusedNode(node) { - if (node.focused) - return node; - for (const child of node.children || []) { - const foundNode = findFocusedNode(child); - return foundNode; - } - return null; -} - -``` - diff --git a/new-docs/puppeteer.boundingbox.height.md b/new-docs/puppeteer.boundingbox.height.md deleted file mode 100644 index 426528b0..00000000 --- a/new-docs/puppeteer.boundingbox.height.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BoundingBox](./puppeteer.boundingbox.md) > [height](./puppeteer.boundingbox.height.md) - -## BoundingBox.height property - -the height of the element in pixels. - -Signature: - -```typescript -height: number; -``` diff --git a/new-docs/puppeteer.boundingbox.md b/new-docs/puppeteer.boundingbox.md deleted file mode 100644 index 9cb816c7..00000000 --- a/new-docs/puppeteer.boundingbox.md +++ /dev/null @@ -1,22 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BoundingBox](./puppeteer.boundingbox.md) - -## BoundingBox interface - - -Signature: - -```typescript -export interface BoundingBox -``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [height](./puppeteer.boundingbox.height.md) | number | the height of the element in pixels. | -| [width](./puppeteer.boundingbox.width.md) | number | the width of the element in pixels. | -| [x](./puppeteer.boundingbox.x.md) | number | the x coordinate of the element in pixels. | -| [y](./puppeteer.boundingbox.y.md) | number | the y coordinate of the element in pixels. | - diff --git a/new-docs/puppeteer.boundingbox.width.md b/new-docs/puppeteer.boundingbox.width.md deleted file mode 100644 index fe5d16d7..00000000 --- a/new-docs/puppeteer.boundingbox.width.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BoundingBox](./puppeteer.boundingbox.md) > [width](./puppeteer.boundingbox.width.md) - -## BoundingBox.width property - -the width of the element in pixels. - -Signature: - -```typescript -width: number; -``` diff --git a/new-docs/puppeteer.boundingbox.x.md b/new-docs/puppeteer.boundingbox.x.md deleted file mode 100644 index 7803f442..00000000 --- a/new-docs/puppeteer.boundingbox.x.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BoundingBox](./puppeteer.boundingbox.md) > [x](./puppeteer.boundingbox.x.md) - -## BoundingBox.x property - -the x coordinate of the element in pixels. - -Signature: - -```typescript -x: number; -``` diff --git a/new-docs/puppeteer.boundingbox.y.md b/new-docs/puppeteer.boundingbox.y.md deleted file mode 100644 index c574ee6c..00000000 --- a/new-docs/puppeteer.boundingbox.y.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BoundingBox](./puppeteer.boundingbox.md) > [y](./puppeteer.boundingbox.y.md) - -## BoundingBox.y property - -the y coordinate of the element in pixels. - -Signature: - -```typescript -y: number; -``` diff --git a/new-docs/puppeteer.boxmodel.border.md b/new-docs/puppeteer.boxmodel.border.md deleted file mode 100644 index f5eb3741..00000000 --- a/new-docs/puppeteer.boxmodel.border.md +++ /dev/null @@ -1,14 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BoxModel](./puppeteer.boxmodel.md) > [border](./puppeteer.boxmodel.border.md) - -## BoxModel.border property - -Signature: - -```typescript -border: Array<{ - x: number; - y: number; - }>; -``` diff --git a/new-docs/puppeteer.boxmodel.content.md b/new-docs/puppeteer.boxmodel.content.md deleted file mode 100644 index a0a4723c..00000000 --- a/new-docs/puppeteer.boxmodel.content.md +++ /dev/null @@ -1,14 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BoxModel](./puppeteer.boxmodel.md) > [content](./puppeteer.boxmodel.content.md) - -## BoxModel.content property - -Signature: - -```typescript -content: Array<{ - x: number; - y: number; - }>; -``` diff --git a/new-docs/puppeteer.boxmodel.height.md b/new-docs/puppeteer.boxmodel.height.md deleted file mode 100644 index 952ca5f8..00000000 --- a/new-docs/puppeteer.boxmodel.height.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BoxModel](./puppeteer.boxmodel.md) > [height](./puppeteer.boxmodel.height.md) - -## BoxModel.height property - -Signature: - -```typescript -height: number; -``` diff --git a/new-docs/puppeteer.boxmodel.margin.md b/new-docs/puppeteer.boxmodel.margin.md deleted file mode 100644 index 418f1928..00000000 --- a/new-docs/puppeteer.boxmodel.margin.md +++ /dev/null @@ -1,14 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BoxModel](./puppeteer.boxmodel.md) > [margin](./puppeteer.boxmodel.margin.md) - -## BoxModel.margin property - -Signature: - -```typescript -margin: Array<{ - x: number; - y: number; - }>; -``` diff --git a/new-docs/puppeteer.boxmodel.md b/new-docs/puppeteer.boxmodel.md deleted file mode 100644 index 04414d0a..00000000 --- a/new-docs/puppeteer.boxmodel.md +++ /dev/null @@ -1,23 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BoxModel](./puppeteer.boxmodel.md) - -## BoxModel interface - -Signature: - -```typescript -export interface BoxModel -``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [border](./puppeteer.boxmodel.border.md) | Array<{ x: number; y: number; }> | | -| [content](./puppeteer.boxmodel.content.md) | Array<{ x: number; y: number; }> | | -| [height](./puppeteer.boxmodel.height.md) | number | | -| [margin](./puppeteer.boxmodel.margin.md) | Array<{ x: number; y: number; }> | | -| [padding](./puppeteer.boxmodel.padding.md) | Array<{ x: number; y: number; }> | | -| [width](./puppeteer.boxmodel.width.md) | number | | - diff --git a/new-docs/puppeteer.boxmodel.padding.md b/new-docs/puppeteer.boxmodel.padding.md deleted file mode 100644 index 3c47ceeb..00000000 --- a/new-docs/puppeteer.boxmodel.padding.md +++ /dev/null @@ -1,14 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BoxModel](./puppeteer.boxmodel.md) > [padding](./puppeteer.boxmodel.padding.md) - -## BoxModel.padding property - -Signature: - -```typescript -padding: Array<{ - x: number; - y: number; - }>; -``` diff --git a/new-docs/puppeteer.boxmodel.width.md b/new-docs/puppeteer.boxmodel.width.md deleted file mode 100644 index 14e7b208..00000000 --- a/new-docs/puppeteer.boxmodel.width.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BoxModel](./puppeteer.boxmodel.md) > [width](./puppeteer.boxmodel.width.md) - -## BoxModel.width property - -Signature: - -```typescript -width: number; -``` diff --git a/new-docs/puppeteer.browser.browsercontexts.md b/new-docs/puppeteer.browser.browsercontexts.md deleted file mode 100644 index 309170ea..00000000 --- a/new-docs/puppeteer.browser.browsercontexts.md +++ /dev/null @@ -1,17 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [Browser](./puppeteer.browser.md) > [browserContexts](./puppeteer.browser.browsercontexts.md) - -## Browser.browserContexts() method - -Returns an array of all open browser contexts. In a newly created browser, this will return a single instance of [BrowserContext](./puppeteer.browsercontext.md). - -Signature: - -```typescript -browserContexts(): BrowserContext[]; -``` -Returns: - -[BrowserContext](./puppeteer.browsercontext.md)\[\] - diff --git a/new-docs/puppeteer.browser.close.md b/new-docs/puppeteer.browser.close.md deleted file mode 100644 index 714dd1f8..00000000 --- a/new-docs/puppeteer.browser.close.md +++ /dev/null @@ -1,17 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [Browser](./puppeteer.browser.md) > [close](./puppeteer.browser.close.md) - -## Browser.close() method - -Closes Chromium and all of its pages (if any were opened). The [Browser](./puppeteer.browser.md) object itself is considered to be disposed and cannot be used anymore. - -Signature: - -```typescript -close(): Promise; -``` -Returns: - -Promise<void> - diff --git a/new-docs/puppeteer.browser.createincognitobrowsercontext.md b/new-docs/puppeteer.browser.createincognitobrowsercontext.md deleted file mode 100644 index 93b9f963..00000000 --- a/new-docs/puppeteer.browser.createincognitobrowsercontext.md +++ /dev/null @@ -1,33 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [Browser](./puppeteer.browser.md) > [createIncognitoBrowserContext](./puppeteer.browser.createincognitobrowsercontext.md) - -## Browser.createIncognitoBrowserContext() method - -Creates a new incognito browser context. This won't share cookies/cache with other browser contexts. - -Signature: - -```typescript -createIncognitoBrowserContext(): Promise; -``` -Returns: - -Promise<[BrowserContext](./puppeteer.browsercontext.md)> - -## Example - - -```js -(async () => { - const browser = await puppeteer.launch(); - // Create a new incognito browser context. - const context = await browser.createIncognitoBrowserContext(); - // Create a new page in a pristine context. - const page = await context.newPage(); - // Do stuff - await page.goto('https://example.com'); -})(); - -``` - diff --git a/new-docs/puppeteer.browser.defaultbrowsercontext.md b/new-docs/puppeteer.browser.defaultbrowsercontext.md deleted file mode 100644 index 88dba1c6..00000000 --- a/new-docs/puppeteer.browser.defaultbrowsercontext.md +++ /dev/null @@ -1,17 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [Browser](./puppeteer.browser.md) > [defaultBrowserContext](./puppeteer.browser.defaultbrowsercontext.md) - -## Browser.defaultBrowserContext() method - -Returns the default browser context. The default browser context cannot be closed. - -Signature: - -```typescript -defaultBrowserContext(): BrowserContext; -``` -Returns: - -[BrowserContext](./puppeteer.browsercontext.md) - diff --git a/new-docs/puppeteer.browser.disconnect.md b/new-docs/puppeteer.browser.disconnect.md deleted file mode 100644 index 1382226c..00000000 --- a/new-docs/puppeteer.browser.disconnect.md +++ /dev/null @@ -1,17 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [Browser](./puppeteer.browser.md) > [disconnect](./puppeteer.browser.disconnect.md) - -## Browser.disconnect() method - -Disconnects Puppeteer from the browser, but leaves the Chromium process running. After calling `disconnect`, the [Browser](./puppeteer.browser.md) object is considered disposed and cannot be used anymore. - -Signature: - -```typescript -disconnect(): void; -``` -Returns: - -void - diff --git a/new-docs/puppeteer.browser.isconnected.md b/new-docs/puppeteer.browser.isconnected.md deleted file mode 100644 index 987adae7..00000000 --- a/new-docs/puppeteer.browser.isconnected.md +++ /dev/null @@ -1,17 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [Browser](./puppeteer.browser.md) > [isConnected](./puppeteer.browser.isconnected.md) - -## Browser.isConnected() method - -Indicates that the browser is connected. - -Signature: - -```typescript -isConnected(): boolean; -``` -Returns: - -boolean - diff --git a/new-docs/puppeteer.browser.md b/new-docs/puppeteer.browser.md deleted file mode 100644 index 5b590876..00000000 --- a/new-docs/puppeteer.browser.md +++ /dev/null @@ -1,79 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [Browser](./puppeteer.browser.md) - -## Browser class - -A Browser is created when Puppeteer connects to a Chromium instance, either through [PuppeteerNode.launch()](./puppeteer.puppeteernode.launch.md) or [Puppeteer.connect()](./puppeteer.puppeteer.connect.md). - -Signature: - -```typescript -export declare class Browser extends EventEmitter -``` -Extends: [EventEmitter](./puppeteer.eventemitter.md) - -## Remarks - -The Browser class extends from Puppeteer's [EventEmitter](./puppeteer.eventemitter.md) class and will emit various events which are documented in the [BrowserEmittedEvents](./puppeteer.browseremittedevents.md) enum. - -The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `Browser` class. - -## Example 1 - -An example of using a [Browser](./puppeteer.browser.md) to create a [Page](./puppeteer.page.md): - -```js -const puppeteer = require('puppeteer'); - -(async () => { - const browser = await puppeteer.launch(); - const page = await browser.newPage(); - await page.goto('https://example.com'); - await browser.close(); -})(); - -``` - -## Example 2 - -An example of disconnecting from and reconnecting to a [Browser](./puppeteer.browser.md): - -```js -const puppeteer = require('puppeteer'); - -(async () => { - const browser = await puppeteer.launch(); - // Store the endpoint to be able to reconnect to Chromium - const browserWSEndpoint = browser.wsEndpoint(); - // Disconnect puppeteer from Chromium - browser.disconnect(); - - // Use the endpoint to reestablish a connection - const browser2 = await puppeteer.connect({browserWSEndpoint}); - // Close Chromium - await browser2.close(); -})(); - -``` - -## Methods - -| Method | Modifiers | Description | -| --- | --- | --- | -| [browserContexts()](./puppeteer.browser.browsercontexts.md) | | Returns an array of all open browser contexts. In a newly created browser, this will return a single instance of [BrowserContext](./puppeteer.browsercontext.md). | -| [close()](./puppeteer.browser.close.md) | | Closes Chromium and all of its pages (if any were opened). The [Browser](./puppeteer.browser.md) object itself is considered to be disposed and cannot be used anymore. | -| [createIncognitoBrowserContext()](./puppeteer.browser.createincognitobrowsercontext.md) | | Creates a new incognito browser context. This won't share cookies/cache with other browser contexts. | -| [defaultBrowserContext()](./puppeteer.browser.defaultbrowsercontext.md) | | Returns the default browser context. The default browser context cannot be closed. | -| [disconnect()](./puppeteer.browser.disconnect.md) | | Disconnects Puppeteer from the browser, but leaves the Chromium process running. After calling disconnect, the [Browser](./puppeteer.browser.md) object is considered disposed and cannot be used anymore. | -| [isConnected()](./puppeteer.browser.isconnected.md) | | Indicates that the browser is connected. | -| [newPage()](./puppeteer.browser.newpage.md) | | Creates a [Page](./puppeteer.page.md) in the default browser context. | -| [pages()](./puppeteer.browser.pages.md) | | An array of all open pages inside the Browser. | -| [process()](./puppeteer.browser.process.md) | | The spawned browser process. Returns null if the browser instance was created with [Puppeteer.connect()](./puppeteer.puppeteer.connect.md). | -| [target()](./puppeteer.browser.target.md) | | The target associated with the browser. | -| [targets()](./puppeteer.browser.targets.md) | | All active targets inside the Browser. In case of multiple browser contexts, returns an array with all the targets in all browser contexts. | -| [userAgent()](./puppeteer.browser.useragent.md) | | The browser's original user agent. Pages can override the browser user agent with [Page.setUserAgent()](./puppeteer.page.setuseragent.md). | -| [version()](./puppeteer.browser.version.md) | | A string representing the browser name and version. | -| [waitForTarget(predicate, options)](./puppeteer.browser.waitfortarget.md) | | Searches for a target in all browser contexts. | -| [wsEndpoint()](./puppeteer.browser.wsendpoint.md) | | The browser websocket endpoint which can be used as an argument to [Puppeteer.connect()](./puppeteer.puppeteer.connect.md). | - diff --git a/new-docs/puppeteer.browser.newpage.md b/new-docs/puppeteer.browser.newpage.md deleted file mode 100644 index 9b695fe2..00000000 --- a/new-docs/puppeteer.browser.newpage.md +++ /dev/null @@ -1,17 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [Browser](./puppeteer.browser.md) > [newPage](./puppeteer.browser.newpage.md) - -## Browser.newPage() method - -Creates a [Page](./puppeteer.page.md) in the default browser context. - -Signature: - -```typescript -newPage(): Promise; -``` -Returns: - -Promise<[Page](./puppeteer.page.md)> - diff --git a/new-docs/puppeteer.browser.pages.md b/new-docs/puppeteer.browser.pages.md deleted file mode 100644 index ea86a7f4..00000000 --- a/new-docs/puppeteer.browser.pages.md +++ /dev/null @@ -1,21 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [Browser](./puppeteer.browser.md) > [pages](./puppeteer.browser.pages.md) - -## Browser.pages() method - -An array of all open pages inside the Browser. - -Signature: - -```typescript -pages(): Promise; -``` -Returns: - -Promise<[Page](./puppeteer.page.md)\[\]> - -## Remarks - -In case of multiple browser contexts, returns an array with all the pages in all browser contexts. Non-visible pages, such as `"background_page"`, will not be listed here. You can find them using [Target.page()](./puppeteer.target.page.md). - diff --git a/new-docs/puppeteer.browser.process.md b/new-docs/puppeteer.browser.process.md deleted file mode 100644 index ae112dc1..00000000 --- a/new-docs/puppeteer.browser.process.md +++ /dev/null @@ -1,17 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [Browser](./puppeteer.browser.md) > [process](./puppeteer.browser.process.md) - -## Browser.process() method - -The spawned browser process. Returns `null` if the browser instance was created with [Puppeteer.connect()](./puppeteer.puppeteer.connect.md). - -Signature: - -```typescript -process(): ChildProcess | null; -``` -Returns: - -ChildProcess \| null - diff --git a/new-docs/puppeteer.browser.target.md b/new-docs/puppeteer.browser.target.md deleted file mode 100644 index 2bc6f43e..00000000 --- a/new-docs/puppeteer.browser.target.md +++ /dev/null @@ -1,17 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [Browser](./puppeteer.browser.md) > [target](./puppeteer.browser.target.md) - -## Browser.target() method - -The target associated with the browser. - -Signature: - -```typescript -target(): Target; -``` -Returns: - -[Target](./puppeteer.target.md) - diff --git a/new-docs/puppeteer.browser.targets.md b/new-docs/puppeteer.browser.targets.md deleted file mode 100644 index c823ffed..00000000 --- a/new-docs/puppeteer.browser.targets.md +++ /dev/null @@ -1,17 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [Browser](./puppeteer.browser.md) > [targets](./puppeteer.browser.targets.md) - -## Browser.targets() method - -All active targets inside the Browser. In case of multiple browser contexts, returns an array with all the targets in all browser contexts. - -Signature: - -```typescript -targets(): Target[]; -``` -Returns: - -[Target](./puppeteer.target.md)\[\] - diff --git a/new-docs/puppeteer.browser.useragent.md b/new-docs/puppeteer.browser.useragent.md deleted file mode 100644 index a93a98ff..00000000 --- a/new-docs/puppeteer.browser.useragent.md +++ /dev/null @@ -1,17 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [Browser](./puppeteer.browser.md) > [userAgent](./puppeteer.browser.useragent.md) - -## Browser.userAgent() method - -The browser's original user agent. Pages can override the browser user agent with [Page.setUserAgent()](./puppeteer.page.setuseragent.md). - -Signature: - -```typescript -userAgent(): Promise; -``` -Returns: - -Promise<string> - diff --git a/new-docs/puppeteer.browser.version.md b/new-docs/puppeteer.browser.version.md deleted file mode 100644 index 9570f3fc..00000000 --- a/new-docs/puppeteer.browser.version.md +++ /dev/null @@ -1,23 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [Browser](./puppeteer.browser.md) > [version](./puppeteer.browser.version.md) - -## Browser.version() method - -A string representing the browser name and version. - -Signature: - -```typescript -version(): Promise; -``` -Returns: - -Promise<string> - -## Remarks - -For headless Chromium, this is similar to `HeadlessChrome/61.0.3153.0`. For non-headless, this is similar to `Chrome/61.0.3153.0`. - -The format of browser.version() might change with future releases of Chromium. - diff --git a/new-docs/puppeteer.browser.waitfortarget.md b/new-docs/puppeteer.browser.waitfortarget.md deleted file mode 100644 index 15d2806f..00000000 --- a/new-docs/puppeteer.browser.waitfortarget.md +++ /dev/null @@ -1,37 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [Browser](./puppeteer.browser.md) > [waitForTarget](./puppeteer.browser.waitfortarget.md) - -## Browser.waitForTarget() method - -Searches for a target in all browser contexts. - -Signature: - -```typescript -waitForTarget(predicate: (x: Target) => boolean, options?: WaitForTargetOptions): Promise; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| predicate | (x: [Target](./puppeteer.target.md)) => boolean | A function to be run for every target. | -| options | [WaitForTargetOptions](./puppeteer.waitfortargetoptions.md) | | - -Returns: - -Promise<[Target](./puppeteer.target.md)> - -The first target found that matches the `predicate` function. - -## Example - -An example of finding a target for a page opened via `window.open`: - -```js -await page.evaluate(() => window.open('https://www.example.com/')); -const newWindowTarget = await browser.waitForTarget(target => target.url() === 'https://www.example.com/'); - -``` - diff --git a/new-docs/puppeteer.browser.wsendpoint.md b/new-docs/puppeteer.browser.wsendpoint.md deleted file mode 100644 index 670c2cef..00000000 --- a/new-docs/puppeteer.browser.wsendpoint.md +++ /dev/null @@ -1,25 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [Browser](./puppeteer.browser.md) > [wsEndpoint](./puppeteer.browser.wsendpoint.md) - -## Browser.wsEndpoint() method - -The browser websocket endpoint which can be used as an argument to [Puppeteer.connect()](./puppeteer.puppeteer.connect.md). - -Signature: - -```typescript -wsEndpoint(): string; -``` -Returns: - -string - -The Browser websocket url. - -## Remarks - -The format is `ws://${host}:${port}/devtools/browser/`. - -You can find the `webSocketDebuggerUrl` from `http://${host}:${port}/json/version`. Learn more about the [devtools protocol](https://chromedevtools.github.io/devtools-protocol) and the [browser endpoint](https://chromedevtools.github.io/devtools-protocol/#how-do-i-access-the-browser-target). - diff --git a/new-docs/puppeteer.browsercontext.browser.md b/new-docs/puppeteer.browsercontext.browser.md deleted file mode 100644 index 92bfd842..00000000 --- a/new-docs/puppeteer.browsercontext.browser.md +++ /dev/null @@ -1,17 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BrowserContext](./puppeteer.browsercontext.md) > [browser](./puppeteer.browsercontext.browser.md) - -## BrowserContext.browser() method - -The browser this browser context belongs to. - -Signature: - -```typescript -browser(): Browser; -``` -Returns: - -[Browser](./puppeteer.browser.md) - diff --git a/new-docs/puppeteer.browsercontext.clearpermissionoverrides.md b/new-docs/puppeteer.browsercontext.clearpermissionoverrides.md deleted file mode 100644 index 0ca4c2f5..00000000 --- a/new-docs/puppeteer.browsercontext.clearpermissionoverrides.md +++ /dev/null @@ -1,28 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BrowserContext](./puppeteer.browsercontext.md) > [clearPermissionOverrides](./puppeteer.browsercontext.clearpermissionoverrides.md) - -## BrowserContext.clearPermissionOverrides() method - -Clears all permission overrides for the browser context. - -Signature: - -```typescript -clearPermissionOverrides(): Promise; -``` -Returns: - -Promise<void> - -## Example - - -```js -const context = browser.defaultBrowserContext(); -context.overridePermissions('https://example.com', ['clipboard-read']); -// do stuff .. -context.clearPermissionOverrides(); - -``` - diff --git a/new-docs/puppeteer.browsercontext.close.md b/new-docs/puppeteer.browsercontext.close.md deleted file mode 100644 index 88455198..00000000 --- a/new-docs/puppeteer.browsercontext.close.md +++ /dev/null @@ -1,21 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BrowserContext](./puppeteer.browsercontext.md) > [close](./puppeteer.browsercontext.close.md) - -## BrowserContext.close() method - -Closes the browser context. All the targets that belong to the browser context will be closed. - -Signature: - -```typescript -close(): Promise; -``` -Returns: - -Promise<void> - -## Remarks - -Only incognito browser contexts can be closed. - diff --git a/new-docs/puppeteer.browsercontext.isincognito.md b/new-docs/puppeteer.browsercontext.isincognito.md deleted file mode 100644 index f54f9189..00000000 --- a/new-docs/puppeteer.browsercontext.isincognito.md +++ /dev/null @@ -1,21 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BrowserContext](./puppeteer.browsercontext.md) > [isIncognito](./puppeteer.browsercontext.isincognito.md) - -## BrowserContext.isIncognito() method - -Returns whether BrowserContext is incognito. The default browser context is the only non-incognito browser context. - -Signature: - -```typescript -isIncognito(): boolean; -``` -Returns: - -boolean - -## Remarks - -The default browser context cannot be closed. - diff --git a/new-docs/puppeteer.browsercontext.md b/new-docs/puppeteer.browsercontext.md deleted file mode 100644 index d3df508b..00000000 --- a/new-docs/puppeteer.browsercontext.md +++ /dev/null @@ -1,54 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BrowserContext](./puppeteer.browsercontext.md) - -## BrowserContext class - -BrowserContexts provide a way to operate multiple independent browser sessions. When a browser is launched, it has a single BrowserContext used by default. The method [Browser.newPage](./puppeteer.browser.newpage.md) creates a page in the default browser context. - -Signature: - -```typescript -export declare class BrowserContext extends EventEmitter -``` -Extends: [EventEmitter](./puppeteer.eventemitter.md) - -## Remarks - -The Browser class extends from Puppeteer's [EventEmitter](./puppeteer.eventemitter.md) class and will emit various events which are documented in the [BrowserContextEmittedEvents](./puppeteer.browsercontextemittedevents.md) enum. - -If a page opens another page, e.g. with a `window.open` call, the popup will belong to the parent page's browser context. - -Puppeteer allows creation of "incognito" browser contexts with [Browser.createIncognitoBrowserContext](./puppeteer.browser.createincognitobrowsercontext.md) method. "Incognito" browser contexts don't write any browsing data to disk. - -The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `BrowserContext` class. - -## Example - - -```js -// Create a new incognito browser context -const context = await browser.createIncognitoBrowserContext(); -// Create a new page inside context. -const page = await context.newPage(); -// ... do stuff with page ... -await page.goto('https://example.com'); -// Dispose context once it's no longer needed. -await context.close(); - -``` - -## Methods - -| Method | Modifiers | Description | -| --- | --- | --- | -| [browser()](./puppeteer.browsercontext.browser.md) | | The browser this browser context belongs to. | -| [clearPermissionOverrides()](./puppeteer.browsercontext.clearpermissionoverrides.md) | | Clears all permission overrides for the browser context. | -| [close()](./puppeteer.browsercontext.close.md) | | Closes the browser context. All the targets that belong to the browser context will be closed. | -| [isIncognito()](./puppeteer.browsercontext.isincognito.md) | | Returns whether BrowserContext is incognito. The default browser context is the only non-incognito browser context. | -| [newPage()](./puppeteer.browsercontext.newpage.md) | | Creates a new page in the browser context. | -| [overridePermissions(origin, permissions)](./puppeteer.browsercontext.overridepermissions.md) | | | -| [pages()](./puppeteer.browsercontext.pages.md) | | An array of all pages inside the browser context. | -| [targets()](./puppeteer.browsercontext.targets.md) | | An array of all active targets inside the browser context. | -| [waitForTarget(predicate, options)](./puppeteer.browsercontext.waitfortarget.md) | | This searches for a target in this specific browser context. | - diff --git a/new-docs/puppeteer.browsercontext.newpage.md b/new-docs/puppeteer.browsercontext.newpage.md deleted file mode 100644 index b68ba5cc..00000000 --- a/new-docs/puppeteer.browsercontext.newpage.md +++ /dev/null @@ -1,17 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BrowserContext](./puppeteer.browsercontext.md) > [newPage](./puppeteer.browsercontext.newpage.md) - -## BrowserContext.newPage() method - -Creates a new page in the browser context. - -Signature: - -```typescript -newPage(): Promise; -``` -Returns: - -Promise<[Page](./puppeteer.page.md)> - diff --git a/new-docs/puppeteer.browsercontext.overridepermissions.md b/new-docs/puppeteer.browsercontext.overridepermissions.md deleted file mode 100644 index 8f1e5b78..00000000 --- a/new-docs/puppeteer.browsercontext.overridepermissions.md +++ /dev/null @@ -1,32 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BrowserContext](./puppeteer.browsercontext.md) > [overridePermissions](./puppeteer.browsercontext.overridepermissions.md) - -## BrowserContext.overridePermissions() method - -Signature: - -```typescript -overridePermissions(origin: string, permissions: string[]): Promise; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| origin | string | The origin to grant permissions to, e.g. "https://example.com". | -| permissions | string\[\] | An array of permissions to grant. All permissions that are not listed here will be automatically denied. | - -Returns: - -Promise<void> - -## Example - - -```js -const context = browser.defaultBrowserContext(); -await context.overridePermissions('https://html5demos.com', ['geolocation']); - -``` - diff --git a/new-docs/puppeteer.browsercontext.pages.md b/new-docs/puppeteer.browsercontext.pages.md deleted file mode 100644 index 23a563b0..00000000 --- a/new-docs/puppeteer.browsercontext.pages.md +++ /dev/null @@ -1,19 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BrowserContext](./puppeteer.browsercontext.md) > [pages](./puppeteer.browsercontext.pages.md) - -## BrowserContext.pages() method - -An array of all pages inside the browser context. - -Signature: - -```typescript -pages(): Promise; -``` -Returns: - -Promise<[Page](./puppeteer.page.md)\[\]> - -Promise which resolves to an array of all open pages. Non visible pages, such as `"background_page"`, will not be listed here. You can find them using [the target page](./puppeteer.target.page.md). - diff --git a/new-docs/puppeteer.browsercontext.targets.md b/new-docs/puppeteer.browsercontext.targets.md deleted file mode 100644 index 57326cc6..00000000 --- a/new-docs/puppeteer.browsercontext.targets.md +++ /dev/null @@ -1,17 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BrowserContext](./puppeteer.browsercontext.md) > [targets](./puppeteer.browsercontext.targets.md) - -## BrowserContext.targets() method - -An array of all active targets inside the browser context. - -Signature: - -```typescript -targets(): Target[]; -``` -Returns: - -[Target](./puppeteer.target.md)\[\] - diff --git a/new-docs/puppeteer.browsercontext.waitfortarget.md b/new-docs/puppeteer.browsercontext.waitfortarget.md deleted file mode 100644 index 13421992..00000000 --- a/new-docs/puppeteer.browsercontext.waitfortarget.md +++ /dev/null @@ -1,39 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BrowserContext](./puppeteer.browsercontext.md) > [waitForTarget](./puppeteer.browsercontext.waitfortarget.md) - -## BrowserContext.waitForTarget() method - -This searches for a target in this specific browser context. - -Signature: - -```typescript -waitForTarget(predicate: (x: Target) => boolean, options?: { - timeout?: number; - }): Promise; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| predicate | (x: [Target](./puppeteer.target.md)) => boolean | A function to be run for every target | -| options | { timeout?: number; } | An object of options. Accepts a timout, which is the maximum wait time in milliseconds. Pass 0 to disable the timeout. Defaults to 30 seconds. | - -Returns: - -Promise<[Target](./puppeteer.target.md)> - -Promise which resolves to the first target found that matches the `predicate` function. - -## Example - -An example of finding a target for a page opened via `window.open`: - -```js -await page.evaluate(() => window.open('https://www.example.com/')); -const newWindowTarget = await browserContext.waitForTarget(target => target.url() === 'https://www.example.com/'); - -``` - diff --git a/new-docs/puppeteer.browsercontextemittedevents.md b/new-docs/puppeteer.browsercontextemittedevents.md deleted file mode 100644 index 3929ad58..00000000 --- a/new-docs/puppeteer.browsercontextemittedevents.md +++ /dev/null @@ -1,20 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BrowserContextEmittedEvents](./puppeteer.browsercontextemittedevents.md) - -## BrowserContextEmittedEvents enum - -Signature: - -```typescript -export declare const enum BrowserContextEmittedEvents -``` - -## Enumeration Members - -| Member | Value | Description | -| --- | --- | --- | -| TargetChanged | "targetchanged" | Emitted when the url of a target inside the browser context changes. Contains a [Target](./puppeteer.target.md) instance. | -| TargetCreated | "targetcreated" | Emitted when a target is created within the browser context, for example when a new page is opened by [window.open](https://developer.mozilla.org/en-US/docs/Web/API/Window/open) or by [browserContext.newPage](./puppeteer.browsercontext.newpage.md)Contains a [Target](./puppeteer.target.md) instance. | -| TargetDestroyed | "targetdestroyed" | Emitted when a target is destroyed within the browser context, for example when a page is closed. Contains a [Target](./puppeteer.target.md) instance. | - diff --git a/new-docs/puppeteer.browseremittedevents.md b/new-docs/puppeteer.browseremittedevents.md deleted file mode 100644 index 1a8feaf8..00000000 --- a/new-docs/puppeteer.browseremittedevents.md +++ /dev/null @@ -1,23 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BrowserEmittedEvents](./puppeteer.browseremittedevents.md) - -## BrowserEmittedEvents enum - -All the events a [browser instance](./puppeteer.browser.md) may emit. - -Signature: - -```typescript -export declare const enum BrowserEmittedEvents -``` - -## Enumeration Members - -| Member | Value | Description | -| --- | --- | --- | -| Disconnected | "disconnected" | Emitted when Puppeteer gets disconnected from the Chromium instance. This might happen because of one of the following:- Chromium is closed or crashed- The [browser.disconnect](./puppeteer.browser.disconnect.md) method was called. | -| TargetChanged | "targetchanged" | Emitted when the url of a target changes. Contains a [Target](./puppeteer.target.md) instance. | -| TargetCreated | "targetcreated" | Emitted when a target is created, for example when a new page is opened by [window.open](https://developer.mozilla.org/en-US/docs/Web/API/Window/open) or by [browser.newPage](./puppeteer.browser.newpage.md)Contains a [Target](./puppeteer.target.md) instance. | -| TargetDestroyed | "targetdestroyed" | Emitted when a target is destroyed, for example when a page is closed. Contains a [Target](./puppeteer.target.md) instance. | - diff --git a/new-docs/puppeteer.browserfetcher.candownload.md b/new-docs/puppeteer.browserfetcher.candownload.md deleted file mode 100644 index f0a2d544..00000000 --- a/new-docs/puppeteer.browserfetcher.candownload.md +++ /dev/null @@ -1,30 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BrowserFetcher](./puppeteer.browserfetcher.md) > [canDownload](./puppeteer.browserfetcher.candownload.md) - -## BrowserFetcher.canDownload() method - -Initiates a HEAD request to check if the revision is available. - -Signature: - -```typescript -canDownload(revision: string): Promise; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| revision | string | The revision to check availability for. | - -Returns: - -Promise<boolean> - -A promise that resolves to `true` if the revision could be downloaded from the host. - -## Remarks - -This method is affected by the current `product`. - diff --git a/new-docs/puppeteer.browserfetcher.download.md b/new-docs/puppeteer.browserfetcher.download.md deleted file mode 100644 index 81725d09..00000000 --- a/new-docs/puppeteer.browserfetcher.download.md +++ /dev/null @@ -1,31 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BrowserFetcher](./puppeteer.browserfetcher.md) > [download](./puppeteer.browserfetcher.download.md) - -## BrowserFetcher.download() method - -Initiates a GET request to download the revision from the host. - -Signature: - -```typescript -download(revision: string, progressCallback?: (x: number, y: number) => void): Promise; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| revision | string | The revision to download. | -| progressCallback | (x: number, y: number) => void | A function that will be called with two arguments: How many bytes have been downloaded and the total number of bytes of the download. | - -Returns: - -Promise<[BrowserFetcherRevisionInfo](./puppeteer.browserfetcherrevisioninfo.md)> - -A promise with revision information when the revision is downloaded and extracted. - -## Remarks - -This method is affected by the current `product`. - diff --git a/new-docs/puppeteer.browserfetcher.host.md b/new-docs/puppeteer.browserfetcher.host.md deleted file mode 100644 index 5667cb51..00000000 --- a/new-docs/puppeteer.browserfetcher.host.md +++ /dev/null @@ -1,17 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BrowserFetcher](./puppeteer.browserfetcher.md) > [host](./puppeteer.browserfetcher.host.md) - -## BrowserFetcher.host() method - -Signature: - -```typescript -host(): string; -``` -Returns: - -string - -The download host being used. - diff --git a/new-docs/puppeteer.browserfetcher.localrevisions.md b/new-docs/puppeteer.browserfetcher.localrevisions.md deleted file mode 100644 index 8f7c65d1..00000000 --- a/new-docs/puppeteer.browserfetcher.localrevisions.md +++ /dev/null @@ -1,21 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BrowserFetcher](./puppeteer.browserfetcher.md) > [localRevisions](./puppeteer.browserfetcher.localrevisions.md) - -## BrowserFetcher.localRevisions() method - -Signature: - -```typescript -localRevisions(): Promise; -``` -Returns: - -Promise<string\[\]> - -A promise with a list of all revision strings (for the current `product`) available locally on disk. - -## Remarks - -This method is affected by the current `product`. - diff --git a/new-docs/puppeteer.browserfetcher.md b/new-docs/puppeteer.browserfetcher.md deleted file mode 100644 index e335b693..00000000 --- a/new-docs/puppeteer.browserfetcher.md +++ /dev/null @@ -1,45 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BrowserFetcher](./puppeteer.browserfetcher.md) - -## BrowserFetcher class - -BrowserFetcher can download and manage different versions of Chromium and Firefox. - -Signature: - -```typescript -export declare class BrowserFetcher -``` - -## Remarks - -BrowserFetcher operates on revision strings that specify a precise version of Chromium, e.g. `"533271"`. Revision strings can be obtained from [omahaproxy.appspot.com](http://omahaproxy.appspot.com/). In the Firefox case, BrowserFetcher downloads Firefox Nightly and operates on version numbers such as `"75"`. - -The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `BrowserFetcher` class. - -## Example - -An example of using BrowserFetcher to download a specific version of Chromium and running Puppeteer against it: - -```js -const browserFetcher = puppeteer.createBrowserFetcher(); -const revisionInfo = await browserFetcher.download('533271'); -const browser = await puppeteer.launch({executablePath: revisionInfo.executablePath}) - -``` -\*\*NOTE\*\* BrowserFetcher is not designed to work concurrently with other instances of BrowserFetcher that share the same downloads directory. - -## Methods - -| Method | Modifiers | Description | -| --- | --- | --- | -| [canDownload(revision)](./puppeteer.browserfetcher.candownload.md) | | Initiates a HEAD request to check if the revision is available. | -| [download(revision, progressCallback)](./puppeteer.browserfetcher.download.md) | | Initiates a GET request to download the revision from the host. | -| [host()](./puppeteer.browserfetcher.host.md) | | | -| [localRevisions()](./puppeteer.browserfetcher.localrevisions.md) | | | -| [platform()](./puppeteer.browserfetcher.platform.md) | | | -| [product()](./puppeteer.browserfetcher.product.md) | | | -| [remove(revision)](./puppeteer.browserfetcher.remove.md) | | | -| [revisionInfo(revision)](./puppeteer.browserfetcher.revisioninfo.md) | | | - diff --git a/new-docs/puppeteer.browserfetcher.platform.md b/new-docs/puppeteer.browserfetcher.platform.md deleted file mode 100644 index 84e37a79..00000000 --- a/new-docs/puppeteer.browserfetcher.platform.md +++ /dev/null @@ -1,17 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BrowserFetcher](./puppeteer.browserfetcher.md) > [platform](./puppeteer.browserfetcher.platform.md) - -## BrowserFetcher.platform() method - -Signature: - -```typescript -platform(): Platform; -``` -Returns: - -[Platform](./puppeteer.platform.md) - -Returns the current `Platform`. - diff --git a/new-docs/puppeteer.browserfetcher.product.md b/new-docs/puppeteer.browserfetcher.product.md deleted file mode 100644 index 4066dfce..00000000 --- a/new-docs/puppeteer.browserfetcher.product.md +++ /dev/null @@ -1,17 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BrowserFetcher](./puppeteer.browserfetcher.md) > [product](./puppeteer.browserfetcher.product.md) - -## BrowserFetcher.product() method - -Signature: - -```typescript -product(): Product; -``` -Returns: - -[Product](./puppeteer.product.md) - -Returns the current `Product`. - diff --git a/new-docs/puppeteer.browserfetcher.remove.md b/new-docs/puppeteer.browserfetcher.remove.md deleted file mode 100644 index 334abc5f..00000000 --- a/new-docs/puppeteer.browserfetcher.remove.md +++ /dev/null @@ -1,28 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BrowserFetcher](./puppeteer.browserfetcher.md) > [remove](./puppeteer.browserfetcher.remove.md) - -## BrowserFetcher.remove() method - -Signature: - -```typescript -remove(revision: string): Promise; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| revision | string | A revision to remove for the current product. | - -Returns: - -Promise<void> - -A promise that resolves when the revision has been removes or throws if the revision has not been downloaded. - -## Remarks - -This method is affected by the current `product`. - diff --git a/new-docs/puppeteer.browserfetcher.revisioninfo.md b/new-docs/puppeteer.browserfetcher.revisioninfo.md deleted file mode 100644 index 88d4ecad..00000000 --- a/new-docs/puppeteer.browserfetcher.revisioninfo.md +++ /dev/null @@ -1,24 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BrowserFetcher](./puppeteer.browserfetcher.md) > [revisionInfo](./puppeteer.browserfetcher.revisioninfo.md) - -## BrowserFetcher.revisionInfo() method - -Signature: - -```typescript -revisionInfo(revision: string): BrowserFetcherRevisionInfo; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| revision | string | The revision to get info for. | - -Returns: - -[BrowserFetcherRevisionInfo](./puppeteer.browserfetcherrevisioninfo.md) - -The revision info for the given revision. - diff --git a/new-docs/puppeteer.browserfetcheroptions.host.md b/new-docs/puppeteer.browserfetcheroptions.host.md deleted file mode 100644 index bdf86cb8..00000000 --- a/new-docs/puppeteer.browserfetcheroptions.host.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BrowserFetcherOptions](./puppeteer.browserfetcheroptions.md) > [host](./puppeteer.browserfetcheroptions.host.md) - -## BrowserFetcherOptions.host property - -Signature: - -```typescript -host?: string; -``` diff --git a/new-docs/puppeteer.browserfetcheroptions.md b/new-docs/puppeteer.browserfetcheroptions.md deleted file mode 100644 index 58d14dd5..00000000 --- a/new-docs/puppeteer.browserfetcheroptions.md +++ /dev/null @@ -1,22 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BrowserFetcherOptions](./puppeteer.browserfetcheroptions.md) - -## BrowserFetcherOptions interface - - -Signature: - -```typescript -export interface BrowserFetcherOptions -``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [host](./puppeteer.browserfetcheroptions.host.md) | string | | -| [path](./puppeteer.browserfetcheroptions.path.md) | string | | -| [platform](./puppeteer.browserfetcheroptions.platform.md) | [Platform](./puppeteer.platform.md) | | -| [product](./puppeteer.browserfetcheroptions.product.md) | string | | - diff --git a/new-docs/puppeteer.browserfetcheroptions.path.md b/new-docs/puppeteer.browserfetcheroptions.path.md deleted file mode 100644 index ea0fd9d1..00000000 --- a/new-docs/puppeteer.browserfetcheroptions.path.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BrowserFetcherOptions](./puppeteer.browserfetcheroptions.md) > [path](./puppeteer.browserfetcheroptions.path.md) - -## BrowserFetcherOptions.path property - -Signature: - -```typescript -path?: string; -``` diff --git a/new-docs/puppeteer.browserfetcheroptions.platform.md b/new-docs/puppeteer.browserfetcheroptions.platform.md deleted file mode 100644 index cec53aab..00000000 --- a/new-docs/puppeteer.browserfetcheroptions.platform.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BrowserFetcherOptions](./puppeteer.browserfetcheroptions.md) > [platform](./puppeteer.browserfetcheroptions.platform.md) - -## BrowserFetcherOptions.platform property - -Signature: - -```typescript -platform?: Platform; -``` diff --git a/new-docs/puppeteer.browserfetcheroptions.product.md b/new-docs/puppeteer.browserfetcheroptions.product.md deleted file mode 100644 index e7125e46..00000000 --- a/new-docs/puppeteer.browserfetcheroptions.product.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BrowserFetcherOptions](./puppeteer.browserfetcheroptions.md) > [product](./puppeteer.browserfetcheroptions.product.md) - -## BrowserFetcherOptions.product property - -Signature: - -```typescript -product?: string; -``` diff --git a/new-docs/puppeteer.browserfetcherrevisioninfo.executablepath.md b/new-docs/puppeteer.browserfetcherrevisioninfo.executablepath.md deleted file mode 100644 index ef45fac9..00000000 --- a/new-docs/puppeteer.browserfetcherrevisioninfo.executablepath.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BrowserFetcherRevisionInfo](./puppeteer.browserfetcherrevisioninfo.md) > [executablePath](./puppeteer.browserfetcherrevisioninfo.executablepath.md) - -## BrowserFetcherRevisionInfo.executablePath property - -Signature: - -```typescript -executablePath: string; -``` diff --git a/new-docs/puppeteer.browserfetcherrevisioninfo.folderpath.md b/new-docs/puppeteer.browserfetcherrevisioninfo.folderpath.md deleted file mode 100644 index c4ab7a51..00000000 --- a/new-docs/puppeteer.browserfetcherrevisioninfo.folderpath.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BrowserFetcherRevisionInfo](./puppeteer.browserfetcherrevisioninfo.md) > [folderPath](./puppeteer.browserfetcherrevisioninfo.folderpath.md) - -## BrowserFetcherRevisionInfo.folderPath property - -Signature: - -```typescript -folderPath: string; -``` diff --git a/new-docs/puppeteer.browserfetcherrevisioninfo.local.md b/new-docs/puppeteer.browserfetcherrevisioninfo.local.md deleted file mode 100644 index eed4b9cb..00000000 --- a/new-docs/puppeteer.browserfetcherrevisioninfo.local.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BrowserFetcherRevisionInfo](./puppeteer.browserfetcherrevisioninfo.md) > [local](./puppeteer.browserfetcherrevisioninfo.local.md) - -## BrowserFetcherRevisionInfo.local property - -Signature: - -```typescript -local: boolean; -``` diff --git a/new-docs/puppeteer.browserfetcherrevisioninfo.md b/new-docs/puppeteer.browserfetcherrevisioninfo.md deleted file mode 100644 index d17fc3df..00000000 --- a/new-docs/puppeteer.browserfetcherrevisioninfo.md +++ /dev/null @@ -1,24 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BrowserFetcherRevisionInfo](./puppeteer.browserfetcherrevisioninfo.md) - -## BrowserFetcherRevisionInfo interface - - -Signature: - -```typescript -export interface BrowserFetcherRevisionInfo -``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [executablePath](./puppeteer.browserfetcherrevisioninfo.executablepath.md) | string | | -| [folderPath](./puppeteer.browserfetcherrevisioninfo.folderpath.md) | string | | -| [local](./puppeteer.browserfetcherrevisioninfo.local.md) | boolean | | -| [product](./puppeteer.browserfetcherrevisioninfo.product.md) | string | | -| [revision](./puppeteer.browserfetcherrevisioninfo.revision.md) | string | | -| [url](./puppeteer.browserfetcherrevisioninfo.url.md) | string | | - diff --git a/new-docs/puppeteer.browserfetcherrevisioninfo.product.md b/new-docs/puppeteer.browserfetcherrevisioninfo.product.md deleted file mode 100644 index eb32e35b..00000000 --- a/new-docs/puppeteer.browserfetcherrevisioninfo.product.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BrowserFetcherRevisionInfo](./puppeteer.browserfetcherrevisioninfo.md) > [product](./puppeteer.browserfetcherrevisioninfo.product.md) - -## BrowserFetcherRevisionInfo.product property - -Signature: - -```typescript -product: string; -``` diff --git a/new-docs/puppeteer.browserfetcherrevisioninfo.revision.md b/new-docs/puppeteer.browserfetcherrevisioninfo.revision.md deleted file mode 100644 index 9fa0d1d5..00000000 --- a/new-docs/puppeteer.browserfetcherrevisioninfo.revision.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BrowserFetcherRevisionInfo](./puppeteer.browserfetcherrevisioninfo.md) > [revision](./puppeteer.browserfetcherrevisioninfo.revision.md) - -## BrowserFetcherRevisionInfo.revision property - -Signature: - -```typescript -revision: string; -``` diff --git a/new-docs/puppeteer.browserfetcherrevisioninfo.url.md b/new-docs/puppeteer.browserfetcherrevisioninfo.url.md deleted file mode 100644 index aced0bfc..00000000 --- a/new-docs/puppeteer.browserfetcherrevisioninfo.url.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BrowserFetcherRevisionInfo](./puppeteer.browserfetcherrevisioninfo.md) > [url](./puppeteer.browserfetcherrevisioninfo.url.md) - -## BrowserFetcherRevisionInfo.url property - -Signature: - -```typescript -url: string; -``` diff --git a/new-docs/puppeteer.browseroptions.defaultviewport.md b/new-docs/puppeteer.browseroptions.defaultviewport.md deleted file mode 100644 index 5cb4035c..00000000 --- a/new-docs/puppeteer.browseroptions.defaultviewport.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BrowserOptions](./puppeteer.browseroptions.md) > [defaultViewport](./puppeteer.browseroptions.defaultviewport.md) - -## BrowserOptions.defaultViewport property - -Signature: - -```typescript -defaultViewport?: Viewport; -``` diff --git a/new-docs/puppeteer.browseroptions.ignorehttpserrors.md b/new-docs/puppeteer.browseroptions.ignorehttpserrors.md deleted file mode 100644 index a1951dde..00000000 --- a/new-docs/puppeteer.browseroptions.ignorehttpserrors.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BrowserOptions](./puppeteer.browseroptions.md) > [ignoreHTTPSErrors](./puppeteer.browseroptions.ignorehttpserrors.md) - -## BrowserOptions.ignoreHTTPSErrors property - -Signature: - -```typescript -ignoreHTTPSErrors?: boolean; -``` diff --git a/new-docs/puppeteer.browseroptions.md b/new-docs/puppeteer.browseroptions.md deleted file mode 100644 index 3decd6b9..00000000 --- a/new-docs/puppeteer.browseroptions.md +++ /dev/null @@ -1,22 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BrowserOptions](./puppeteer.browseroptions.md) - -## BrowserOptions interface - -Generic browser options that can be passed when launching any browser. - -Signature: - -```typescript -export interface BrowserOptions -``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [defaultViewport](./puppeteer.browseroptions.defaultviewport.md) | Viewport | | -| [ignoreHTTPSErrors](./puppeteer.browseroptions.ignorehttpserrors.md) | boolean | | -| [slowMo](./puppeteer.browseroptions.slowmo.md) | number | | - diff --git a/new-docs/puppeteer.browseroptions.slowmo.md b/new-docs/puppeteer.browseroptions.slowmo.md deleted file mode 100644 index 27a83884..00000000 --- a/new-docs/puppeteer.browseroptions.slowmo.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [BrowserOptions](./puppeteer.browseroptions.md) > [slowMo](./puppeteer.browseroptions.slowmo.md) - -## BrowserOptions.slowMo property - -Signature: - -```typescript -slowMo?: number; -``` diff --git a/new-docs/puppeteer.cdpsession.detach.md b/new-docs/puppeteer.cdpsession.detach.md deleted file mode 100644 index 40856a9c..00000000 --- a/new-docs/puppeteer.cdpsession.detach.md +++ /dev/null @@ -1,17 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [CDPSession](./puppeteer.cdpsession.md) > [detach](./puppeteer.cdpsession.detach.md) - -## CDPSession.detach() method - -Detaches the cdpSession from the target. Once detached, the cdpSession object won't emit any events and can't be used to send messages. - -Signature: - -```typescript -detach(): Promise; -``` -Returns: - -Promise<void> - diff --git a/new-docs/puppeteer.cdpsession.md b/new-docs/puppeteer.cdpsession.md deleted file mode 100644 index db75960e..00000000 --- a/new-docs/puppeteer.cdpsession.md +++ /dev/null @@ -1,45 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [CDPSession](./puppeteer.cdpsession.md) - -## CDPSession class - -The `CDPSession` instances are used to talk raw Chrome Devtools Protocol. - -Signature: - -```typescript -export declare class CDPSession extends EventEmitter -``` -Extends: [EventEmitter](./puppeteer.eventemitter.md) - -## Remarks - -Protocol methods can be called with [CDPSession.send()](./puppeteer.cdpsession.send.md) method and protocol events can be subscribed to with `CDPSession.on` method. - -Useful links: [DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/) and [Getting Started with DevTools Protocol](https://github.com/aslushnikov/getting-started-with-cdp/blob/master/README.md). - -The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `CDPSession` class. - -## Example - - -```js -const client = await page.target().createCDPSession(); -await client.send('Animation.enable'); -client.on('Animation.animationCreated', () => console.log('Animation created!')); -const response = await client.send('Animation.getPlaybackRate'); -console.log('playback rate is ' + response.playbackRate); -await client.send('Animation.setPlaybackRate', { - playbackRate: response.playbackRate / 2 -}); - -``` - -## Methods - -| Method | Modifiers | Description | -| --- | --- | --- | -| [detach()](./puppeteer.cdpsession.detach.md) | | Detaches the cdpSession from the target. Once detached, the cdpSession object won't emit any events and can't be used to send messages. | -| [send(method, paramArgs)](./puppeteer.cdpsession.send.md) | | | - diff --git a/new-docs/puppeteer.cdpsession.send.md b/new-docs/puppeteer.cdpsession.send.md deleted file mode 100644 index dce83b49..00000000 --- a/new-docs/puppeteer.cdpsession.send.md +++ /dev/null @@ -1,23 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [CDPSession](./puppeteer.cdpsession.md) > [send](./puppeteer.cdpsession.send.md) - -## CDPSession.send() method - -Signature: - -```typescript -send(method: T, ...paramArgs: ProtocolMapping.Commands[T]['paramsType']): Promise; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| method | T | | -| paramArgs | ProtocolMapping.Commands\[T\]\['paramsType'\] | | - -Returns: - -Promise<ProtocolMapping.Commands\[T\]\['returnType'\]> - diff --git a/new-docs/puppeteer.chromeargoptions.args.md b/new-docs/puppeteer.chromeargoptions.args.md deleted file mode 100644 index 5ae5f770..00000000 --- a/new-docs/puppeteer.chromeargoptions.args.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ChromeArgOptions](./puppeteer.chromeargoptions.md) > [args](./puppeteer.chromeargoptions.args.md) - -## ChromeArgOptions.args property - -Signature: - -```typescript -args?: string[]; -``` diff --git a/new-docs/puppeteer.chromeargoptions.devtools.md b/new-docs/puppeteer.chromeargoptions.devtools.md deleted file mode 100644 index b1cc7c89..00000000 --- a/new-docs/puppeteer.chromeargoptions.devtools.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ChromeArgOptions](./puppeteer.chromeargoptions.md) > [devtools](./puppeteer.chromeargoptions.devtools.md) - -## ChromeArgOptions.devtools property - -Signature: - -```typescript -devtools?: boolean; -``` diff --git a/new-docs/puppeteer.chromeargoptions.headless.md b/new-docs/puppeteer.chromeargoptions.headless.md deleted file mode 100644 index 8636f6e6..00000000 --- a/new-docs/puppeteer.chromeargoptions.headless.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ChromeArgOptions](./puppeteer.chromeargoptions.md) > [headless](./puppeteer.chromeargoptions.headless.md) - -## ChromeArgOptions.headless property - -Signature: - -```typescript -headless?: boolean; -``` diff --git a/new-docs/puppeteer.chromeargoptions.md b/new-docs/puppeteer.chromeargoptions.md deleted file mode 100644 index 27e52fd0..00000000 --- a/new-docs/puppeteer.chromeargoptions.md +++ /dev/null @@ -1,23 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ChromeArgOptions](./puppeteer.chromeargoptions.md) - -## ChromeArgOptions interface - -Launcher options that only apply to Chrome. - -Signature: - -```typescript -export interface ChromeArgOptions -``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [args](./puppeteer.chromeargoptions.args.md) | string\[\] | | -| [devtools](./puppeteer.chromeargoptions.devtools.md) | boolean | | -| [headless](./puppeteer.chromeargoptions.headless.md) | boolean | | -| [userDataDir](./puppeteer.chromeargoptions.userdatadir.md) | string | | - diff --git a/new-docs/puppeteer.chromeargoptions.userdatadir.md b/new-docs/puppeteer.chromeargoptions.userdatadir.md deleted file mode 100644 index 8d5469e2..00000000 --- a/new-docs/puppeteer.chromeargoptions.userdatadir.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ChromeArgOptions](./puppeteer.chromeargoptions.md) > [userDataDir](./puppeteer.chromeargoptions.userdatadir.md) - -## ChromeArgOptions.userDataDir property - -Signature: - -```typescript -userDataDir?: string; -``` diff --git a/new-docs/puppeteer.clickoptions.button.md b/new-docs/puppeteer.clickoptions.button.md deleted file mode 100644 index d97dcca8..00000000 --- a/new-docs/puppeteer.clickoptions.button.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ClickOptions](./puppeteer.clickoptions.md) > [button](./puppeteer.clickoptions.button.md) - -## ClickOptions.button property - -Signature: - -```typescript -button?: 'left' | 'right' | 'middle'; -``` diff --git a/new-docs/puppeteer.clickoptions.clickcount.md b/new-docs/puppeteer.clickoptions.clickcount.md deleted file mode 100644 index 87f48934..00000000 --- a/new-docs/puppeteer.clickoptions.clickcount.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ClickOptions](./puppeteer.clickoptions.md) > [clickCount](./puppeteer.clickoptions.clickcount.md) - -## ClickOptions.clickCount property - -Signature: - -```typescript -clickCount?: number; -``` diff --git a/new-docs/puppeteer.clickoptions.delay.md b/new-docs/puppeteer.clickoptions.delay.md deleted file mode 100644 index 04f35d43..00000000 --- a/new-docs/puppeteer.clickoptions.delay.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ClickOptions](./puppeteer.clickoptions.md) > [delay](./puppeteer.clickoptions.delay.md) - -## ClickOptions.delay property - -Time to wait between `mousedown` and `mouseup` in milliseconds. - -Signature: - -```typescript -delay?: number; -``` diff --git a/new-docs/puppeteer.clickoptions.md b/new-docs/puppeteer.clickoptions.md deleted file mode 100644 index abd5fd00..00000000 --- a/new-docs/puppeteer.clickoptions.md +++ /dev/null @@ -1,21 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ClickOptions](./puppeteer.clickoptions.md) - -## ClickOptions interface - - -Signature: - -```typescript -export interface ClickOptions -``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [button](./puppeteer.clickoptions.button.md) | 'left' \| 'right' \| 'middle' | | -| [clickCount](./puppeteer.clickoptions.clickcount.md) | number | | -| [delay](./puppeteer.clickoptions.delay.md) | number | Time to wait between mousedown and mouseup in milliseconds. | - diff --git a/new-docs/puppeteer.connectoptions.browserurl.md b/new-docs/puppeteer.connectoptions.browserurl.md deleted file mode 100644 index 968317d6..00000000 --- a/new-docs/puppeteer.connectoptions.browserurl.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ConnectOptions](./puppeteer.connectoptions.md) > [browserURL](./puppeteer.connectoptions.browserurl.md) - -## ConnectOptions.browserURL property - -Signature: - -```typescript -browserURL?: string; -``` diff --git a/new-docs/puppeteer.connectoptions.browserwsendpoint.md b/new-docs/puppeteer.connectoptions.browserwsendpoint.md deleted file mode 100644 index 72abbfb1..00000000 --- a/new-docs/puppeteer.connectoptions.browserwsendpoint.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ConnectOptions](./puppeteer.connectoptions.md) > [browserWSEndpoint](./puppeteer.connectoptions.browserwsendpoint.md) - -## ConnectOptions.browserWSEndpoint property - -Signature: - -```typescript -browserWSEndpoint?: string; -``` diff --git a/new-docs/puppeteer.connectoptions.md b/new-docs/puppeteer.connectoptions.md deleted file mode 100644 index 9377a965..00000000 --- a/new-docs/puppeteer.connectoptions.md +++ /dev/null @@ -1,22 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ConnectOptions](./puppeteer.connectoptions.md) - -## ConnectOptions interface - -Signature: - -```typescript -export interface ConnectOptions extends BrowserOptions -``` -Extends: [BrowserOptions](./puppeteer.browseroptions.md) - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [browserURL](./puppeteer.connectoptions.browserurl.md) | string | | -| [browserWSEndpoint](./puppeteer.connectoptions.browserwsendpoint.md) | string | | -| [product](./puppeteer.connectoptions.product.md) | [Product](./puppeteer.product.md) | | -| [transport](./puppeteer.connectoptions.transport.md) | ConnectionTransport | | - diff --git a/new-docs/puppeteer.connectoptions.product.md b/new-docs/puppeteer.connectoptions.product.md deleted file mode 100644 index 50b7d20f..00000000 --- a/new-docs/puppeteer.connectoptions.product.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ConnectOptions](./puppeteer.connectoptions.md) > [product](./puppeteer.connectoptions.product.md) - -## ConnectOptions.product property - -Signature: - -```typescript -product?: Product; -``` diff --git a/new-docs/puppeteer.connectoptions.transport.md b/new-docs/puppeteer.connectoptions.transport.md deleted file mode 100644 index 34819769..00000000 --- a/new-docs/puppeteer.connectoptions.transport.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ConnectOptions](./puppeteer.connectoptions.md) > [transport](./puppeteer.connectoptions.transport.md) - -## ConnectOptions.transport property - -Signature: - -```typescript -transport?: ConnectionTransport; -``` diff --git a/new-docs/puppeteer.consolemessage._constructor_.md b/new-docs/puppeteer.consolemessage._constructor_.md deleted file mode 100644 index f362981a..00000000 --- a/new-docs/puppeteer.consolemessage._constructor_.md +++ /dev/null @@ -1,23 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ConsoleMessage](./puppeteer.consolemessage.md) > [(constructor)](./puppeteer.consolemessage._constructor_.md) - -## ConsoleMessage.(constructor) - -Constructs a new instance of the `ConsoleMessage` class - -Signature: - -```typescript -constructor(type: ConsoleMessageType, text: string, args: JSHandle[], stackTraceLocations: ConsoleMessageLocation[]); -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| type | [ConsoleMessageType](./puppeteer.consolemessagetype.md) | | -| text | string | | -| args | [JSHandle](./puppeteer.jshandle.md)\[\] | | -| stackTraceLocations | [ConsoleMessageLocation](./puppeteer.consolemessagelocation.md)\[\] | | - diff --git a/new-docs/puppeteer.consolemessage.args.md b/new-docs/puppeteer.consolemessage.args.md deleted file mode 100644 index 6ba2fdb4..00000000 --- a/new-docs/puppeteer.consolemessage.args.md +++ /dev/null @@ -1,17 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ConsoleMessage](./puppeteer.consolemessage.md) > [args](./puppeteer.consolemessage.args.md) - -## ConsoleMessage.args() method - -Signature: - -```typescript -args(): JSHandle[]; -``` -Returns: - -[JSHandle](./puppeteer.jshandle.md)\[\] - -An array of arguments passed to the console. - diff --git a/new-docs/puppeteer.consolemessage.location.md b/new-docs/puppeteer.consolemessage.location.md deleted file mode 100644 index f9b2f799..00000000 --- a/new-docs/puppeteer.consolemessage.location.md +++ /dev/null @@ -1,17 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ConsoleMessage](./puppeteer.consolemessage.md) > [location](./puppeteer.consolemessage.location.md) - -## ConsoleMessage.location() method - -Signature: - -```typescript -location(): ConsoleMessageLocation; -``` -Returns: - -[ConsoleMessageLocation](./puppeteer.consolemessagelocation.md) - -The location of the console message. - diff --git a/new-docs/puppeteer.consolemessage.md b/new-docs/puppeteer.consolemessage.md deleted file mode 100644 index 446d75b5..00000000 --- a/new-docs/puppeteer.consolemessage.md +++ /dev/null @@ -1,30 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ConsoleMessage](./puppeteer.consolemessage.md) - -## ConsoleMessage class - -ConsoleMessage objects are dispatched by page via the 'console' event. - -Signature: - -```typescript -export declare class ConsoleMessage -``` - -## Constructors - -| Constructor | Modifiers | Description | -| --- | --- | --- | -| [(constructor)(type, text, args, stackTraceLocations)](./puppeteer.consolemessage._constructor_.md) | | Constructs a new instance of the ConsoleMessage class | - -## Methods - -| Method | Modifiers | Description | -| --- | --- | --- | -| [args()](./puppeteer.consolemessage.args.md) | | | -| [location()](./puppeteer.consolemessage.location.md) | | | -| [stackTrace()](./puppeteer.consolemessage.stacktrace.md) | | | -| [text()](./puppeteer.consolemessage.text.md) | | | -| [type()](./puppeteer.consolemessage.type.md) | | | - diff --git a/new-docs/puppeteer.consolemessage.stacktrace.md b/new-docs/puppeteer.consolemessage.stacktrace.md deleted file mode 100644 index 7c080c79..00000000 --- a/new-docs/puppeteer.consolemessage.stacktrace.md +++ /dev/null @@ -1,17 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ConsoleMessage](./puppeteer.consolemessage.md) > [stackTrace](./puppeteer.consolemessage.stacktrace.md) - -## ConsoleMessage.stackTrace() method - -Signature: - -```typescript -stackTrace(): ConsoleMessageLocation[]; -``` -Returns: - -[ConsoleMessageLocation](./puppeteer.consolemessagelocation.md)\[\] - -The array of locations on the stack of the console message. - diff --git a/new-docs/puppeteer.consolemessage.text.md b/new-docs/puppeteer.consolemessage.text.md deleted file mode 100644 index 38634ba8..00000000 --- a/new-docs/puppeteer.consolemessage.text.md +++ /dev/null @@ -1,17 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ConsoleMessage](./puppeteer.consolemessage.md) > [text](./puppeteer.consolemessage.text.md) - -## ConsoleMessage.text() method - -Signature: - -```typescript -text(): string; -``` -Returns: - -string - -The text of the console message. - diff --git a/new-docs/puppeteer.consolemessage.type.md b/new-docs/puppeteer.consolemessage.type.md deleted file mode 100644 index 4b0e14fa..00000000 --- a/new-docs/puppeteer.consolemessage.type.md +++ /dev/null @@ -1,17 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ConsoleMessage](./puppeteer.consolemessage.md) > [type](./puppeteer.consolemessage.type.md) - -## ConsoleMessage.type() method - -Signature: - -```typescript -type(): ConsoleMessageType; -``` -Returns: - -[ConsoleMessageType](./puppeteer.consolemessagetype.md) - -The type of the console message. - diff --git a/new-docs/puppeteer.consolemessagelocation.columnnumber.md b/new-docs/puppeteer.consolemessagelocation.columnnumber.md deleted file mode 100644 index 42ff62c0..00000000 --- a/new-docs/puppeteer.consolemessagelocation.columnnumber.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ConsoleMessageLocation](./puppeteer.consolemessagelocation.md) > [columnNumber](./puppeteer.consolemessagelocation.columnnumber.md) - -## ConsoleMessageLocation.columnNumber property - -0-based column number in the resource if known or `undefined` otherwise. - -Signature: - -```typescript -columnNumber?: number; -``` diff --git a/new-docs/puppeteer.consolemessagelocation.linenumber.md b/new-docs/puppeteer.consolemessagelocation.linenumber.md deleted file mode 100644 index 9ddd1fce..00000000 --- a/new-docs/puppeteer.consolemessagelocation.linenumber.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ConsoleMessageLocation](./puppeteer.consolemessagelocation.md) > [lineNumber](./puppeteer.consolemessagelocation.linenumber.md) - -## ConsoleMessageLocation.lineNumber property - -0-based line number in the resource if known or `undefined` otherwise. - -Signature: - -```typescript -lineNumber?: number; -``` diff --git a/new-docs/puppeteer.consolemessagelocation.md b/new-docs/puppeteer.consolemessagelocation.md deleted file mode 100644 index 854c090d..00000000 --- a/new-docs/puppeteer.consolemessagelocation.md +++ /dev/null @@ -1,21 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ConsoleMessageLocation](./puppeteer.consolemessagelocation.md) - -## ConsoleMessageLocation interface - - -Signature: - -```typescript -export interface ConsoleMessageLocation -``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [columnNumber](./puppeteer.consolemessagelocation.columnnumber.md) | number | 0-based column number in the resource if known or undefined otherwise. | -| [lineNumber](./puppeteer.consolemessagelocation.linenumber.md) | number | 0-based line number in the resource if known or undefined otherwise. | -| [url](./puppeteer.consolemessagelocation.url.md) | string | URL of the resource if known or undefined otherwise. | - diff --git a/new-docs/puppeteer.consolemessagelocation.url.md b/new-docs/puppeteer.consolemessagelocation.url.md deleted file mode 100644 index a3cebf3f..00000000 --- a/new-docs/puppeteer.consolemessagelocation.url.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ConsoleMessageLocation](./puppeteer.consolemessagelocation.md) > [url](./puppeteer.consolemessagelocation.url.md) - -## ConsoleMessageLocation.url property - -URL of the resource if known or `undefined` otherwise. - -Signature: - -```typescript -url?: string; -``` diff --git a/new-docs/puppeteer.consolemessagetype.md b/new-docs/puppeteer.consolemessagetype.md deleted file mode 100644 index 17e53756..00000000 --- a/new-docs/puppeteer.consolemessagetype.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ConsoleMessageType](./puppeteer.consolemessagetype.md) - -## ConsoleMessageType type - -The supported types for console messages. - -Signature: - -```typescript -export declare type ConsoleMessageType = 'log' | 'debug' | 'info' | 'error' | 'warning' | 'dir' | 'dirxml' | 'table' | 'trace' | 'clear' | 'startGroup' | 'startGroupCollapsed' | 'endGroup' | 'assert' | 'profile' | 'profileEnd' | 'count' | 'timeEnd' | 'verbose'; -``` diff --git a/new-docs/puppeteer.continuerequestoverrides.headers.md b/new-docs/puppeteer.continuerequestoverrides.headers.md deleted file mode 100644 index 1d39d8ee..00000000 --- a/new-docs/puppeteer.continuerequestoverrides.headers.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ContinueRequestOverrides](./puppeteer.continuerequestoverrides.md) > [headers](./puppeteer.continuerequestoverrides.headers.md) - -## ContinueRequestOverrides.headers property - -Signature: - -```typescript -headers?: Record; -``` diff --git a/new-docs/puppeteer.continuerequestoverrides.md b/new-docs/puppeteer.continuerequestoverrides.md deleted file mode 100644 index 18c7868f..00000000 --- a/new-docs/puppeteer.continuerequestoverrides.md +++ /dev/null @@ -1,22 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ContinueRequestOverrides](./puppeteer.continuerequestoverrides.md) - -## ContinueRequestOverrides interface - - -Signature: - -```typescript -export interface ContinueRequestOverrides -``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [headers](./puppeteer.continuerequestoverrides.headers.md) | Record<string, string> | | -| [method](./puppeteer.continuerequestoverrides.method.md) | string | | -| [postData](./puppeteer.continuerequestoverrides.postdata.md) | string | | -| [url](./puppeteer.continuerequestoverrides.url.md) | string | If set, the request URL will change. This is not a redirect. | - diff --git a/new-docs/puppeteer.continuerequestoverrides.method.md b/new-docs/puppeteer.continuerequestoverrides.method.md deleted file mode 100644 index f68211f2..00000000 --- a/new-docs/puppeteer.continuerequestoverrides.method.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ContinueRequestOverrides](./puppeteer.continuerequestoverrides.md) > [method](./puppeteer.continuerequestoverrides.method.md) - -## ContinueRequestOverrides.method property - -Signature: - -```typescript -method?: string; -``` diff --git a/new-docs/puppeteer.continuerequestoverrides.postdata.md b/new-docs/puppeteer.continuerequestoverrides.postdata.md deleted file mode 100644 index 69703a47..00000000 --- a/new-docs/puppeteer.continuerequestoverrides.postdata.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ContinueRequestOverrides](./puppeteer.continuerequestoverrides.md) > [postData](./puppeteer.continuerequestoverrides.postdata.md) - -## ContinueRequestOverrides.postData property - -Signature: - -```typescript -postData?: string; -``` diff --git a/new-docs/puppeteer.continuerequestoverrides.url.md b/new-docs/puppeteer.continuerequestoverrides.url.md deleted file mode 100644 index 3cd0108a..00000000 --- a/new-docs/puppeteer.continuerequestoverrides.url.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ContinueRequestOverrides](./puppeteer.continuerequestoverrides.md) > [url](./puppeteer.continuerequestoverrides.url.md) - -## ContinueRequestOverrides.url property - -If set, the request URL will change. This is not a redirect. - -Signature: - -```typescript -url?: string; -``` diff --git a/new-docs/puppeteer.coverage._constructor_.md b/new-docs/puppeteer.coverage._constructor_.md deleted file mode 100644 index 4310e77a..00000000 --- a/new-docs/puppeteer.coverage._constructor_.md +++ /dev/null @@ -1,20 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [Coverage](./puppeteer.coverage.md) > [(constructor)](./puppeteer.coverage._constructor_.md) - -## Coverage.(constructor) - -Constructs a new instance of the `Coverage` class - -Signature: - -```typescript -constructor(client: CDPSession); -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| client | [CDPSession](./puppeteer.cdpsession.md) | | - diff --git a/new-docs/puppeteer.coverage.md b/new-docs/puppeteer.coverage.md deleted file mode 100644 index eb041d32..00000000 --- a/new-docs/puppeteer.coverage.md +++ /dev/null @@ -1,62 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [Coverage](./puppeteer.coverage.md) - -## Coverage class - -The Coverage class provides methods to gathers information about parts of JavaScript and CSS that were used by the page. - -Signature: - -```typescript -export declare class Coverage -``` - -## Remarks - -To output coverage in a form consumable by [Istanbul](https://github.com/istanbuljs), see [puppeteer-to-istanbul](https://github.com/istanbuljs/puppeteer-to-istanbul). - -## Example - -An example of using JavaScript and CSS coverage to get percentage of initially executed code: - -```js -// Enable both JavaScript and CSS coverage -await Promise.all([ - page.coverage.startJSCoverage(), - page.coverage.startCSSCoverage() -]); -// Navigate to page -await page.goto('https://example.com'); -// Disable both JavaScript and CSS coverage -const [jsCoverage, cssCoverage] = await Promise.all([ - page.coverage.stopJSCoverage(), - page.coverage.stopCSSCoverage(), -]); -let totalBytes = 0; -let usedBytes = 0; -const coverage = [...jsCoverage, ...cssCoverage]; -for (const entry of coverage) { - totalBytes += entry.text.length; - for (const range of entry.ranges) - usedBytes += range.end - range.start - 1; -} -console.log(`Bytes used: ${usedBytes / totalBytes * 100}%`); - -``` - -## Constructors - -| Constructor | Modifiers | Description | -| --- | --- | --- | -| [(constructor)(client)](./puppeteer.coverage._constructor_.md) | | Constructs a new instance of the Coverage class | - -## Methods - -| Method | Modifiers | Description | -| --- | --- | --- | -| [startCSSCoverage(options)](./puppeteer.coverage.startcsscoverage.md) | | | -| [startJSCoverage(options)](./puppeteer.coverage.startjscoverage.md) | | | -| [stopCSSCoverage()](./puppeteer.coverage.stopcsscoverage.md) | | | -| [stopJSCoverage()](./puppeteer.coverage.stopjscoverage.md) | | | - diff --git a/new-docs/puppeteer.coverage.startcsscoverage.md b/new-docs/puppeteer.coverage.startcsscoverage.md deleted file mode 100644 index 673535d7..00000000 --- a/new-docs/puppeteer.coverage.startcsscoverage.md +++ /dev/null @@ -1,24 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [Coverage](./puppeteer.coverage.md) > [startCSSCoverage](./puppeteer.coverage.startcsscoverage.md) - -## Coverage.startCSSCoverage() method - -Signature: - -```typescript -startCSSCoverage(options?: CSSCoverageOptions): Promise; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| options | [CSSCoverageOptions](./puppeteer.csscoverageoptions.md) | defaults to { resetOnNavigation : true } | - -Returns: - -Promise<void> - -Promise that resolves when coverage is started. - diff --git a/new-docs/puppeteer.coverage.startjscoverage.md b/new-docs/puppeteer.coverage.startjscoverage.md deleted file mode 100644 index cc24db4b..00000000 --- a/new-docs/puppeteer.coverage.startjscoverage.md +++ /dev/null @@ -1,28 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [Coverage](./puppeteer.coverage.md) > [startJSCoverage](./puppeteer.coverage.startjscoverage.md) - -## Coverage.startJSCoverage() method - -Signature: - -```typescript -startJSCoverage(options?: JSCoverageOptions): Promise; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| options | [JSCoverageOptions](./puppeteer.jscoverageoptions.md) | defaults to { resetOnNavigation : true, reportAnonymousScripts : false } | - -Returns: - -Promise<void> - -Promise that resolves when coverage is started. - -## Remarks - -Anonymous scripts are ones that don't have an associated url. These are scripts that are dynamically created on the page using `eval` or `new Function`. If `reportAnonymousScripts` is set to `true`, anonymous scripts will have `__puppeteer_evaluation_script__` as their URL. - diff --git a/new-docs/puppeteer.coverage.stopcsscoverage.md b/new-docs/puppeteer.coverage.stopcsscoverage.md deleted file mode 100644 index 9b9537ce..00000000 --- a/new-docs/puppeteer.coverage.stopcsscoverage.md +++ /dev/null @@ -1,21 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [Coverage](./puppeteer.coverage.md) > [stopCSSCoverage](./puppeteer.coverage.stopcsscoverage.md) - -## Coverage.stopCSSCoverage() method - -Signature: - -```typescript -stopCSSCoverage(): Promise; -``` -Returns: - -Promise<[CoverageEntry](./puppeteer.coverageentry.md)\[\]> - -Promise that resolves to the array of coverage reports for all stylesheets. - -## Remarks - -CSS Coverage doesn't include dynamically injected style tags without sourceURLs. - diff --git a/new-docs/puppeteer.coverage.stopjscoverage.md b/new-docs/puppeteer.coverage.stopjscoverage.md deleted file mode 100644 index 6f126873..00000000 --- a/new-docs/puppeteer.coverage.stopjscoverage.md +++ /dev/null @@ -1,21 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [Coverage](./puppeteer.coverage.md) > [stopJSCoverage](./puppeteer.coverage.stopjscoverage.md) - -## Coverage.stopJSCoverage() method - -Signature: - -```typescript -stopJSCoverage(): Promise; -``` -Returns: - -Promise<[CoverageEntry](./puppeteer.coverageentry.md)\[\]> - -Promise that resolves to the array of coverage reports for all scripts. - -## Remarks - -JavaScript Coverage doesn't include anonymous scripts by default. However, scripts with sourceURLs are reported. - diff --git a/new-docs/puppeteer.coverageentry.md b/new-docs/puppeteer.coverageentry.md deleted file mode 100644 index 96a6b674..00000000 --- a/new-docs/puppeteer.coverageentry.md +++ /dev/null @@ -1,22 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [CoverageEntry](./puppeteer.coverageentry.md) - -## CoverageEntry interface - -The CoverageEntry class represents one entry of the coverage report. - -Signature: - -```typescript -export interface CoverageEntry -``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [ranges](./puppeteer.coverageentry.ranges.md) | Array<{ start: number; end: number; }> | The covered range as start and end positions. | -| [text](./puppeteer.coverageentry.text.md) | string | The content of the style sheet or script. | -| [url](./puppeteer.coverageentry.url.md) | string | The URL of the style sheet or script. | - diff --git a/new-docs/puppeteer.coverageentry.ranges.md b/new-docs/puppeteer.coverageentry.ranges.md deleted file mode 100644 index 2e0cfae9..00000000 --- a/new-docs/puppeteer.coverageentry.ranges.md +++ /dev/null @@ -1,16 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [CoverageEntry](./puppeteer.coverageentry.md) > [ranges](./puppeteer.coverageentry.ranges.md) - -## CoverageEntry.ranges property - -The covered range as start and end positions. - -Signature: - -```typescript -ranges: Array<{ - start: number; - end: number; - }>; -``` diff --git a/new-docs/puppeteer.coverageentry.text.md b/new-docs/puppeteer.coverageentry.text.md deleted file mode 100644 index c01b4246..00000000 --- a/new-docs/puppeteer.coverageentry.text.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [CoverageEntry](./puppeteer.coverageentry.md) > [text](./puppeteer.coverageentry.text.md) - -## CoverageEntry.text property - -The content of the style sheet or script. - -Signature: - -```typescript -text: string; -``` diff --git a/new-docs/puppeteer.coverageentry.url.md b/new-docs/puppeteer.coverageentry.url.md deleted file mode 100644 index cfd89f61..00000000 --- a/new-docs/puppeteer.coverageentry.url.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [CoverageEntry](./puppeteer.coverageentry.md) > [url](./puppeteer.coverageentry.url.md) - -## CoverageEntry.url property - -The URL of the style sheet or script. - -Signature: - -```typescript -url: string; -``` diff --git a/new-docs/puppeteer.credentials.md b/new-docs/puppeteer.credentials.md deleted file mode 100644 index 856b9cd8..00000000 --- a/new-docs/puppeteer.credentials.md +++ /dev/null @@ -1,20 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [Credentials](./puppeteer.credentials.md) - -## Credentials interface - - -Signature: - -```typescript -export interface Credentials -``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [password](./puppeteer.credentials.password.md) | string | | -| [username](./puppeteer.credentials.username.md) | string | | - diff --git a/new-docs/puppeteer.credentials.password.md b/new-docs/puppeteer.credentials.password.md deleted file mode 100644 index 99b0e3a9..00000000 --- a/new-docs/puppeteer.credentials.password.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [Credentials](./puppeteer.credentials.md) > [password](./puppeteer.credentials.password.md) - -## Credentials.password property - -Signature: - -```typescript -password: string; -``` diff --git a/new-docs/puppeteer.credentials.username.md b/new-docs/puppeteer.credentials.username.md deleted file mode 100644 index 6e99806b..00000000 --- a/new-docs/puppeteer.credentials.username.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [Credentials](./puppeteer.credentials.md) > [username](./puppeteer.credentials.username.md) - -## Credentials.username property - -Signature: - -```typescript -username: string; -``` diff --git a/new-docs/puppeteer.csscoverageoptions.md b/new-docs/puppeteer.csscoverageoptions.md deleted file mode 100644 index 875f9f04..00000000 --- a/new-docs/puppeteer.csscoverageoptions.md +++ /dev/null @@ -1,20 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [CSSCoverageOptions](./puppeteer.csscoverageoptions.md) - -## CSSCoverageOptions interface - -Set of configurable options for CSS coverage. - -Signature: - -```typescript -export interface CSSCoverageOptions -``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [resetOnNavigation](./puppeteer.csscoverageoptions.resetonnavigation.md) | boolean | Whether to reset coverage on every navigation. | - diff --git a/new-docs/puppeteer.csscoverageoptions.resetonnavigation.md b/new-docs/puppeteer.csscoverageoptions.resetonnavigation.md deleted file mode 100644 index 7bc03697..00000000 --- a/new-docs/puppeteer.csscoverageoptions.resetonnavigation.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [CSSCoverageOptions](./puppeteer.csscoverageoptions.md) > [resetOnNavigation](./puppeteer.csscoverageoptions.resetonnavigation.md) - -## CSSCoverageOptions.resetOnNavigation property - -Whether to reset coverage on every navigation. - -Signature: - -```typescript -resetOnNavigation?: boolean; -``` diff --git a/new-docs/puppeteer.customqueryhandler.md b/new-docs/puppeteer.customqueryhandler.md deleted file mode 100644 index 76b9928d..00000000 --- a/new-docs/puppeteer.customqueryhandler.md +++ /dev/null @@ -1,21 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [CustomQueryHandler](./puppeteer.customqueryhandler.md) - -## CustomQueryHandler interface - -Contains two functions `queryOne` and `queryAll` that can be [registered](./puppeteer.puppeteer.__experimental_registercustomqueryhandler.md) as alternative querying strategies. The functions `queryOne` and `queryAll` are executed in the page context. `queryOne` should take an `Element` and a selector string as argument and return a single `Element` or `null` if no element is found. `queryAll` takes the same arguments but should instead return a `NodeListOf` or `Array` with all the elements that match the given query selector. - -Signature: - -```typescript -export interface CustomQueryHandler -``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [queryAll](./puppeteer.customqueryhandler.queryall.md) | (element: Element \| Document, selector: string) => Element\[\] \| NodeListOf<Element> | | -| [queryOne](./puppeteer.customqueryhandler.queryone.md) | (element: Element \| Document, selector: string) => Element \| null | | - diff --git a/new-docs/puppeteer.customqueryhandler.queryall.md b/new-docs/puppeteer.customqueryhandler.queryall.md deleted file mode 100644 index c6496466..00000000 --- a/new-docs/puppeteer.customqueryhandler.queryall.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [CustomQueryHandler](./puppeteer.customqueryhandler.md) > [queryAll](./puppeteer.customqueryhandler.queryall.md) - -## CustomQueryHandler.queryAll property - -Signature: - -```typescript -queryAll?: (element: Element | Document, selector: string) => Element[] | NodeListOf; -``` diff --git a/new-docs/puppeteer.customqueryhandler.queryone.md b/new-docs/puppeteer.customqueryhandler.queryone.md deleted file mode 100644 index 95c11ab1..00000000 --- a/new-docs/puppeteer.customqueryhandler.queryone.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [CustomQueryHandler](./puppeteer.customqueryhandler.md) > [queryOne](./puppeteer.customqueryhandler.queryone.md) - -## CustomQueryHandler.queryOne property - -Signature: - -```typescript -queryOne?: (element: Element | Document, selector: string) => Element | null; -``` diff --git a/new-docs/puppeteer.devicesmap.md b/new-docs/puppeteer.devicesmap.md deleted file mode 100644 index e0b069cc..00000000 --- a/new-docs/puppeteer.devicesmap.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [devicesMap](./puppeteer.devicesmap.md) - -## devicesMap variable - -Signature: - -```typescript -devicesMap: DevicesMap -``` diff --git a/new-docs/puppeteer.dialog.accept.md b/new-docs/puppeteer.dialog.accept.md deleted file mode 100644 index e224c479..00000000 --- a/new-docs/puppeteer.dialog.accept.md +++ /dev/null @@ -1,24 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [Dialog](./puppeteer.dialog.md) > [accept](./puppeteer.dialog.accept.md) - -## Dialog.accept() method - -Signature: - -```typescript -accept(promptText?: string): Promise; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| promptText | string | optional text that will be entered in the dialog prompt. Has no effect if the dialog's type is not prompt. | - -Returns: - -Promise<void> - -A promise that resolves when the dialog has been accepted. - diff --git a/new-docs/puppeteer.dialog.defaultvalue.md b/new-docs/puppeteer.dialog.defaultvalue.md deleted file mode 100644 index 91efa442..00000000 --- a/new-docs/puppeteer.dialog.defaultvalue.md +++ /dev/null @@ -1,17 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [Dialog](./puppeteer.dialog.md) > [defaultValue](./puppeteer.dialog.defaultvalue.md) - -## Dialog.defaultValue() method - -Signature: - -```typescript -defaultValue(): string; -``` -Returns: - -string - -The default value of the prompt, or an empty string if the dialog is not a `prompt`. - diff --git a/new-docs/puppeteer.dialog.dismiss.md b/new-docs/puppeteer.dialog.dismiss.md deleted file mode 100644 index b647a473..00000000 --- a/new-docs/puppeteer.dialog.dismiss.md +++ /dev/null @@ -1,17 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [Dialog](./puppeteer.dialog.md) > [dismiss](./puppeteer.dialog.dismiss.md) - -## Dialog.dismiss() method - -Signature: - -```typescript -dismiss(): Promise; -``` -Returns: - -Promise<void> - -A promise which will resolve once the dialog has been dismissed - diff --git a/new-docs/puppeteer.dialog.md b/new-docs/puppeteer.dialog.md deleted file mode 100644 index 14063d5d..00000000 --- a/new-docs/puppeteer.dialog.md +++ /dev/null @@ -1,47 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [Dialog](./puppeteer.dialog.md) - -## Dialog class - -Dialog instances are dispatched by the [Page](./puppeteer.page.md) via the `dialog` event. - -Signature: - -```typescript -export declare class Dialog -``` - -## Remarks - -The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `Dialog` class. - -## Example - - -```js -const puppeteer = require('puppeteer'); - -(async () => { - const browser = await puppeteer.launch(); - const page = await browser.newPage(); - page.on('dialog', async dialog => { - console.log(dialog.message()); - await dialog.dismiss(); - await browser.close(); - }); - page.evaluate(() => alert('1')); -})(); - -``` - -## Methods - -| Method | Modifiers | Description | -| --- | --- | --- | -| [accept(promptText)](./puppeteer.dialog.accept.md) | | | -| [defaultValue()](./puppeteer.dialog.defaultvalue.md) | | | -| [dismiss()](./puppeteer.dialog.dismiss.md) | | | -| [message()](./puppeteer.dialog.message.md) | | | -| [type()](./puppeteer.dialog.type.md) | | | - diff --git a/new-docs/puppeteer.dialog.message.md b/new-docs/puppeteer.dialog.message.md deleted file mode 100644 index 4a3878fc..00000000 --- a/new-docs/puppeteer.dialog.message.md +++ /dev/null @@ -1,17 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [Dialog](./puppeteer.dialog.md) > [message](./puppeteer.dialog.message.md) - -## Dialog.message() method - -Signature: - -```typescript -message(): string; -``` -Returns: - -string - -The message displayed in the dialog. - diff --git a/new-docs/puppeteer.dialog.type.md b/new-docs/puppeteer.dialog.type.md deleted file mode 100644 index 9e737aa6..00000000 --- a/new-docs/puppeteer.dialog.type.md +++ /dev/null @@ -1,17 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [Dialog](./puppeteer.dialog.md) > [type](./puppeteer.dialog.type.md) - -## Dialog.type() method - -Signature: - -```typescript -type(): Protocol.Page.DialogType; -``` -Returns: - -[Protocol.Page.DialogType](./puppeteer.protocol.page.dialogtype.md) - -The type of the dialog. - diff --git a/new-docs/puppeteer.elementhandle._.md b/new-docs/puppeteer.elementhandle._.md deleted file mode 100644 index a6d0df97..00000000 --- a/new-docs/puppeteer.elementhandle._.md +++ /dev/null @@ -1,24 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ElementHandle](./puppeteer.elementhandle.md) > [$](./puppeteer.elementhandle._.md) - -## ElementHandle.$() method - -Runs `element.querySelector` within the page. If no element matches the selector, the return value resolves to `null`. - -Signature: - -```typescript -$(selector: string): Promise; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| selector | string | | - -Returns: - -Promise<[ElementHandle](./puppeteer.elementhandle.md) \| null> - diff --git a/new-docs/puppeteer.elementhandle.__.md b/new-docs/puppeteer.elementhandle.__.md deleted file mode 100644 index 41c9843b..00000000 --- a/new-docs/puppeteer.elementhandle.__.md +++ /dev/null @@ -1,24 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ElementHandle](./puppeteer.elementhandle.md) > [$$](./puppeteer.elementhandle.__.md) - -## ElementHandle.$$() method - -Runs `element.querySelectorAll` within the page. If no elements match the selector, the return value resolves to `[]`. - -Signature: - -```typescript -$$(selector: string): Promise; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| selector | string | | - -Returns: - -Promise<[ElementHandle](./puppeteer.elementhandle.md)\[\]> - diff --git a/new-docs/puppeteer.elementhandle.__eval.md b/new-docs/puppeteer.elementhandle.__eval.md deleted file mode 100644 index ccacd727..00000000 --- a/new-docs/puppeteer.elementhandle.__eval.md +++ /dev/null @@ -1,49 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ElementHandle](./puppeteer.elementhandle.md) > [$$eval](./puppeteer.elementhandle.__eval.md) - -## ElementHandle.$$eval() method - -This method runs `document.querySelectorAll` within the element and passes it as the first argument to `pageFunction`. If there's no element matching `selector`, the method throws an error. - -If `pageFunction` returns a Promise, then `frame.$$eval` would wait for the promise to resolve and return its value. - -Signature: - -```typescript -$$eval(selector: string, pageFunction: (elements: Element[], ...args: unknown[]) => ReturnType | Promise, ...args: SerializableOrJSHandle[]): Promise>; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| selector | string | | -| pageFunction | (elements: Element\[\], ...args: unknown\[\]) => ReturnType \| Promise<ReturnType> | | -| args | [SerializableOrJSHandle](./puppeteer.serializableorjshandle.md)\[\] | | - -Returns: - -Promise<[WrapElementHandle](./puppeteer.wrapelementhandle.md)<ReturnType>> - -## Example 1 - - -```html -
-
Hello!
-
Hi!
-
- -``` - -## Example 2 - - -```js -const feedHandle = await page.$('.feed'); -expect(await feedHandle.$$eval('.tweet', nodes => nodes.map(n => n.innerText))) - .toEqual(['Hello!', 'Hi!']); - -``` - diff --git a/new-docs/puppeteer.elementhandle._eval.md b/new-docs/puppeteer.elementhandle._eval.md deleted file mode 100644 index 4de0423e..00000000 --- a/new-docs/puppeteer.elementhandle._eval.md +++ /dev/null @@ -1,38 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ElementHandle](./puppeteer.elementhandle.md) > [$eval](./puppeteer.elementhandle._eval.md) - -## ElementHandle.$eval() method - -This method runs `document.querySelector` within the element and passes it as the first argument to `pageFunction`. If there's no element matching `selector`, the method throws an error. - -If `pageFunction` returns a Promise, then `frame.$eval` would wait for the promise to resolve and return its value. - -Signature: - -```typescript -$eval(selector: string, pageFunction: (element: Element, ...args: unknown[]) => ReturnType | Promise, ...args: SerializableOrJSHandle[]): Promise>; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| selector | string | | -| pageFunction | (element: Element, ...args: unknown\[\]) => ReturnType \| Promise<ReturnType> | | -| args | [SerializableOrJSHandle](./puppeteer.serializableorjshandle.md)\[\] | | - -Returns: - -Promise<[WrapElementHandle](./puppeteer.wrapelementhandle.md)<ReturnType>> - -## Example - - -```js -const tweetHandle = await page.$('.tweet'); -expect(await tweetHandle.$eval('.like', node => node.innerText)).toBe('100'); -expect(await tweetHandle.$eval('.retweets', node => node.innerText)).toBe('10'); - -``` - diff --git a/new-docs/puppeteer.elementhandle._x.md b/new-docs/puppeteer.elementhandle._x.md deleted file mode 100644 index b40a9b69..00000000 --- a/new-docs/puppeteer.elementhandle._x.md +++ /dev/null @@ -1,24 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ElementHandle](./puppeteer.elementhandle.md) > [$x](./puppeteer.elementhandle._x.md) - -## ElementHandle.$x() method - -The method evaluates the XPath expression relative to the elementHandle. If there are no such elements, the method will resolve to an empty array. - -Signature: - -```typescript -$x(expression: string): Promise; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| expression | string | Expression to [evaluate](https://developer.mozilla.org/en-US/docs/Web/API/Document/evaluate) | - -Returns: - -Promise<[ElementHandle](./puppeteer.elementhandle.md)\[\]> - diff --git a/new-docs/puppeteer.elementhandle.aselement.md b/new-docs/puppeteer.elementhandle.aselement.md deleted file mode 100644 index 670b0f82..00000000 --- a/new-docs/puppeteer.elementhandle.aselement.md +++ /dev/null @@ -1,15 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ElementHandle](./puppeteer.elementhandle.md) > [asElement](./puppeteer.elementhandle.aselement.md) - -## ElementHandle.asElement() method - -Signature: - -```typescript -asElement(): ElementHandle | null; -``` -Returns: - -[ElementHandle](./puppeteer.elementhandle.md)<ElementType> \| null - diff --git a/new-docs/puppeteer.elementhandle.boundingbox.md b/new-docs/puppeteer.elementhandle.boundingbox.md deleted file mode 100644 index 89caf6ad..00000000 --- a/new-docs/puppeteer.elementhandle.boundingbox.md +++ /dev/null @@ -1,17 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ElementHandle](./puppeteer.elementhandle.md) > [boundingBox](./puppeteer.elementhandle.boundingbox.md) - -## ElementHandle.boundingBox() method - -This method returns the bounding box of the element (relative to the main frame), or `null` if the element is not visible. - -Signature: - -```typescript -boundingBox(): Promise; -``` -Returns: - -Promise<[BoundingBox](./puppeteer.boundingbox.md) \| null> - diff --git a/new-docs/puppeteer.elementhandle.boxmodel.md b/new-docs/puppeteer.elementhandle.boxmodel.md deleted file mode 100644 index 69723632..00000000 --- a/new-docs/puppeteer.elementhandle.boxmodel.md +++ /dev/null @@ -1,21 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ElementHandle](./puppeteer.elementhandle.md) > [boxModel](./puppeteer.elementhandle.boxmodel.md) - -## ElementHandle.boxModel() method - -This method returns boxes of the element, or `null` if the element is not visible. - -Signature: - -```typescript -boxModel(): Promise; -``` -Returns: - -Promise<[BoxModel](./puppeteer.boxmodel.md) \| null> - -## Remarks - -Boxes are represented as an array of points; Each Point is an object `{x, y}`. Box points are sorted clock-wise. - diff --git a/new-docs/puppeteer.elementhandle.click.md b/new-docs/puppeteer.elementhandle.click.md deleted file mode 100644 index aed78c7d..00000000 --- a/new-docs/puppeteer.elementhandle.click.md +++ /dev/null @@ -1,24 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ElementHandle](./puppeteer.elementhandle.md) > [click](./puppeteer.elementhandle.click.md) - -## ElementHandle.click() method - -This method scrolls element into view if needed, and then uses [Page.mouse](./puppeteer.page.mouse.md) to click in the center of the element. If the element is detached from DOM, the method throws an error. - -Signature: - -```typescript -click(options?: ClickOptions): Promise; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| options | [ClickOptions](./puppeteer.clickoptions.md) | | - -Returns: - -Promise<void> - diff --git a/new-docs/puppeteer.elementhandle.contentframe.md b/new-docs/puppeteer.elementhandle.contentframe.md deleted file mode 100644 index c4db7ea3..00000000 --- a/new-docs/puppeteer.elementhandle.contentframe.md +++ /dev/null @@ -1,17 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ElementHandle](./puppeteer.elementhandle.md) > [contentFrame](./puppeteer.elementhandle.contentframe.md) - -## ElementHandle.contentFrame() method - -Resolves to the content frame for element handles referencing iframe nodes, or null otherwise - -Signature: - -```typescript -contentFrame(): Promise; -``` -Returns: - -Promise<[Frame](./puppeteer.frame.md) \| null> - diff --git a/new-docs/puppeteer.elementhandle.focus.md b/new-docs/puppeteer.elementhandle.focus.md deleted file mode 100644 index 1b8077df..00000000 --- a/new-docs/puppeteer.elementhandle.focus.md +++ /dev/null @@ -1,17 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ElementHandle](./puppeteer.elementhandle.md) > [focus](./puppeteer.elementhandle.focus.md) - -## ElementHandle.focus() method - -Calls [focus](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the element. - -Signature: - -```typescript -focus(): Promise; -``` -Returns: - -Promise<void> - diff --git a/new-docs/puppeteer.elementhandle.hover.md b/new-docs/puppeteer.elementhandle.hover.md deleted file mode 100644 index 1d3a35bb..00000000 --- a/new-docs/puppeteer.elementhandle.hover.md +++ /dev/null @@ -1,17 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ElementHandle](./puppeteer.elementhandle.md) > [hover](./puppeteer.elementhandle.hover.md) - -## ElementHandle.hover() method - -This method scrolls element into view if needed, and then uses [Page.mouse](./puppeteer.page.mouse.md) to hover over the center of the element. If the element is detached from DOM, the method throws an error. - -Signature: - -```typescript -hover(): Promise; -``` -Returns: - -Promise<void> - diff --git a/new-docs/puppeteer.elementhandle.isintersectingviewport.md b/new-docs/puppeteer.elementhandle.isintersectingviewport.md deleted file mode 100644 index 5c38f670..00000000 --- a/new-docs/puppeteer.elementhandle.isintersectingviewport.md +++ /dev/null @@ -1,17 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ElementHandle](./puppeteer.elementhandle.md) > [isIntersectingViewport](./puppeteer.elementhandle.isintersectingviewport.md) - -## ElementHandle.isIntersectingViewport() method - -Resolves to true if the element is visible in the current viewport. - -Signature: - -```typescript -isIntersectingViewport(): Promise; -``` -Returns: - -Promise<boolean> - diff --git a/new-docs/puppeteer.elementhandle.md b/new-docs/puppeteer.elementhandle.md deleted file mode 100644 index 09e5e970..00000000 --- a/new-docs/puppeteer.elementhandle.md +++ /dev/null @@ -1,64 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ElementHandle](./puppeteer.elementhandle.md) - -## ElementHandle class - -ElementHandle represents an in-page DOM element. - -Signature: - -```typescript -export declare class ElementHandle extends JSHandle -``` -Extends: [JSHandle](./puppeteer.jshandle.md) - -## Remarks - -ElementHandles can be created with the [Page.$()](./puppeteer.page._.md) method. - -```js -const puppeteer = require('puppeteer'); - -(async () => { - const browser = await puppeteer.launch(); - const page = await browser.newPage(); - await page.goto('https://example.com'); - const hrefElement = await page.$('a'); - await hrefElement.click(); - // ... -})(); - -``` -ElementHandle prevents the DOM element from being garbage-collected unless the handle is [disposed](./puppeteer.jshandle.dispose.md). ElementHandles are auto-disposed when their origin frame gets navigated. - -ElementHandle instances can be used as arguments in [Page.$eval()](./puppeteer.page._eval.md) and [Page.evaluate()](./puppeteer.page.evaluate.md) methods. - -If you're using TypeScript, ElementHandle takes a generic argument that denotes the type of element the handle is holding within. For example, if you have a handle to a `` element matching `selector`, the method throws an error. - -Signature: - -```typescript -select(...values: string[]): Promise; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| values | string\[\] | Values of options to select. If the <select> has the multiple attribute, all values are considered, otherwise only the first one is taken into account. | - -Returns: - -Promise<string\[\]> - -## Example - - -```js -handle.select('blue'); // single selection -handle.select('red', 'green', 'blue'); // multiple selections - -``` - diff --git a/new-docs/puppeteer.elementhandle.tap.md b/new-docs/puppeteer.elementhandle.tap.md deleted file mode 100644 index 179f56f4..00000000 --- a/new-docs/puppeteer.elementhandle.tap.md +++ /dev/null @@ -1,17 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ElementHandle](./puppeteer.elementhandle.md) > [tap](./puppeteer.elementhandle.tap.md) - -## ElementHandle.tap() method - -This method scrolls element into view if needed, and then uses [Touchscreen.tap()](./puppeteer.touchscreen.tap.md) to tap in the center of the element. If the element is detached from DOM, the method throws an error. - -Signature: - -```typescript -tap(): Promise; -``` -Returns: - -Promise<void> - diff --git a/new-docs/puppeteer.elementhandle.type.md b/new-docs/puppeteer.elementhandle.type.md deleted file mode 100644 index ed0fe338..00000000 --- a/new-docs/puppeteer.elementhandle.type.md +++ /dev/null @@ -1,49 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ElementHandle](./puppeteer.elementhandle.md) > [type](./puppeteer.elementhandle.type.md) - -## ElementHandle.type() method - -Focuses the element, and then sends a `keydown`, `keypress`/`input`, and `keyup` event for each character in the text. - -To press a special key, like `Control` or `ArrowDown`, use [ElementHandle.press()](./puppeteer.elementhandle.press.md). - -Signature: - -```typescript -type(text: string, options?: { - delay: number; - }): Promise; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| text | string | | -| options | { delay: number; } | | - -Returns: - -Promise<void> - -## Example 1 - - -```js -await elementHandle.type('Hello'); // Types instantly -await elementHandle.type('World', {delay: 100}); // Types slower, like a user - -``` - -## Example 2 - -An example of typing into a text field and then submitting the form: - -```js -const elementHandle = await page.$('input'); -await elementHandle.type('some text'); -await elementHandle.press('Enter'); - -``` - diff --git a/new-docs/puppeteer.elementhandle.uploadfile.md b/new-docs/puppeteer.elementhandle.uploadfile.md deleted file mode 100644 index a3ec0c0e..00000000 --- a/new-docs/puppeteer.elementhandle.uploadfile.md +++ /dev/null @@ -1,24 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ElementHandle](./puppeteer.elementhandle.md) > [uploadFile](./puppeteer.elementhandle.uploadfile.md) - -## ElementHandle.uploadFile() method - -This method expects `elementHandle` to point to an [input element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input). - -Signature: - -```typescript -uploadFile(...filePaths: string[]): Promise; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| filePaths | string\[\] | Sets the value of the file input to these paths. If some of the filePaths are relative paths, then they are resolved relative to the [current working directory](https://nodejs.org/api/process.html#process_process_cwd) | - -Returns: - -Promise<void> - diff --git a/new-docs/puppeteer.errorcode.md b/new-docs/puppeteer.errorcode.md deleted file mode 100644 index 7c209f0a..00000000 --- a/new-docs/puppeteer.errorcode.md +++ /dev/null @@ -1,12 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ErrorCode](./puppeteer.errorcode.md) - -## ErrorCode type - - -Signature: - -```typescript -export declare type ErrorCode = 'aborted' | 'accessdenied' | 'addressunreachable' | 'blockedbyclient' | 'blockedbyresponse' | 'connectionaborted' | 'connectionclosed' | 'connectionfailed' | 'connectionrefused' | 'connectionreset' | 'internetdisconnected' | 'namenotresolved' | 'timedout' | 'failed'; -``` diff --git a/new-docs/puppeteer.evaluatefn.md b/new-docs/puppeteer.evaluatefn.md deleted file mode 100644 index 75904473..00000000 --- a/new-docs/puppeteer.evaluatefn.md +++ /dev/null @@ -1,12 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [EvaluateFn](./puppeteer.evaluatefn.md) - -## EvaluateFn type - - -Signature: - -```typescript -export declare type EvaluateFn = string | ((arg1: T, ...args: unknown[]) => unknown); -``` diff --git a/new-docs/puppeteer.evaluatefnreturntype.md b/new-docs/puppeteer.evaluatefnreturntype.md deleted file mode 100644 index 67bad36a..00000000 --- a/new-docs/puppeteer.evaluatefnreturntype.md +++ /dev/null @@ -1,12 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [EvaluateFnReturnType](./puppeteer.evaluatefnreturntype.md) - -## EvaluateFnReturnType type - - -Signature: - -```typescript -export declare type EvaluateFnReturnType = T extends (...args: unknown[]) => infer R ? R : unknown; -``` diff --git a/new-docs/puppeteer.evaluatehandlefn.md b/new-docs/puppeteer.evaluatehandlefn.md deleted file mode 100644 index 65596a1f..00000000 --- a/new-docs/puppeteer.evaluatehandlefn.md +++ /dev/null @@ -1,12 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [EvaluateHandleFn](./puppeteer.evaluatehandlefn.md) - -## EvaluateHandleFn type - - -Signature: - -```typescript -export declare type EvaluateHandleFn = string | ((...args: unknown[]) => unknown); -``` diff --git a/new-docs/puppeteer.evaluation_script_url.md b/new-docs/puppeteer.evaluation_script_url.md deleted file mode 100644 index 7e464964..00000000 --- a/new-docs/puppeteer.evaluation_script_url.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [EVALUATION\_SCRIPT\_URL](./puppeteer.evaluation_script_url.md) - -## EVALUATION\_SCRIPT\_URL variable - -Signature: - -```typescript -EVALUATION_SCRIPT_URL = "__puppeteer_evaluation_script__" -``` diff --git a/new-docs/puppeteer.eventemitter.addlistener.md b/new-docs/puppeteer.eventemitter.addlistener.md deleted file mode 100644 index 5a43ce06..00000000 --- a/new-docs/puppeteer.eventemitter.addlistener.md +++ /dev/null @@ -1,30 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [EventEmitter](./puppeteer.eventemitter.md) > [addListener](./puppeteer.eventemitter.addlistener.md) - -## EventEmitter.addListener() method - -> Warning: This API is now obsolete. -> -> please use `on` instead. -> - -Add an event listener. - -Signature: - -```typescript -addListener(event: EventType, handler: Handler): EventEmitter; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| event | EventType | | -| handler | Handler | | - -Returns: - -[EventEmitter](./puppeteer.eventemitter.md) - diff --git a/new-docs/puppeteer.eventemitter.emit.md b/new-docs/puppeteer.eventemitter.emit.md deleted file mode 100644 index 7e3c274f..00000000 --- a/new-docs/puppeteer.eventemitter.emit.md +++ /dev/null @@ -1,27 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [EventEmitter](./puppeteer.eventemitter.md) > [emit](./puppeteer.eventemitter.emit.md) - -## EventEmitter.emit() method - -Emit an event and call any associated listeners. - -Signature: - -```typescript -emit(event: EventType, eventData?: any): boolean; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| event | EventType | the event you'd like to emit | -| eventData | any | any data you'd like to emit with the event | - -Returns: - -boolean - -`true` if there are any listeners, `false` if there are not. - diff --git a/new-docs/puppeteer.eventemitter.listenercount.md b/new-docs/puppeteer.eventemitter.listenercount.md deleted file mode 100644 index 1e6c5f21..00000000 --- a/new-docs/puppeteer.eventemitter.listenercount.md +++ /dev/null @@ -1,26 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [EventEmitter](./puppeteer.eventemitter.md) > [listenerCount](./puppeteer.eventemitter.listenercount.md) - -## EventEmitter.listenerCount() method - -Gets the number of listeners for a given event. - -Signature: - -```typescript -listenerCount(event: EventType): number; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| event | EventType | the event to get the listener count for | - -Returns: - -number - -the number of listeners bound to the given event - diff --git a/new-docs/puppeteer.eventemitter.md b/new-docs/puppeteer.eventemitter.md deleted file mode 100644 index 99d26ef4..00000000 --- a/new-docs/puppeteer.eventemitter.md +++ /dev/null @@ -1,34 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [EventEmitter](./puppeteer.eventemitter.md) - -## EventEmitter class - -The EventEmitter class that many Puppeteer classes extend. - -Signature: - -```typescript -export declare class EventEmitter implements CommonEventEmitter -``` -Implements: CommonEventEmitter - -## Remarks - -This allows you to listen to events that Puppeteer classes fire and act accordingly. Therefore you'll mostly use [on](./puppeteer.eventemitter.on.md) and [off](./puppeteer.eventemitter.off.md) to bind and unbind to event listeners. - -The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `EventEmitter` class. - -## Methods - -| Method | Modifiers | Description | -| --- | --- | --- | -| [addListener(event, handler)](./puppeteer.eventemitter.addlistener.md) | | Add an event listener. | -| [emit(event, eventData)](./puppeteer.eventemitter.emit.md) | | Emit an event and call any associated listeners. | -| [listenerCount(event)](./puppeteer.eventemitter.listenercount.md) | | Gets the number of listeners for a given event. | -| [off(event, handler)](./puppeteer.eventemitter.off.md) | | Remove an event listener from firing. | -| [on(event, handler)](./puppeteer.eventemitter.on.md) | | Bind an event listener to fire when an event occurs. | -| [once(event, handler)](./puppeteer.eventemitter.once.md) | | Like on but the listener will only be fired once and then it will be removed. | -| [removeAllListeners(event)](./puppeteer.eventemitter.removealllisteners.md) | | Removes all listeners. If given an event argument, it will remove only listeners for that event. | -| [removeListener(event, handler)](./puppeteer.eventemitter.removelistener.md) | | Remove an event listener. | - diff --git a/new-docs/puppeteer.eventemitter.off.md b/new-docs/puppeteer.eventemitter.off.md deleted file mode 100644 index 34f43801..00000000 --- a/new-docs/puppeteer.eventemitter.off.md +++ /dev/null @@ -1,27 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [EventEmitter](./puppeteer.eventemitter.md) > [off](./puppeteer.eventemitter.off.md) - -## EventEmitter.off() method - -Remove an event listener from firing. - -Signature: - -```typescript -off(event: EventType, handler: Handler): EventEmitter; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| event | EventType | the event type you'd like to stop listening to. | -| handler | Handler | the function that should be removed. | - -Returns: - -[EventEmitter](./puppeteer.eventemitter.md) - -`this` to enable you to chain calls. - diff --git a/new-docs/puppeteer.eventemitter.on.md b/new-docs/puppeteer.eventemitter.on.md deleted file mode 100644 index 4dcf2fe2..00000000 --- a/new-docs/puppeteer.eventemitter.on.md +++ /dev/null @@ -1,27 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [EventEmitter](./puppeteer.eventemitter.md) > [on](./puppeteer.eventemitter.on.md) - -## EventEmitter.on() method - -Bind an event listener to fire when an event occurs. - -Signature: - -```typescript -on(event: EventType, handler: Handler): EventEmitter; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| event | EventType | the event type you'd like to listen to. Can be a string or symbol. | -| handler | Handler | the function to be called when the event occurs. | - -Returns: - -[EventEmitter](./puppeteer.eventemitter.md) - -`this` to enable you to chain calls. - diff --git a/new-docs/puppeteer.eventemitter.once.md b/new-docs/puppeteer.eventemitter.once.md deleted file mode 100644 index 3b57da0e..00000000 --- a/new-docs/puppeteer.eventemitter.once.md +++ /dev/null @@ -1,27 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [EventEmitter](./puppeteer.eventemitter.md) > [once](./puppeteer.eventemitter.once.md) - -## EventEmitter.once() method - -Like `on` but the listener will only be fired once and then it will be removed. - -Signature: - -```typescript -once(event: EventType, handler: Handler): EventEmitter; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| event | EventType | the event you'd like to listen to | -| handler | Handler | the handler function to run when the event occurs | - -Returns: - -[EventEmitter](./puppeteer.eventemitter.md) - -`this` to enable you to chain calls. - diff --git a/new-docs/puppeteer.eventemitter.removealllisteners.md b/new-docs/puppeteer.eventemitter.removealllisteners.md deleted file mode 100644 index 7a371a21..00000000 --- a/new-docs/puppeteer.eventemitter.removealllisteners.md +++ /dev/null @@ -1,26 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [EventEmitter](./puppeteer.eventemitter.md) > [removeAllListeners](./puppeteer.eventemitter.removealllisteners.md) - -## EventEmitter.removeAllListeners() method - -Removes all listeners. If given an event argument, it will remove only listeners for that event. - -Signature: - -```typescript -removeAllListeners(event?: EventType): EventEmitter; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| event | EventType | the event to remove listeners for. | - -Returns: - -[EventEmitter](./puppeteer.eventemitter.md) - -`this` to enable you to chain calls. - diff --git a/new-docs/puppeteer.eventemitter.removelistener.md b/new-docs/puppeteer.eventemitter.removelistener.md deleted file mode 100644 index 4b1608a4..00000000 --- a/new-docs/puppeteer.eventemitter.removelistener.md +++ /dev/null @@ -1,30 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [EventEmitter](./puppeteer.eventemitter.md) > [removeListener](./puppeteer.eventemitter.removelistener.md) - -## EventEmitter.removeListener() method - -> Warning: This API is now obsolete. -> -> please use `off` instead. -> - -Remove an event listener. - -Signature: - -```typescript -removeListener(event: EventType, handler: Handler): EventEmitter; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| event | EventType | | -| handler | Handler | | - -Returns: - -[EventEmitter](./puppeteer.eventemitter.md) - diff --git a/new-docs/puppeteer.executioncontext.evaluate.md b/new-docs/puppeteer.executioncontext.evaluate.md deleted file mode 100644 index 7c767e12..00000000 --- a/new-docs/puppeteer.executioncontext.evaluate.md +++ /dev/null @@ -1,64 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ExecutionContext](./puppeteer.executioncontext.md) > [evaluate](./puppeteer.executioncontext.evaluate.md) - -## ExecutionContext.evaluate() method - -Signature: - -```typescript -evaluate(pageFunction: Function | string, ...args: unknown[]): Promise; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| pageFunction | Function \| string | a function to be evaluated in the executionContext | -| args | unknown\[\] | argument to pass to the page function | - -Returns: - -Promise<ReturnType> - -A promise that resolves to the return value of the given function. - -## Remarks - -If the function passed to the `executionContext.evaluate` returns a Promise, then `executionContext.evaluate` would wait for the promise to resolve and return its value. If the function passed to the `executionContext.evaluate` returns a non-serializable value, then `executionContext.evaluate` resolves to `undefined`. DevTools Protocol also supports transferring some additional values that are not serializable by `JSON`: `-0`, `NaN`, `Infinity`, `-Infinity`, and bigint literals. - -## Example 1 - - -```js -const executionContext = await page.mainFrame().executionContext(); -const result = await executionContext.evaluate(() => Promise.resolve(8 * 7))* ; -console.log(result); // prints "56" - -``` - -## Example 2 - -A string can also be passed in instead of a function. - -```js -console.log(await executionContext.evaluate('1 + 2')); // prints "3" - -``` - -## Example 3 - -[JSHandle](./puppeteer.jshandle.md) instances can be passed as arguments to the `executionContext.* evaluate`: - -```js -const oneHandle = await executionContext.evaluateHandle(() => 1); -const twoHandle = await executionContext.evaluateHandle(() => 2); -const result = await executionContext.evaluate( - (a, b) => a + b, oneHandle, * twoHandle -); -await oneHandle.dispose(); -await twoHandle.dispose(); -console.log(result); // prints '3'. - -``` - diff --git a/new-docs/puppeteer.executioncontext.evaluatehandle.md b/new-docs/puppeteer.executioncontext.evaluatehandle.md deleted file mode 100644 index 3f89892f..00000000 --- a/new-docs/puppeteer.executioncontext.evaluatehandle.md +++ /dev/null @@ -1,62 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ExecutionContext](./puppeteer.executioncontext.md) > [evaluateHandle](./puppeteer.executioncontext.evaluatehandle.md) - -## ExecutionContext.evaluateHandle() method - -Signature: - -```typescript -evaluateHandle(pageFunction: EvaluateHandleFn, ...args: SerializableOrJSHandle[]): Promise; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| pageFunction | [EvaluateHandleFn](./puppeteer.evaluatehandlefn.md) | a function to be evaluated in the executionContext | -| args | [SerializableOrJSHandle](./puppeteer.serializableorjshandle.md)\[\] | argument to pass to the page function | - -Returns: - -Promise<HandleType> - -A promise that resolves to the return value of the given function as an in-page object (a [JSHandle](./puppeteer.jshandle.md)). - -## Remarks - -The only difference between `executionContext.evaluate` and `executionContext.evaluateHandle` is that `executionContext.evaluateHandle` returns an in-page object (a [JSHandle](./puppeteer.jshandle.md)). If the function passed to the `executionContext.evaluateHandle` returns a Promise, then `executionContext.evaluateHandle` would wait for the promise to resolve and return its value. - -## Example 1 - - -```js -const context = await page.mainFrame().executionContext(); -const aHandle = await context.evaluateHandle(() => Promise.resolve(self)); -aHandle; // Handle for the global object. - -``` - -## Example 2 - -A string can also be passed in instead of a function. - -```js -// Handle for the '3' * object. -const aHandle = await context.evaluateHandle('1 + 2'); - -``` - -## Example 3 - -JSHandle instances can be passed as arguments to the `executionContext.* evaluateHandle`: - -```js -const aHandle = await context.evaluateHandle(() => document.body); -const resultHandle = await context.evaluateHandle(body => body.innerHTML, * aHandle); -console.log(await resultHandle.jsonValue()); // prints body's innerHTML -await aHandle.dispose(); -await resultHandle.dispose(); - -``` - diff --git a/new-docs/puppeteer.executioncontext.frame.md b/new-docs/puppeteer.executioncontext.frame.md deleted file mode 100644 index 94a9dbab..00000000 --- a/new-docs/puppeteer.executioncontext.frame.md +++ /dev/null @@ -1,21 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ExecutionContext](./puppeteer.executioncontext.md) > [frame](./puppeteer.executioncontext.frame.md) - -## ExecutionContext.frame() method - -Signature: - -```typescript -frame(): Frame | null; -``` -Returns: - -[Frame](./puppeteer.frame.md) \| null - -The frame associated with this execution context. - -## Remarks - -Not every execution context is associated with a frame. For example, workers and extensions have execution contexts that are not associated with frames. - diff --git a/new-docs/puppeteer.executioncontext.md b/new-docs/puppeteer.executioncontext.md deleted file mode 100644 index c4902fd6..00000000 --- a/new-docs/puppeteer.executioncontext.md +++ /dev/null @@ -1,29 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ExecutionContext](./puppeteer.executioncontext.md) - -## ExecutionContext class - -This class represents a context for JavaScript execution. A \[Page\] might have many execution contexts: - each [frame](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe) has "default" execution context that is always created after frame is attached to DOM. This context is returned by the method. - [Extension](https://developer.chrome.com/extensions)'s content scripts create additional execution contexts. - -Besides pages, execution contexts can be found in [workers](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API). - -Signature: - -```typescript -export declare class ExecutionContext -``` - -## Remarks - -The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `ExecutionContext` class. - -## Methods - -| Method | Modifiers | Description | -| --- | --- | --- | -| [evaluate(pageFunction, args)](./puppeteer.executioncontext.evaluate.md) | | | -| [evaluateHandle(pageFunction, args)](./puppeteer.executioncontext.evaluatehandle.md) | | | -| [frame()](./puppeteer.executioncontext.frame.md) | | | -| [queryObjects(prototypeHandle)](./puppeteer.executioncontext.queryobjects.md) | | This method iterates the JavaScript heap and finds all the objects with the given prototype. | - diff --git a/new-docs/puppeteer.executioncontext.queryobjects.md b/new-docs/puppeteer.executioncontext.queryobjects.md deleted file mode 100644 index 1401d91d..00000000 --- a/new-docs/puppeteer.executioncontext.queryobjects.md +++ /dev/null @@ -1,46 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [ExecutionContext](./puppeteer.executioncontext.md) > [queryObjects](./puppeteer.executioncontext.queryobjects.md) - -## ExecutionContext.queryObjects() method - -This method iterates the JavaScript heap and finds all the objects with the given prototype. - -Signature: - -```typescript -queryObjects(prototypeHandle: JSHandle): Promise; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| prototypeHandle | [JSHandle](./puppeteer.jshandle.md) | a handle to the object prototype | - -Returns: - -Promise<[JSHandle](./puppeteer.jshandle.md)> - -A handle to an array of objects with the given prototype. - -## Remarks - - -## Example - - -```js -// Create a Map object -await page.evaluate(() => window.map = new Map()); -// Get a handle to the Map object prototype -const mapPrototype = await page.evaluateHandle(() => Map.prototype); -// Query all map instances into an array -const mapInstances = await page.queryObjects(mapPrototype); -// Count amount of map objects in heap -const count = await page.evaluate(maps => maps.length, mapInstances); -await mapInstances.dispose(); -await mapPrototype.dispose(); - -``` - diff --git a/new-docs/puppeteer.filechooser.accept.md b/new-docs/puppeteer.filechooser.accept.md deleted file mode 100644 index bce69665..00000000 --- a/new-docs/puppeteer.filechooser.accept.md +++ /dev/null @@ -1,24 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [FileChooser](./puppeteer.filechooser.md) > [accept](./puppeteer.filechooser.accept.md) - -## FileChooser.accept() method - -Accept the file chooser request with given paths. - -Signature: - -```typescript -accept(filePaths: string[]): Promise; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| filePaths | string\[\] | If some of the filePaths are relative paths, then they are resolved relative to the [current working directory](https://nodejs.org/api/process.html#process_process_cwd). | - -Returns: - -Promise<void> - diff --git a/new-docs/puppeteer.filechooser.cancel.md b/new-docs/puppeteer.filechooser.cancel.md deleted file mode 100644 index 9e8fe652..00000000 --- a/new-docs/puppeteer.filechooser.cancel.md +++ /dev/null @@ -1,17 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [FileChooser](./puppeteer.filechooser.md) > [cancel](./puppeteer.filechooser.cancel.md) - -## FileChooser.cancel() method - -Closes the file chooser without selecting any files. - -Signature: - -```typescript -cancel(): Promise; -``` -Returns: - -Promise<void> - diff --git a/new-docs/puppeteer.filechooser.ismultiple.md b/new-docs/puppeteer.filechooser.ismultiple.md deleted file mode 100644 index b4d2da8c..00000000 --- a/new-docs/puppeteer.filechooser.ismultiple.md +++ /dev/null @@ -1,17 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [FileChooser](./puppeteer.filechooser.md) > [isMultiple](./puppeteer.filechooser.ismultiple.md) - -## FileChooser.isMultiple() method - -Whether file chooser allow for [multiple](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#attr-multiple) file selection. - -Signature: - -```typescript -isMultiple(): boolean; -``` -Returns: - -boolean - diff --git a/new-docs/puppeteer.filechooser.md b/new-docs/puppeteer.filechooser.md deleted file mode 100644 index 8165b170..00000000 --- a/new-docs/puppeteer.filechooser.md +++ /dev/null @@ -1,42 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [FileChooser](./puppeteer.filechooser.md) - -## FileChooser class - -File choosers let you react to the page requesting for a file. - -Signature: - -```typescript -export declare class FileChooser -``` - -## Remarks - -`FileChooser` objects are returned via the `page.waitForFileChooser` method. - -The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `FileChooser` class. - -## Example - -An example of using `FileChooser`: - -```js -const [fileChooser] = await Promise.all([ - page.waitForFileChooser(), - page.click('#upload-file-button'), // some button that triggers file selection -]); -await fileChooser.accept(['/tmp/myfile.pdf']); - -``` -\*\*NOTE\*\* In browsers, only one file chooser can be opened at a time. All file choosers must be accepted or canceled. Not doing so will prevent subsequent file choosers from appearing. - -## Methods - -| Method | Modifiers | Description | -| --- | --- | --- | -| [accept(filePaths)](./puppeteer.filechooser.accept.md) | | Accept the file chooser request with given paths. | -| [cancel()](./puppeteer.filechooser.cancel.md) | | Closes the file chooser without selecting any files. | -| [isMultiple()](./puppeteer.filechooser.ismultiple.md) | | Whether file chooser allow for [multiple](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#attr-multiple) file selection. | - diff --git a/new-docs/puppeteer.frame._.md b/new-docs/puppeteer.frame._.md deleted file mode 100644 index 310a73ec..00000000 --- a/new-docs/puppeteer.frame._.md +++ /dev/null @@ -1,26 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [Frame](./puppeteer.frame.md) > [$](./puppeteer.frame._.md) - -## Frame.$() method - -This method queries the frame for the given selector. - -Signature: - -```typescript -$(selector: string): Promise; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| selector | string | a selector to query for. | - -Returns: - -Promise<[ElementHandle](./puppeteer.elementhandle.md) \| null> - -A promise which resolves to an `ElementHandle` pointing at the element, or `null` if it was not found. - diff --git a/new-docs/puppeteer.frame.__.md b/new-docs/puppeteer.frame.__.md deleted file mode 100644 index 5b1bd125..00000000 --- a/new-docs/puppeteer.frame.__.md +++ /dev/null @@ -1,26 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [Frame](./puppeteer.frame.md) > [$$](./puppeteer.frame.__.md) - -## Frame.$$() method - -This runs `document.querySelectorAll` in the frame and returns the result. - -Signature: - -```typescript -$$(selector: string): Promise; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| selector | string | a selector to search for | - -Returns: - -Promise<[ElementHandle](./puppeteer.elementhandle.md)\[\]> - -An array of element handles pointing to the found frame elements. - diff --git a/new-docs/puppeteer.frame.__eval.md b/new-docs/puppeteer.frame.__eval.md deleted file mode 100644 index cc2f0fd7..00000000 --- a/new-docs/puppeteer.frame.__eval.md +++ /dev/null @@ -1,38 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [Frame](./puppeteer.frame.md) > [$$eval](./puppeteer.frame.__eval.md) - -## Frame.$$eval() method - -Signature: - -```typescript -$$eval(selector: string, pageFunction: (elements: Element[], ...args: unknown[]) => ReturnType | Promise, ...args: SerializableOrJSHandle[]): Promise>; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| selector | string | the selector to query for | -| pageFunction | (elements: Element\[\], ...args: unknown\[\]) => ReturnType \| Promise<ReturnType> | the function to be evaluated in the frame's context | -| args | [SerializableOrJSHandle](./puppeteer.serializableorjshandle.md)\[\] | additional arguments to pass to pageFuncton | - -Returns: - -Promise<[WrapElementHandle](./puppeteer.wrapelementhandle.md)<ReturnType>> - -## Remarks - -This method runs `Array.from(document.querySelectorAll(selector))` within the frame and passes it as the first argument to `pageFunction`. - -If `pageFunction` returns a Promise, then `frame.$$eval` would wait for the promise to resolve and return its value. - -## Example - - -```js -const divsCounts = await frame.$$eval('div', divs => divs.length); - -``` - diff --git a/new-docs/puppeteer.frame._eval.md b/new-docs/puppeteer.frame._eval.md deleted file mode 100644 index b936609b..00000000 --- a/new-docs/puppeteer.frame._eval.md +++ /dev/null @@ -1,38 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [Frame](./puppeteer.frame.md) > [$eval](./puppeteer.frame._eval.md) - -## Frame.$eval() method - -Signature: - -```typescript -$eval(selector: string, pageFunction: (element: Element, ...args: unknown[]) => ReturnType | Promise, ...args: SerializableOrJSHandle[]): Promise>; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| selector | string | the selector to query for | -| pageFunction | (element: Element, ...args: unknown\[\]) => ReturnType \| Promise<ReturnType> | the function to be evaluated in the frame's context | -| args | [SerializableOrJSHandle](./puppeteer.serializableorjshandle.md)\[\] | additional arguments to pass to pageFuncton | - -Returns: - -Promise<[WrapElementHandle](./puppeteer.wrapelementhandle.md)<ReturnType>> - -## Remarks - -This method runs `document.querySelector` within the frame and passes it as the first argument to `pageFunction`. - -If `pageFunction` returns a Promise, then `frame.$eval` would wait for the promise to resolve and return its value. - -## Example - - -```js -const searchValue = await frame.$eval('#search', el => el.value); - -``` - diff --git a/new-docs/puppeteer.frame._x.md b/new-docs/puppeteer.frame._x.md deleted file mode 100644 index 169ff74f..00000000 --- a/new-docs/puppeteer.frame._x.md +++ /dev/null @@ -1,24 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [Frame](./puppeteer.frame.md) > [$x](./puppeteer.frame._x.md) - -## Frame.$x() method - -This method evaluates the given XPath expression and returns the results. - -Signature: - -```typescript -$x(expression: string): Promise; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| expression | string | the XPath expression to evaluate. | - -Returns: - -Promise<[ElementHandle](./puppeteer.elementhandle.md)\[\]> - diff --git a/new-docs/puppeteer.frame.addscripttag.md b/new-docs/puppeteer.frame.addscripttag.md deleted file mode 100644 index 9aa7cf60..00000000 --- a/new-docs/puppeteer.frame.addscripttag.md +++ /dev/null @@ -1,26 +0,0 @@ - - -[Home](./index.md) > [puppeteer](./puppeteer.md) > [Frame](./puppeteer.frame.md) > [addScriptTag](./puppeteer.frame.addscripttag.md) - -## Frame.addScriptTag() method - -Adds a `