chore(docs): reduce warnings when generating docs (#6138)

* chore(docs): reduce warnings when generating docs

This is a bunch of small miscellaneous fixes that reduce the amount of
warnings logged when generating our new docs. The long term goal is to
get this list down to 0 warnings, but I'll do it in multiple PRs.

* satisfy doclint
This commit is contained in:
Jack Franklin 2020-07-02 12:15:39 +01:00 committed by GitHub
parent 221d172843
commit 29f7e161b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
94 changed files with 755 additions and 289 deletions

View File

@ -27,6 +27,9 @@
},
"extractorMessageReporting": {
"ae-internal-missing-underscore": {
"logLevel": "none"
},
"default": {
"logLevel": "warning"
}

View File

@ -21,7 +21,7 @@ download(revision: string, progressCallback?: (x: number, y: number) => void): P
<b>Returns:</b>
Promise&lt;BrowserFetcherRevisionInfo&gt;
Promise&lt;[BrowserFetcherRevisionInfo](./puppeteer.browserfetcherrevisioninfo.md)<!-- -->&gt;
A promise with revision information when the revision is downloaded and extracted.

View File

@ -11,7 +11,7 @@ platform(): Platform;
```
<b>Returns:</b>
Platform
[Platform](./puppeteer.platform.md)
Returns the current `Platform`<!-- -->.

View File

@ -11,7 +11,7 @@ product(): Product;
```
<b>Returns:</b>
Product
[Product](./puppeteer.product.md)
Returns the current `Product`<!-- -->.

View File

@ -18,7 +18,7 @@ revisionInfo(revision: string): BrowserFetcherRevisionInfo;
<b>Returns:</b>
BrowserFetcherRevisionInfo
[BrowserFetcherRevisionInfo](./puppeteer.browserfetcherrevisioninfo.md)
The revision info for the given revision.

View File

@ -4,6 +4,7 @@
## BrowserFetcherOptions interface
<b>Signature:</b>
```typescript
@ -16,6 +17,6 @@ export interface BrowserFetcherOptions
| --- | --- | --- |
| [host](./puppeteer.browserfetcheroptions.host.md) | string | |
| [path](./puppeteer.browserfetcheroptions.path.md) | string | |
| [platform](./puppeteer.browserfetcheroptions.platform.md) | Platform | |
| [platform](./puppeteer.browserfetcheroptions.platform.md) | [Platform](./puppeteer.platform.md) | |
| [product](./puppeteer.browserfetcheroptions.product.md) | string | |

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [BrowserFetcherRevisionInfo](./puppeteer.browserfetcherrevisioninfo.md) &gt; [executablePath](./puppeteer.browserfetcherrevisioninfo.executablepath.md)
## BrowserFetcherRevisionInfo.executablePath property
<b>Signature:</b>
```typescript
executablePath: string;
```

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [BrowserFetcherRevisionInfo](./puppeteer.browserfetcherrevisioninfo.md) &gt; [folderPath](./puppeteer.browserfetcherrevisioninfo.folderpath.md)
## BrowserFetcherRevisionInfo.folderPath property
<b>Signature:</b>
```typescript
folderPath: string;
```

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [BrowserFetcherRevisionInfo](./puppeteer.browserfetcherrevisioninfo.md) &gt; [local](./puppeteer.browserfetcherrevisioninfo.local.md)
## BrowserFetcherRevisionInfo.local property
<b>Signature:</b>
```typescript
local: boolean;
```

View File

@ -0,0 +1,24 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [BrowserFetcherRevisionInfo](./puppeteer.browserfetcherrevisioninfo.md)
## BrowserFetcherRevisionInfo interface
<b>Signature:</b>
```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 | |

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [BrowserFetcherRevisionInfo](./puppeteer.browserfetcherrevisioninfo.md) &gt; [product](./puppeteer.browserfetcherrevisioninfo.product.md)
## BrowserFetcherRevisionInfo.product property
<b>Signature:</b>
```typescript
product: string;
```

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [BrowserFetcherRevisionInfo](./puppeteer.browserfetcherrevisioninfo.md) &gt; [revision](./puppeteer.browserfetcherrevisioninfo.revision.md)
## BrowserFetcherRevisionInfo.revision property
<b>Signature:</b>
```typescript
revision: string;
```

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [BrowserFetcherRevisionInfo](./puppeteer.browserfetcherrevisioninfo.md) &gt; [url](./puppeteer.browserfetcherrevisioninfo.url.md)
## BrowserFetcherRevisionInfo.url property
<b>Signature:</b>
```typescript
url: string;
```

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [BrowserOptions](./puppeteer.browseroptions.md) &gt; [defaultViewport](./puppeteer.browseroptions.defaultviewport.md)
## BrowserOptions.defaultViewport property
<b>Signature:</b>
```typescript
defaultViewport?: Viewport;
```

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [BrowserOptions](./puppeteer.browseroptions.md) &gt; [ignoreHTTPSErrors](./puppeteer.browseroptions.ignorehttpserrors.md)
## BrowserOptions.ignoreHTTPSErrors property
<b>Signature:</b>
```typescript
ignoreHTTPSErrors?: boolean;
```

View File

@ -0,0 +1,22 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [BrowserOptions](./puppeteer.browseroptions.md)
## BrowserOptions interface
Generic browser options that can be passed when launching any browser.
<b>Signature:</b>
```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 | |

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [BrowserOptions](./puppeteer.browseroptions.md) &gt; [slowMo](./puppeteer.browseroptions.slowmo.md)
## BrowserOptions.slowMo property
<b>Signature:</b>
```typescript
slowMo?: number;
```

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [ChromeArgOptions](./puppeteer.chromeargoptions.md) &gt; [args](./puppeteer.chromeargoptions.args.md)
## ChromeArgOptions.args property
<b>Signature:</b>
```typescript
args?: string[];
```

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [ChromeArgOptions](./puppeteer.chromeargoptions.md) &gt; [devtools](./puppeteer.chromeargoptions.devtools.md)
## ChromeArgOptions.devtools property
<b>Signature:</b>
```typescript
devtools?: boolean;
```

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [ChromeArgOptions](./puppeteer.chromeargoptions.md) &gt; [headless](./puppeteer.chromeargoptions.headless.md)
## ChromeArgOptions.headless property
<b>Signature:</b>
```typescript
headless?: boolean;
```

View File

@ -0,0 +1,23 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [ChromeArgOptions](./puppeteer.chromeargoptions.md)
## ChromeArgOptions interface
Launcher options that only apply to Chrome.
<b>Signature:</b>
```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 | |

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [ChromeArgOptions](./puppeteer.chromeargoptions.md) &gt; [userDataDir](./puppeteer.chromeargoptions.userdatadir.md)
## ChromeArgOptions.userDataDir property
<b>Signature:</b>
```typescript
userDataDir?: string;
```

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [devicesMap](./puppeteer.devicesmap.md)
## devicesMap variable
<b>Signature:</b>
```typescript
devicesMap: DevicesMap
```

View File

@ -9,7 +9,7 @@
```typescript
click(selector: string, options?: {
delay?: number;
button?: MouseButtonInput;
button?: MouseButton;
clickCount?: number;
}): Promise<void>;
```
@ -19,7 +19,7 @@ click(selector: string, options?: {
| Parameter | Type | Description |
| --- | --- | --- |
| selector | string | |
| options | { delay?: number; button?: [MouseButtonInput](./puppeteer.mousebuttoninput.md)<!-- -->; clickCount?: number; } | |
| options | { delay?: number; button?: [MouseButton](./puppeteer.mousebutton.md)<!-- -->; clickCount?: number; } | |
<b>Returns:</b>

View File

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [KeyDefinition](./puppeteer.keydefinition.md) &gt; [code](./puppeteer.keydefinition.code.md)
## KeyDefinition.code property
<b>Signature:</b>
```typescript
code?: string;
```

View File

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [KeyDefinition](./puppeteer.keydefinition.md) &gt; [key](./puppeteer.keydefinition.key.md)
## KeyDefinition.key property
<b>Signature:</b>
```typescript
key?: string;
```

View File

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [KeyDefinition](./puppeteer.keydefinition.md) &gt; [keyCode](./puppeteer.keydefinition.keycode.md)
## KeyDefinition.keyCode property
<b>Signature:</b>
```typescript
keyCode?: number;
```

View File

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [KeyDefinition](./puppeteer.keydefinition.md) &gt; [location](./puppeteer.keydefinition.location.md)
## KeyDefinition.location property
<b>Signature:</b>
```typescript
location?: number;
```

View File

@ -1,33 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [KeyDefinition](./puppeteer.keydefinition.md)
## KeyDefinition interface
Copyright 2017 Google Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the 'License'); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
<b>Signature:</b>
```typescript
export interface KeyDefinition
```
## Properties
| Property | Type | Description |
| --- | --- | --- |
| [code](./puppeteer.keydefinition.code.md) | string | |
| [key](./puppeteer.keydefinition.key.md) | string | |
| [keyCode](./puppeteer.keydefinition.keycode.md) | number | |
| [location](./puppeteer.keydefinition.location.md) | number | |
| [shiftKey](./puppeteer.keydefinition.shiftkey.md) | string | |
| [shiftKeyCode](./puppeteer.keydefinition.shiftkeycode.md) | number | |
| [shiftText](./puppeteer.keydefinition.shifttext.md) | string | |
| [text](./puppeteer.keydefinition.text.md) | string | |

View File

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [KeyDefinition](./puppeteer.keydefinition.md) &gt; [shiftKey](./puppeteer.keydefinition.shiftkey.md)
## KeyDefinition.shiftKey property
<b>Signature:</b>
```typescript
shiftKey?: string;
```

View File

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [KeyDefinition](./puppeteer.keydefinition.md) &gt; [shiftKeyCode](./puppeteer.keydefinition.shiftkeycode.md)
## KeyDefinition.shiftKeyCode property
<b>Signature:</b>
```typescript
shiftKeyCode?: number;
```

View File

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [KeyDefinition](./puppeteer.keydefinition.md) &gt; [shiftText](./puppeteer.keydefinition.shifttext.md)
## KeyDefinition.shiftText property
<b>Signature:</b>
```typescript
shiftText?: string;
```

View File

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [KeyDefinition](./puppeteer.keydefinition.md) &gt; [text](./puppeteer.keydefinition.text.md)
## KeyDefinition.text property
<b>Signature:</b>
```typescript
text?: string;
```

View File

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [keyDefinitions](./puppeteer.keydefinitions.md)
## keyDefinitions variable
<b>Signature:</b>
```typescript
keyDefinitions: Readonly<Record<KeyInput, KeyDefinition>>
```

View File

@ -4,6 +4,8 @@
## KeyInput type
All the valid keys that can be passed to functions that take user input, such as [keyboard.press](./puppeteer.keyboard.press.md)
<b>Signature:</b>
```typescript

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [LaunchOptions](./puppeteer.launchoptions.md) &gt; [dumpio](./puppeteer.launchoptions.dumpio.md)
## LaunchOptions.dumpio property
<b>Signature:</b>
```typescript
dumpio?: boolean;
```

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [LaunchOptions](./puppeteer.launchoptions.md) &gt; [env](./puppeteer.launchoptions.env.md)
## LaunchOptions.env property
<b>Signature:</b>
```typescript
env?: Record<string, string | undefined>;
```

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [LaunchOptions](./puppeteer.launchoptions.md) &gt; [executablePath](./puppeteer.launchoptions.executablepath.md)
## LaunchOptions.executablePath property
<b>Signature:</b>
```typescript
executablePath?: string;
```

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [LaunchOptions](./puppeteer.launchoptions.md) &gt; [handleSIGHUP](./puppeteer.launchoptions.handlesighup.md)
## LaunchOptions.handleSIGHUP property
<b>Signature:</b>
```typescript
handleSIGHUP?: boolean;
```

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [LaunchOptions](./puppeteer.launchoptions.md) &gt; [handleSIGINT](./puppeteer.launchoptions.handlesigint.md)
## LaunchOptions.handleSIGINT property
<b>Signature:</b>
```typescript
handleSIGINT?: boolean;
```

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [LaunchOptions](./puppeteer.launchoptions.md) &gt; [handleSIGTERM](./puppeteer.launchoptions.handlesigterm.md)
## LaunchOptions.handleSIGTERM property
<b>Signature:</b>
```typescript
handleSIGTERM?: boolean;
```

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [LaunchOptions](./puppeteer.launchoptions.md) &gt; [ignoreDefaultArgs](./puppeteer.launchoptions.ignoredefaultargs.md)
## LaunchOptions.ignoreDefaultArgs property
<b>Signature:</b>
```typescript
ignoreDefaultArgs?: boolean | string[];
```

View File

@ -0,0 +1,28 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [LaunchOptions](./puppeteer.launchoptions.md)
## LaunchOptions interface
Generic launch options that can be passed when launching any browser.
<b>Signature:</b>
```typescript
export interface LaunchOptions
```
## Properties
| Property | Type | Description |
| --- | --- | --- |
| [dumpio](./puppeteer.launchoptions.dumpio.md) | boolean | |
| [env](./puppeteer.launchoptions.env.md) | Record&lt;string, string \| undefined&gt; | |
| [executablePath](./puppeteer.launchoptions.executablepath.md) | string | |
| [handleSIGHUP](./puppeteer.launchoptions.handlesighup.md) | boolean | |
| [handleSIGINT](./puppeteer.launchoptions.handlesigint.md) | boolean | |
| [handleSIGTERM](./puppeteer.launchoptions.handlesigterm.md) | boolean | |
| [ignoreDefaultArgs](./puppeteer.launchoptions.ignoredefaultargs.md) | boolean \| string\[\] | |
| [pipe](./puppeteer.launchoptions.pipe.md) | boolean | |
| [timeout](./puppeteer.launchoptions.timeout.md) | number | |

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [LaunchOptions](./puppeteer.launchoptions.md) &gt; [pipe](./puppeteer.launchoptions.pipe.md)
## LaunchOptions.pipe property
<b>Signature:</b>
```typescript
pipe?: boolean;
```

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [LaunchOptions](./puppeteer.launchoptions.md) &gt; [timeout](./puppeteer.launchoptions.timeout.md)
## LaunchOptions.timeout property
<b>Signature:</b>
```typescript
timeout?: number;
```

View File

@ -50,6 +50,9 @@
| [BoundingBox](./puppeteer.boundingbox.md) | |
| [BoxModel](./puppeteer.boxmodel.md) | |
| [BrowserFetcherOptions](./puppeteer.browserfetcheroptions.md) | |
| [BrowserFetcherRevisionInfo](./puppeteer.browserfetcherrevisioninfo.md) | |
| [BrowserOptions](./puppeteer.browseroptions.md) | Generic browser options that can be passed when launching any browser. |
| [ChromeArgOptions](./puppeteer.chromeargoptions.md) | Launcher options that only apply to Chrome. |
| [ClickOptions](./puppeteer.clickoptions.md) | |
| [ConsoleMessageLocation](./puppeteer.consolemessagelocation.md) | |
| [CoverageEntry](./puppeteer.coverageentry.md) | The CoverageEntry class represents one entry of the coverage report. |
@ -57,12 +60,15 @@
| [GeolocationOptions](./puppeteer.geolocationoptions.md) | |
| [JSCoverageOptions](./puppeteer.jscoverageoptions.md) | Set of configurable options for JS coverage. |
| [JSONObject](./puppeteer.jsonobject.md) | |
| [KeyDefinition](./puppeteer.keydefinition.md) | Copyright 2017 Google Inc. All rights reserved.<!-- -->Licensed under the Apache License, Version 2.0 (the 'License'); you may not use this file except in compliance with the License. You may obtain a copy of the License at<!-- -->http://www.apache.org/licenses/LICENSE-2.0<!-- -->Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. |
| [LaunchOptions](./puppeteer.launchoptions.md) | Generic launch options that can be passed when launching any browser. |
| [Metrics](./puppeteer.metrics.md) | |
| [MouseOptions](./puppeteer.mouseoptions.md) | |
| [PressOptions](./puppeteer.pressoptions.md) | |
| [ProductLauncher](./puppeteer.productlauncher.md) | Describes a launcher - a class that is able to create and launch a browser instance. |
| [RemoteAddress](./puppeteer.remoteaddress.md) | |
| [SerializedAXNode](./puppeteer.serializedaxnode.md) | Represents a Node and the properties of it that are relevant to Accessibility. |
| [SnapshotOptions](./puppeteer.snapshotoptions.md) | |
| [TracingOptions](./puppeteer.tracingoptions.md) | |
| [WaitForOptions](./puppeteer.waitforoptions.md) | |
| [WaitForTargetOptions](./puppeteer.waitfortargetoptions.md) | |
| [WaitTimeoutOptions](./puppeteer.waittimeoutoptions.md) | |
@ -71,8 +77,8 @@
| Variable | Description |
| --- | --- |
| [devicesMap](./puppeteer.devicesmap.md) | |
| [EVALUATION\_SCRIPT\_URL](./puppeteer.evaluation_script_url.md) | |
| [keyDefinitions](./puppeteer.keydefinitions.md) | |
| [puppeteerErrors](./puppeteer.puppeteererrors.md) | |
## Type Aliases
@ -80,12 +86,15 @@
| Type Alias | Description |
| --- | --- |
| [ConsoleMessageType](./puppeteer.consolemessagetype.md) | The supported types for console messages. |
| [DevicesMap](./puppeteer.devicesmap.md) | |
| [EvaluateFn](./puppeteer.evaluatefn.md) | |
| [EvaluateFnReturnType](./puppeteer.evaluatefnreturntype.md) | |
| [EvaluateHandleFn](./puppeteer.evaluatehandlefn.md) | |
| [JSONArray](./puppeteer.jsonarray.md) | |
| [KeyInput](./puppeteer.keyinput.md) | |
| [MouseButtonInput](./puppeteer.mousebuttoninput.md) | |
| [KeyInput](./puppeteer.keyinput.md) | All the valid keys that can be passed to functions that take user input, such as [keyboard.press](./puppeteer.keyboard.press.md) |
| [MouseButton](./puppeteer.mousebutton.md) | |
| [Platform](./puppeteer.platform.md) | Supported platforms. |
| [Product](./puppeteer.product.md) | Supported products. |
| [PuppeteerErrors](./puppeteer.puppeteererrors.md) | |
| [Serializable](./puppeteer.serializable.md) | |
| [SerializableOrJSHandle](./puppeteer.serializableorjshandle.md) | |

View File

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [Mouse](./puppeteer.mouse.md) &gt; [\_button](./puppeteer.mouse._button.md)
## Mouse.\_button property
<b>Signature:</b>
```typescript
_button: MouseButton;
```

View File

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [Mouse](./puppeteer.mouse.md) &gt; [\_client](./puppeteer.mouse._client.md)
## Mouse.\_client property
<b>Signature:</b>
```typescript
_client: CDPSession;
```

View File

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [Mouse](./puppeteer.mouse.md) &gt; [\_keyboard](./puppeteer.mouse._keyboard.md)
## Mouse.\_keyboard property
<b>Signature:</b>
```typescript
_keyboard: Keyboard;
```

View File

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [Mouse](./puppeteer.mouse.md) &gt; [\_x](./puppeteer.mouse._x.md)
## Mouse.\_x property
<b>Signature:</b>
```typescript
_x: number;
```

View File

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [Mouse](./puppeteer.mouse.md) &gt; [\_y](./puppeteer.mouse._y.md)
## Mouse.\_y property
<b>Signature:</b>
```typescript
_y: number;
```

View File

@ -20,7 +20,7 @@ click(x: number, y: number, options?: MouseOptions & {
| --- | --- | --- |
| x | number | Horizontal position of the mouse. |
| y | number | Vertical position of the mouse. |
| options | MouseOptions &amp; { delay?: number; } | Optional <code>MouseOptions</code>. |
| options | [MouseOptions](./puppeteer.mouseoptions.md) &amp; { delay?: number; } | Optional <code>MouseOptions</code>. |
<b>Returns:</b>

View File

@ -16,7 +16,7 @@ down(options?: MouseOptions): Promise<void>;
| Parameter | Type | Description |
| --- | --- | --- |
| options | MouseOptions | Optional <code>MouseOptions</code>. |
| options | [MouseOptions](./puppeteer.mouseoptions.md) | Optional <code>MouseOptions</code>. |
<b>Returns:</b>

View File

@ -73,16 +73,6 @@ await browser.defaultBrowserContext().overridePermissions(
```
## Properties
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [\_button](./puppeteer.mouse._button.md) | | MouseButton | |
| [\_client](./puppeteer.mouse._client.md) | | [CDPSession](./puppeteer.cdpsession.md) | |
| [\_keyboard](./puppeteer.mouse._keyboard.md) | | [Keyboard](./puppeteer.keyboard.md) | |
| [\_x](./puppeteer.mouse._x.md) | | number | |
| [\_y](./puppeteer.mouse._y.md) | | number | |
## Methods
| Method | Modifiers | Description |

View File

@ -16,7 +16,7 @@ up(options?: MouseOptions): Promise<void>;
| Parameter | Type | Description |
| --- | --- | --- |
| options | MouseOptions | Optional <code>MouseOptions</code>. |
| options | [MouseOptions](./puppeteer.mouseoptions.md) | Optional <code>MouseOptions</code>. |
<b>Returns:</b>

View File

@ -1,11 +1,12 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [MouseButtonInput](./puppeteer.mousebuttoninput.md)
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [MouseButton](./puppeteer.mousebutton.md)
## MouseButton type
## MouseButtonInput type
<b>Signature:</b>
```typescript
export declare type MouseButtonInput = Exclude<MouseButton, 'none'>;
export declare type MouseButton = 'left' | 'right' | 'middle';
```

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [MouseOptions](./puppeteer.mouseoptions.md) &gt; [button](./puppeteer.mouseoptions.button.md)
## MouseOptions.button property
<b>Signature:</b>
```typescript
button?: MouseButton;
```

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [MouseOptions](./puppeteer.mouseoptions.md) &gt; [clickCount](./puppeteer.mouseoptions.clickcount.md)
## MouseOptions.clickCount property
<b>Signature:</b>
```typescript
clickCount?: number;
```

View File

@ -0,0 +1,20 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [MouseOptions](./puppeteer.mouseoptions.md)
## MouseOptions interface
<b>Signature:</b>
```typescript
export interface MouseOptions
```
## Properties
| Property | Type | Description |
| --- | --- | --- |
| [button](./puppeteer.mouseoptions.button.md) | [MouseButton](./puppeteer.mousebutton.md) | |
| [clickCount](./puppeteer.mouseoptions.clickcount.md) | number | |

View File

@ -9,7 +9,7 @@
```typescript
click(selector: string, options?: {
delay?: number;
button?: MouseButtonInput;
button?: MouseButton;
clickCount?: number;
}): Promise<void>;
```
@ -19,7 +19,7 @@ click(selector: string, options?: {
| Parameter | Type | Description |
| --- | --- | --- |
| selector | string | |
| options | { delay?: number; button?: [MouseButtonInput](./puppeteer.mousebuttoninput.md)<!-- -->; clickCount?: number; } | |
| options | { delay?: number; button?: [MouseButton](./puppeteer.mousebutton.md)<!-- -->; clickCount?: number; } | |
<b>Returns:</b>

View File

@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [Platform](./puppeteer.platform.md)
## Platform type
Supported platforms.
<b>Signature:</b>
```typescript
export declare type Platform = 'linux' | 'mac' | 'win32' | 'win64';
```

View File

@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [Product](./puppeteer.product.md)
## Product type
Supported products.
<b>Signature:</b>
```typescript
export declare type Product = 'chrome' | 'firefox';
```

View File

@ -0,0 +1,22 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [ProductLauncher](./puppeteer.productlauncher.md) &gt; [connect](./puppeteer.productlauncher.connect.md)
## ProductLauncher.connect() method
<b>Signature:</b>
```typescript
connect(object: any): any;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| object | any | |
<b>Returns:</b>
any

View File

@ -0,0 +1,22 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [ProductLauncher](./puppeteer.productlauncher.md) &gt; [defaultArgs](./puppeteer.productlauncher.defaultargs.md)
## ProductLauncher.defaultArgs() method
<b>Signature:</b>
```typescript
defaultArgs(object: any): any;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| object | any | |
<b>Returns:</b>
any

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [ProductLauncher](./puppeteer.productlauncher.md) &gt; [executablePath](./puppeteer.productlauncher.executablepath.md)
## ProductLauncher.executablePath property
<b>Signature:</b>
```typescript
executablePath: () => string;
```

View File

@ -0,0 +1,22 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [ProductLauncher](./puppeteer.productlauncher.md) &gt; [launch](./puppeteer.productlauncher.launch.md)
## ProductLauncher.launch() method
<b>Signature:</b>
```typescript
launch(object: any): any;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| object | any | |
<b>Returns:</b>
any

View File

@ -0,0 +1,29 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [ProductLauncher](./puppeteer.productlauncher.md)
## ProductLauncher interface
Describes a launcher - a class that is able to create and launch a browser instance.
<b>Signature:</b>
```typescript
export interface ProductLauncher
```
## Properties
| Property | Type | Description |
| --- | --- | --- |
| [executablePath](./puppeteer.productlauncher.executablepath.md) | () =&gt; string | |
| [product](./puppeteer.productlauncher.product.md) | string | |
## Methods
| Method | Description |
| --- | --- |
| [connect(object)](./puppeteer.productlauncher.connect.md) | |
| [defaultArgs(object)](./puppeteer.productlauncher.defaultargs.md) | |
| [launch(object)](./puppeteer.productlauncher.launch.md) | |

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [ProductLauncher](./puppeteer.productlauncher.md) &gt; [product](./puppeteer.productlauncher.product.md)
## ProductLauncher.product property
<b>Signature:</b>
```typescript
product: string;
```

View File

@ -21,7 +21,7 @@ connect(options: BrowserOptions & {
| Parameter | Type | Description |
| --- | --- | --- |
| options | BrowserOptions &amp; { browserWSEndpoint?: string; browserURL?: string; transport?: ConnectionTransport; product?: string; } | Set of configurable options to set on the browser. |
| options | [BrowserOptions](./puppeteer.browseroptions.md) &amp; { browserWSEndpoint?: string; browserURL?: string; transport?: ConnectionTransport; product?: string; } | Set of configurable options to set on the browser. |
<b>Returns:</b>

View File

@ -14,7 +14,7 @@ defaultArgs(options?: ChromeArgOptions): string[];
| Parameter | Type | Description |
| --- | --- | --- |
| options | ChromeArgOptions | Set of configurable options to set on the browser. |
| options | [ChromeArgOptions](./puppeteer.chromeargoptions.md) | Set of configurable options to set on the browser. |
<b>Returns:</b>

View File

@ -19,7 +19,7 @@ launch(options?: LaunchOptions & ChromeArgOptions & BrowserOptions & {
| Parameter | Type | Description |
| --- | --- | --- |
| options | LaunchOptions &amp; ChromeArgOptions &amp; BrowserOptions &amp; { product?: string; extraPrefsFirefox?: {}; } | Set of configurable options to set on the browser. |
| options | [LaunchOptions](./puppeteer.launchoptions.md) &amp; [ChromeArgOptions](./puppeteer.chromeargoptions.md) &amp; [BrowserOptions](./puppeteer.browseroptions.md) &amp; { product?: string; extraPrefsFirefox?: {}; } | Set of configurable options to set on the browser. |
<b>Returns:</b>

View File

@ -40,9 +40,9 @@ const puppeteer = require('puppeteer');
| [\_\_productName](./puppeteer.puppeteer.__productname.md) | | string | |
| [\_changedProduct](./puppeteer.puppeteer._changedproduct.md) | | boolean | |
| [\_isPuppeteerCore](./puppeteer.puppeteer._ispuppeteercore.md) | | boolean | |
| [\_lazyLauncher](./puppeteer.puppeteer._lazylauncher.md) | | ProductLauncher | |
| [\_lazyLauncher](./puppeteer.puppeteer._lazylauncher.md) | | [ProductLauncher](./puppeteer.productlauncher.md) | |
| [\_preferredRevision](./puppeteer.puppeteer._preferredrevision.md) | | string | |
| [devices](./puppeteer.puppeteer.devices.md) | | DevicesMap | |
| [devices](./puppeteer.puppeteer.devices.md) | | [DevicesMap](./puppeteer.devicesmap.md) | |
| [errors](./puppeteer.puppeteer.errors.md) | | [PuppeteerErrors](./puppeteer.puppeteererrors.md) | |
| [product](./puppeteer.puppeteer.product.md) | | string | |

View File

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [Touchscreen](./puppeteer.touchscreen.md) &gt; [\_client](./puppeteer.touchscreen._client.md)
## Touchscreen.\_client property
<b>Signature:</b>
```typescript
_client: CDPSession;
```

View File

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [Touchscreen](./puppeteer.touchscreen.md) &gt; [\_keyboard](./puppeteer.touchscreen._keyboard.md)
## Touchscreen.\_keyboard property
<b>Signature:</b>
```typescript
_keyboard: Keyboard;
```

View File

@ -16,13 +16,6 @@ export declare class Touchscreen
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `Touchscreen` class.
## Properties
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [\_client](./puppeteer.touchscreen._client.md) | | [CDPSession](./puppeteer.cdpsession.md) | |
| [\_keyboard](./puppeteer.touchscreen._keyboard.md) | | [Keyboard](./puppeteer.keyboard.md) | |
## Methods
| Method | Modifiers | Description |

View File

@ -16,7 +16,7 @@ start(options?: TracingOptions): Promise<void>;
| Parameter | Type | Description |
| --- | --- | --- |
| options | TracingOptions | Optional <code>TracingOptions</code>. |
| options | [TracingOptions](./puppeteer.tracingoptions.md) | Optional <code>TracingOptions</code>. |
<b>Returns:</b>

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [TracingOptions](./puppeteer.tracingoptions.md) &gt; [categories](./puppeteer.tracingoptions.categories.md)
## TracingOptions.categories property
<b>Signature:</b>
```typescript
categories?: string[];
```

View File

@ -0,0 +1,21 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [TracingOptions](./puppeteer.tracingoptions.md)
## TracingOptions interface
<b>Signature:</b>
```typescript
export interface TracingOptions
```
## Properties
| Property | Type | Description |
| --- | --- | --- |
| [categories](./puppeteer.tracingoptions.categories.md) | string\[\] | |
| [path](./puppeteer.tracingoptions.path.md) | string | |
| [screenshots](./puppeteer.tracingoptions.screenshots.md) | boolean | |

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [TracingOptions](./puppeteer.tracingoptions.md) &gt; [path](./puppeteer.tracingoptions.path.md)
## TracingOptions.path property
<b>Signature:</b>
```typescript
path?: string;
```

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [TracingOptions](./puppeteer.tracingoptions.md) &gt; [screenshots](./puppeteer.tracingoptions.screenshots.md)
## TracingOptions.screenshots property
<b>Signature:</b>
```typescript
screenshots?: boolean;
```

View File

@ -31,6 +31,7 @@ export * from './node/BrowserFetcher';
export * from './common/Connection';
export * from './common/ConsoleMessage';
export * from './common/Coverage';
export * from './common/DeviceDescriptors';
export * from './common/Dialog';
export * from './common/JSHandle';
export * from './common/ExecutionContext';
@ -40,6 +41,8 @@ export * from './common/FrameManager';
export * from './common/Input';
export * from './common/Page';
export * from './common/Puppeteer';
export * from './node/LaunchOptions';
export * from './node/Launcher';
export * from './common/HTTPRequest';
export * from './common/HTTPResponse';
export * from './common/SecurityDetails';

View File

@ -21,7 +21,7 @@ import { TimeoutError } from './Errors';
import { JSHandle, ElementHandle } from './JSHandle';
import { ExecutionContext } from './ExecutionContext';
import { TimeoutSettings } from './TimeoutSettings';
import { MouseButtonInput } from './Input';
import { MouseButton } from './Input';
import { FrameManager, Frame } from './FrameManager';
import { getQueryHandlerAndSelector, QueryHandler } from './QueryHandler';
import {
@ -408,7 +408,7 @@ export class DOMWorld {
async click(
selector: string,
options: { delay?: number; button?: MouseButtonInput; clickCount?: number }
options: { delay?: number; button?: MouseButton; clickCount?: number }
): Promise<void> {
const handle = await this.$(selector);
assert(handle, 'No node found for selector: ' + selector);

View File

@ -25,7 +25,7 @@ import { NetworkManager } from './NetworkManager';
import { TimeoutSettings } from './TimeoutSettings';
import { CDPSession } from './Connection';
import { JSHandle, ElementHandle } from './JSHandle';
import { MouseButtonInput } from './Input';
import { MouseButton } from './Input';
import { Page } from './Page';
import { HTTPResponse } from './HTTPResponse';
import Protocol from '../protocol';
@ -536,7 +536,7 @@ export class Frame {
selector: string,
options: {
delay?: number;
button?: MouseButtonInput;
button?: MouseButton;
clickCount?: number;
} = {}
): Promise<void> {

View File

@ -33,7 +33,7 @@ type KeyDescription = Required<
* {@link Keyboard.up}, and {@link Keyboard.sendCharacter}
* to manually fire events as if they were generated from a real keyboard.
*
* On MacOS, keyboard shortcuts like `⌘ A` -> Select All do not work.
* On MacOS, keyboard shortcuts like `⌘ A` -\> Select All do not work.
* See {@link https://github.com/puppeteer/puppeteer/issues/1313 | #1313}.
*
* @example
@ -275,11 +275,16 @@ export class Keyboard {
}
}
type MouseButton = 'none' | 'left' | 'right' | 'middle';
export type MouseButtonInput = Exclude<MouseButton, 'none'>;
/**
* @public
*/
export type MouseButton = 'left' | 'right' | 'middle';
interface MouseOptions {
button?: MouseButtonInput;
/**
* @public
*/
export interface MouseOptions {
button?: MouseButton;
clickCount?: number;
}
@ -341,11 +346,12 @@ interface MouseOptions {
* @public
*/
export class Mouse {
_client: CDPSession;
_keyboard: Keyboard;
_x = 0;
_y = 0;
_button: MouseButton = 'none';
private _client: CDPSession;
private _keyboard: Keyboard;
private _x = 0;
private _y = 0;
private _button: MouseButton | 'none' = 'none';
/**
* @internal
*/
@ -444,10 +450,11 @@ export class Mouse {
/**
* The Touchscreen class exposes touchscreen events.
* @public
*/
export class Touchscreen {
_client: CDPSession;
_keyboard: Keyboard;
private _client: CDPSession;
private _keyboard: Keyboard;
/**
* @internal

View File

@ -23,7 +23,7 @@ import { Connection, CDPSession } from './Connection';
import { Dialog } from './Dialog';
import { EmulationManager } from './EmulationManager';
import { Frame, FrameManager } from './FrameManager';
import { Keyboard, Mouse, Touchscreen, MouseButtonInput } from './Input';
import { Keyboard, Mouse, Touchscreen, MouseButton } from './Input';
import { Tracing } from './Tracing';
import { assert } from './assert';
import { helper, debugError } from './helper';
@ -1557,7 +1557,7 @@ export class Page extends EventEmitter {
selector: string,
options: {
delay?: number;
button?: MouseButtonInput;
button?: MouseButton;
clickCount?: number;
} = {}
): Promise<void> {

View File

@ -23,8 +23,7 @@ import { ProductLauncher } from '../node/Launcher';
import { BrowserFetcher, BrowserFetcherOptions } from '../node/BrowserFetcher';
import { puppeteerErrors, PuppeteerErrors } from './Errors';
import { ConnectionTransport } from './ConnectionTransport';
import { devicesMap } from './DeviceDescriptors';
import { DevicesMap } from './DeviceDescriptors';
import { devicesMap, DevicesMap } from './DeviceDescriptors';
import { Browser } from './Browser';
import {
registerCustomQueryHandler,
@ -137,18 +136,16 @@ export class Puppeteer {
/**
* @internal
*/
get _productName(): string {
return this.__productName;
}
// don't need any TSDoc here - because the getter is internal the setter is too.
set _productName(name: string) {
if (this.__productName !== name) this._changedProduct = true;
this.__productName = name;
}
/**
* @internal
*/
get _productName(): string {
return this.__productName;
}
/**
* @remarks
*
@ -254,7 +251,7 @@ export class Puppeteer {
/**
*
* @param options Set of configurable options to set on the browser.
* @param options - Set of configurable options to set on the browser.
* @returns The default flags that Chromium will be launched with.
*/
defaultArgs(options: ChromeArgOptions = {}): string[] {
@ -263,7 +260,7 @@ export class Puppeteer {
/**
*
* @param options Set of configurable options to specify the settings
* @param options - Set of configurable options to specify the settings
* of the BrowserFetcher.
* @returns A new BrowserFetcher instance.
*/

View File

@ -22,6 +22,9 @@ import { Browser, BrowserContext } from './Browser';
import { Viewport } from './PuppeteerViewport';
import Protocol from '../protocol';
/**
* @public
*/
export class Target {
private _targetInfo: Protocol.Target.TargetInfo;
private _browserContext: BrowserContext;

View File

@ -17,7 +17,10 @@ import { assert } from './assert';
import { helper } from './helper';
import { CDPSession } from './Connection';
interface TracingOptions {
/**
* @public
*/
export interface TracingOptions {
path?: string;
screenshots?: boolean;
categories?: string[];
@ -35,6 +38,8 @@ interface TracingOptions {
* await page.goto('https://www.google.com');
* await page.tracing.stop();
* ```
*
* @public
*/
export class Tracing {
_client: CDPSession;

View File

@ -14,6 +14,9 @@
* limitations under the License.
*/
/**
* @internal
*/
export interface KeyDefinition {
keyCode?: number;
shiftKeyCode?: number;
@ -25,6 +28,12 @@ export interface KeyDefinition {
location?: number;
}
/**
* All the valid keys that can be passed to functions that take user input, such
* as {@link Keyboard.press | keyboard.press }
*
* @public
*/
export type KeyInput =
| '0'
| '1'
@ -282,6 +291,9 @@ export type KeyInput =
| 'VolumeDown'
| 'VolumeUp';
/**
* @internal
*/
export const keyDefinitions: Readonly<Record<KeyInput, KeyDefinition>> = {
'0': { keyCode: 48, key: '0', code: 'Digit0' },
'1': { keyCode: 49, key: '1', code: 'Digit1' },

View File

@ -21,11 +21,18 @@ import { CDPSession } from './Connection';
import Protocol from '../protocol';
import { EvaluateHandleFn, SerializableOrJSHandle } from './EvalTypes';
/**
* @internal
*/
type ConsoleAPICalledCallback = (
eventType: string,
handles: JSHandle[],
trace: Protocol.Runtime.StackTrace
) => void;
/**
* @internal
*/
type ExceptionThrownCallback = (
details: Protocol.Runtime.ExceptionDetails
) => void;
@ -124,8 +131,8 @@ export class WebWorker extends EventEmitter {
* non-serializable value, then `worker.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. Shortcut for `await
* worker.executionContext()).evaluate(pageFunction, ...args)`.
* bigint literals.
* Shortcut for `await worker.executionContext()).evaluate(pageFunction, ...args)`.
*
* @param pageFunction - Function to be evaluated in the worker context.
* @param args - Arguments to pass to `pageFunction`.

View File

@ -62,12 +62,14 @@ const browserConfig = {
/**
* Supported platforms.
* @public
*/
type Platform = 'linux' | 'mac' | 'win32' | 'win64';
export type Platform = 'linux' | 'mac' | 'win32' | 'win64';
/**
* Supported products.
* @public
*/
type Product = 'chrome' | 'firefox';
export type Product = 'chrome' | 'firefox';
function archiveName(
product: Product,
@ -128,6 +130,9 @@ function existsAsync(filePath: string): Promise<boolean> {
});
}
/**
* @public
*/
export interface BrowserFetcherOptions {
platform?: Platform;
product?: string;
@ -135,7 +140,10 @@ export interface BrowserFetcherOptions {
host?: string;
}
interface BrowserFetcherRevisionInfo {
/**
* @public
*/
export interface BrowserFetcherRevisionInfo {
folderPath: string;
executablePath: string;
url: string;

View File

@ -16,6 +16,11 @@
import { Viewport } from '../common/PuppeteerViewport';
/**
* Launcher options that only apply to Chrome.
*
* @public
*/
export interface ChromeArgOptions {
headless?: boolean;
args?: string[];
@ -23,6 +28,10 @@ export interface ChromeArgOptions {
devtools?: boolean;
}
/**
* Generic launch options that can be passed when launching any browser.
* @public
*/
export interface LaunchOptions {
executablePath?: string;
ignoreDefaultArgs?: boolean | string[];
@ -35,6 +44,10 @@ export interface LaunchOptions {
pipe?: boolean;
}
/**
* Generic browser options that can be passed when launching any browser.
* @public
*/
export interface BrowserOptions {
ignoreHTTPSErrors?: boolean;
defaultViewport?: Viewport;

View File

@ -39,6 +39,10 @@ import {
BrowserOptions,
} from './LaunchOptions';
/**
* Describes a launcher - a class that is able to create and launch a browser instance.
* @public
*/
export interface ProductLauncher {
launch(object);
connect(object);
@ -47,6 +51,9 @@ export interface ProductLauncher {
product: string;
}
/**
* @internal
*/
class ChromeLauncher implements ProductLauncher {
_projectRoot: string;
_preferredRevision: string;
@ -267,6 +274,9 @@ class ChromeLauncher implements ProductLauncher {
}
}
/**
* @internal
*/
class FirefoxLauncher implements ProductLauncher {
_projectRoot: string;
_preferredRevision: string;
@ -766,7 +776,10 @@ function resolveExecutablePath(
return { executablePath: revisionInfo.executablePath, missingText };
}
function Launcher(
/**
* @internal
*/
export default function Launcher(
projectRoot: string,
preferredRevision: string,
isPuppeteerCore: boolean,
@ -803,5 +816,3 @@ function Launcher(
);
}
}
export default Launcher;

View File

@ -728,6 +728,27 @@ function compareDocumentations(actual, expected) {
expectedName: 'JSCoverageOptions',
},
],
[
'Method Mouse.click() options.button',
{
actualName: '"left"|"right"|"middle"',
expectedName: 'MouseButton',
},
],
[
'Method Frame.click() options.button',
{
actualName: '"left"|"right"|"middle"',
expectedName: 'MouseButton',
},
],
[
'Method Page.click() options.button',
{
actualName: '"left"|"right"|"middle"',
expectedName: 'MouseButton',
},
],
]);
const expectedForSource = expectedNamingMismatches.get(source);