mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
docs: use code block for single values (#9936)
This commit is contained in:
parent
8d026042db
commit
e0eef01f1c
@ -14,10 +14,10 @@ export interface BrowserConnectOptions
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Modifiers | Type | Description | Default |
|
||||
| ----------------- | --------------------- | ----------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ------- |
|
||||
| defaultViewport | <code>optional</code> | [Viewport](./puppeteer.viewport.md) \| null | Sets the viewport for each page. | |
|
||||
| ignoreHTTPSErrors | <code>optional</code> | boolean | Whether to ignore HTTPS errors during navigation. | false |
|
||||
| protocolTimeout | <code>optional</code> | number | Timeout setting for individual protocol (CDP) calls. | 180000 |
|
||||
| slowMo | <code>optional</code> | number | Slows down Puppeteer operations by the specified amount of milliseconds to aid debugging. | |
|
||||
| targetFilter | <code>optional</code> | [TargetFilterCallback](./puppeteer.targetfiltercallback.md) | Callback to decide if Puppeteer should connect to a given target or not. | |
|
||||
| Property | Modifiers | Type | Description | Default |
|
||||
| ----------------- | --------------------- | ----------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -------------------- |
|
||||
| defaultViewport | <code>optional</code> | [Viewport](./puppeteer.viewport.md) \| null | Sets the viewport for each page. | |
|
||||
| ignoreHTTPSErrors | <code>optional</code> | boolean | Whether to ignore HTTPS errors during navigation. | <code>false</code> |
|
||||
| protocolTimeout | <code>optional</code> | number | Timeout setting for individual protocol (CDP) calls. | <code>180_000</code> |
|
||||
| slowMo | <code>optional</code> | number | Slows down Puppeteer operations by the specified amount of milliseconds to aid debugging. | |
|
||||
| targetFilter | <code>optional</code> | [TargetFilterCallback](./puppeteer.targetfiltercallback.md) | Callback to decide if Puppeteer should connect to a given target or not. | |
|
||||
|
@ -16,6 +16,6 @@ export interface BrowserFetcherOptions
|
||||
| ----------------- | --------------------- | ----------------------------------- | ------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| host | <code>optional</code> | string | Determines the host that will be used for downloading. | <p>Either</p><p>- https://storage.googleapis.com or - https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central</p> |
|
||||
| path | | string | Determines the path to download browsers to. | |
|
||||
| platform | <code>optional</code> | [Platform](./puppeteer.platform.md) | Determines which platform the browser will be suited for. | Auto-detected. |
|
||||
| product | <code>optional</code> | 'chrome' \| 'firefox' | Determines which product the [BrowserFetcher](./puppeteer.browserfetcher.md) is for. | <code>"chrome"</code>. |
|
||||
| platform | <code>optional</code> | [Platform](./puppeteer.platform.md) | Determines which platform the browser will be suited for. | **Auto-detected.** |
|
||||
| product | <code>optional</code> | 'chrome' \| 'firefox' | Determines which product the [BrowserFetcher](./puppeteer.browserfetcher.md) is for. | <code>chrome</code> |
|
||||
| useMacOSARMBinary | <code>optional</code> | boolean | Enables the use of the Chromium binary for macOS ARM. | |
|
||||
|
@ -19,5 +19,5 @@ export interface BrowserLaunchArgumentOptions
|
||||
| args | <code>optional</code> | string\[\] | Additional command line arguments to pass to the browser instance. | |
|
||||
| debuggingPort | <code>optional</code> | number | | |
|
||||
| devtools | <code>optional</code> | boolean | Whether to auto-open a DevTools panel for each tab. If this is set to <code>true</code>, then <code>headless</code> will be forced to <code>false</code>. | <code>false</code> |
|
||||
| headless | <code>optional</code> | boolean \| 'new' | Whether to run the browser in headless mode. | true |
|
||||
| headless | <code>optional</code> | boolean \| 'new' | Whether to run the browser in headless mode. | <code>true</code> |
|
||||
| userDataDir | <code>optional</code> | string | Path to a user data directory. [see the Chromium docs](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/user_data_dir.md) for more info. | |
|
||||
|
@ -12,9 +12,9 @@ export interface ClickOptions
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Modifiers | Type | Description | Default |
|
||||
| ---------- | --------------------- | ----------------------------------------- | ------------------------------------------------------------------------------------- | ------- |
|
||||
| button | <code>optional</code> | [MouseButton](./puppeteer.mousebutton.md) | | 'left' |
|
||||
| clickCount | <code>optional</code> | number | | 1 |
|
||||
| delay | <code>optional</code> | number | Time to wait between <code>mousedown</code> and <code>mouseup</code> in milliseconds. | 0 |
|
||||
| offset | <code>optional</code> | [Offset](./puppeteer.offset.md) | Offset for the clickable point relative to the top-left corner of the border box. | |
|
||||
| Property | Modifiers | Type | Description | Default |
|
||||
| ---------- | --------------------- | ----------------------------------------- | ------------------------------------------------------------------------------------- | -------------- |
|
||||
| button | <code>optional</code> | [MouseButton](./puppeteer.mousebutton.md) | | 'left' |
|
||||
| clickCount | <code>optional</code> | number | | <code>1</code> |
|
||||
| delay | <code>optional</code> | number | Time to wait between <code>mousedown</code> and <code>mouseup</code> in milliseconds. | <code>0</code> |
|
||||
| offset | <code>optional</code> | [Offset](./puppeteer.offset.md) | Offset for the clickable point relative to the top-left corner of the border box. | |
|
||||
|
@ -20,10 +20,10 @@ export interface Configuration
|
||||
| ------------------ | --------------------- | ------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| browserRevision | <code>optional</code> | string | <p>Specifies a certain version of the browser you'd like Puppeteer to use.</p><p>Can be overridden by <code>PUPPETEER_BROWSER_REVISION</code>.</p><p>See [puppeteer.launch](./puppeteer.puppeteernode.launch.md) on how executable path is inferred.</p> | A compatible-revision of the browser. |
|
||||
| cacheDirectory | <code>optional</code> | string | <p>Defines the directory to be used by Puppeteer for caching.</p><p>Can be overridden by <code>PUPPETEER_CACHE_DIR</code>.</p> | <code>path.join(os.homedir(), '.cache', 'puppeteer')</code> |
|
||||
| defaultProduct | <code>optional</code> | [Product](./puppeteer.product.md) | <p>Specifies which browser you'd like Puppeteer to use.</p><p>Can be overridden by <code>PUPPETEER_PRODUCT</code>.</p> | <code>'chrome'</code> |
|
||||
| defaultProduct | <code>optional</code> | [Product](./puppeteer.product.md) | <p>Specifies which browser you'd like Puppeteer to use.</p><p>Can be overridden by <code>PUPPETEER_PRODUCT</code>.</p> | <code>chrome</code> |
|
||||
| downloadHost | <code>optional</code> | string | <p>Specifies the URL prefix that is used to download Chromium.</p><p>Can be overridden by <code>PUPPETEER_DOWNLOAD_HOST</code>.</p> | Either https://storage.googleapis.com or https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central, depending on the product. |
|
||||
| downloadPath | <code>optional</code> | string | <p>Specifies the path for the downloads folder.</p><p>Can be overridden by <code>PUPPETEER_DOWNLOAD_PATH</code>.</p> | <code><cache>/<product></code> where <code><cache></code> is Puppeteer's cache directory and <code><product></code> is the name of the browser. |
|
||||
| executablePath | <code>optional</code> | string | <p>Specifies an executable path to be used in [puppeteer.launch](./puppeteer.puppeteernode.launch.md).</p><p>Can be overridden by <code>PUPPETEER_EXECUTABLE_PATH</code>.</p> | Auto-computed. |
|
||||
| executablePath | <code>optional</code> | string | <p>Specifies an executable path to be used in [puppeteer.launch](./puppeteer.puppeteernode.launch.md).</p><p>Can be overridden by <code>PUPPETEER_EXECUTABLE_PATH</code>.</p> | **Auto-computed.** |
|
||||
| experiments | <code>optional</code> | [ExperimentsConfiguration](./puppeteer.experimentsconfiguration.md) | Defines experimental options for Puppeteer. | |
|
||||
| logLevel | <code>optional</code> | 'silent' \| 'error' \| 'warn' | <p>Tells Puppeteer to log at the given level.</p><p>At the moment, any option silences logging.</p> | <code>undefined</code> |
|
||||
| skipDownload | <code>optional</code> | boolean | <p>Tells Puppeteer to not download during installation.</p><p>Can be overridden by <code>PUPPETEER_SKIP_DOWNLOAD</code>.</p> | |
|
||||
|
@ -17,15 +17,15 @@ export interface LaunchOptions
|
||||
| Property | Modifiers | Type | Description | Default |
|
||||
| ------------------ | --------------------- | ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------- |
|
||||
| channel | <code>optional</code> | [ChromeReleaseChannel](./puppeteer.chromereleasechannel.md) | Chrome Release Channel | |
|
||||
| dumpio | <code>optional</code> | boolean | If true, pipes the browser process stdout and stderr to <code>process.stdout</code> and <code>process.stderr</code>. | false |
|
||||
| dumpio | <code>optional</code> | boolean | If true, pipes the browser process stdout and stderr to <code>process.stdout</code> and <code>process.stderr</code>. | <code>false</code> |
|
||||
| env | <code>optional</code> | Record<string, string \| undefined> | Specify environment variables that will be visible to the browser. | The contents of <code>process.env</code>. |
|
||||
| executablePath | <code>optional</code> | string | Path to a browser executable to use instead of the bundled Chromium. Note that Puppeteer is only guaranteed to work with the bundled Chromium, so use this setting at your own risk. | |
|
||||
| extraPrefsFirefox | <code>optional</code> | Record<string, unknown> | [Additional preferences](https://searchfox.org/mozilla-release/source/modules/libpref/init/all.js) that can be passed when launching with Firefox. | |
|
||||
| handleSIGHUP | <code>optional</code> | boolean | Close the browser process on <code>SIGHUP</code>. | <code>true</code> |
|
||||
| handleSIGINT | <code>optional</code> | boolean | Close the browser process on <code>Ctrl+C</code>. | <code>true</code> |
|
||||
| handleSIGTERM | <code>optional</code> | boolean | Close the browser process on <code>SIGTERM</code>. | <code>true</code> |
|
||||
| ignoreDefaultArgs | <code>optional</code> | boolean \| string\[\] | If <code>true</code>, do not use <code>puppeteer.defaultArgs()</code> when creating a browser. If an array is provided, these args will be filtered out. Use this with care - you probably want the default arguments Puppeteer uses. | false |
|
||||
| pipe | <code>optional</code> | boolean | Connect to a browser over a pipe instead of a WebSocket. | false |
|
||||
| ignoreDefaultArgs | <code>optional</code> | boolean \| string\[\] | If <code>true</code>, do not use <code>puppeteer.defaultArgs()</code> when creating a browser. If an array is provided, these args will be filtered out. Use this with care - you probably want the default arguments Puppeteer uses. | <code>false</code> |
|
||||
| pipe | <code>optional</code> | boolean | Connect to a browser over a pipe instead of a WebSocket. | <code>false</code> |
|
||||
| product | <code>optional</code> | [Product](./puppeteer.product.md) | Which browser to launch. | <code>chrome</code> |
|
||||
| timeout | <code>optional</code> | number | Maximum time in milliseconds to wait for the browser to start. Pass <code>0</code> to disable the timeout. | 30000 (30 seconds). |
|
||||
| waitForInitialPage | <code>optional</code> | boolean | Whether to wait for the initial page to be ready. Useful when a user explicitly disables that (e.g. <code>--no-startup-window</code> for Chrome). | true |
|
||||
| timeout | <code>optional</code> | number | Maximum time in milliseconds to wait for the browser to start. Pass <code>0</code> to disable the timeout. | <code>30_000</code> (30 seconds). |
|
||||
| waitForInitialPage | <code>optional</code> | boolean | Whether to wait for the initial page to be ready. Useful when a user explicitly disables that (e.g. <code>--no-startup-window</code> for Chrome). | <code>true</code> |
|
||||
|
@ -26,4 +26,4 @@ Promise<void>
|
||||
|
||||
#### Default value:
|
||||
|
||||
true
|
||||
`true`
|
||||
|
@ -14,20 +14,20 @@ export interface PDFOptions
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Modifiers | Type | Description | Default |
|
||||
| ------------------- | --------------------- | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
|
||||
| displayHeaderFooter | <code>optional</code> | boolean | Whether to show the header and footer. | false |
|
||||
| footerTemplate | <code>optional</code> | string | HTML template for the print footer. Has the same constraints and support for special classes as [PDFOptions.headerTemplate](./puppeteer.pdfoptions.md). | |
|
||||
| format | <code>optional</code> | [PaperFormat](./puppeteer.paperformat.md) | | <code>letter</code>. |
|
||||
| headerTemplate | <code>optional</code> | string | <p>HTML template for the print header. Should be valid HTML with the following classes used to inject values into them:</p><p>- <code>date</code> formatted print date</p><p>- <code>title</code> document title</p><p>- <code>url</code> document location</p><p>- <code>pageNumber</code> current page number</p><p>- <code>totalPages</code> total pages in the document</p> | |
|
||||
| height | <code>optional</code> | string \| number | Sets the height of paper. You can pass in a number or a string with a unit. | |
|
||||
| landscape | <code>optional</code> | boolean | Whether to print in landscape orientation. | = false |
|
||||
| margin | <code>optional</code> | [PDFMargin](./puppeteer.pdfmargin.md) | Set the PDF margins. | no margins are set. |
|
||||
| omitBackground | <code>optional</code> | boolean | Hides default white background and allows generating pdfs with transparency. | false |
|
||||
| pageRanges | <code>optional</code> | string | Paper ranges to print, e.g. <code>1-5, 8, 11-13</code>. | The empty string, which means all pages are printed. |
|
||||
| path | <code>optional</code> | string | The path to save the file to. | the empty string, which means the PDF will not be written to disk. |
|
||||
| preferCSSPageSize | <code>optional</code> | boolean | Give any CSS <code>@page</code> size declared in the page priority over what is declared in the <code>width</code> or <code>height</code> or <code>format</code> option. | <code>false</code>, which will scale the content to fit the paper size. |
|
||||
| printBackground | <code>optional</code> | boolean | Set to <code>true</code> to print background graphics. | false |
|
||||
| scale | <code>optional</code> | number | Scales the rendering of the web page. Amount must be between <code>0.1</code> and <code>2</code>. | 1 |
|
||||
| timeout | <code>optional</code> | number | Timeout in milliseconds. Pass <code>0</code> to disable timeout. | 30000 |
|
||||
| width | <code>optional</code> | string \| number | Sets the width of paper. You can pass in a number or a string with a unit. | |
|
||||
| Property | Modifiers | Type | Description | Default |
|
||||
| ------------------- | --------------------- | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
|
||||
| displayHeaderFooter | <code>optional</code> | boolean | Whether to show the header and footer. | <code>false</code> |
|
||||
| footerTemplate | <code>optional</code> | string | HTML template for the print footer. Has the same constraints and support for special classes as [PDFOptions.headerTemplate](./puppeteer.pdfoptions.md). | |
|
||||
| format | <code>optional</code> | [PaperFormat](./puppeteer.paperformat.md) | | <code>letter</code>. |
|
||||
| headerTemplate | <code>optional</code> | string | <p>HTML template for the print header. Should be valid HTML with the following classes used to inject values into them:</p><p>- <code>date</code> formatted print date</p><p>- <code>title</code> document title</p><p>- <code>url</code> document location</p><p>- <code>pageNumber</code> current page number</p><p>- <code>totalPages</code> total pages in the document</p> | |
|
||||
| height | <code>optional</code> | string \| number | Sets the height of paper. You can pass in a number or a string with a unit. | |
|
||||
| landscape | <code>optional</code> | boolean | Whether to print in landscape orientation. | <code>false</code> |
|
||||
| margin | <code>optional</code> | [PDFMargin](./puppeteer.pdfmargin.md) | Set the PDF margins. | <code>undefined</code> no margins are set. |
|
||||
| omitBackground | <code>optional</code> | boolean | Hides default white background and allows generating pdfs with transparency. | <code>false</code> |
|
||||
| pageRanges | <code>optional</code> | string | Paper ranges to print, e.g. <code>1-5, 8, 11-13</code>. | The empty string, which means all pages are printed. |
|
||||
| path | <code>optional</code> | string | The path to save the file to. | <code>undefined</code>, which means the PDF will not be written to disk. |
|
||||
| preferCSSPageSize | <code>optional</code> | boolean | Give any CSS <code>@page</code> size declared in the page priority over what is declared in the <code>width</code> or <code>height</code> or <code>format</code> option. | <code>false</code>, which will scale the content to fit the paper size. |
|
||||
| printBackground | <code>optional</code> | boolean | Set to <code>true</code> to print background graphics. | <code>false</code> |
|
||||
| scale | <code>optional</code> | number | Scales the rendering of the web page. Amount must be between <code>0.1</code> and <code>2</code>. | <code>1</code> |
|
||||
| timeout | <code>optional</code> | number | Timeout in milliseconds. Pass <code>0</code> to disable timeout. | <code>30_000</code> |
|
||||
| width | <code>optional</code> | string \| number | Sets the width of paper. You can pass in a number or a string with a unit. | |
|
||||
|
@ -12,10 +12,10 @@ export interface ScreenshotClip
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Modifiers | Type | Description | Default |
|
||||
| -------- | --------------------- | ------ | ----------- | ------- |
|
||||
| height | | number | | |
|
||||
| scale | <code>optional</code> | number | | 1 |
|
||||
| width | | number | | |
|
||||
| x | | number | | |
|
||||
| y | | number | | |
|
||||
| Property | Modifiers | Type | Description | Default |
|
||||
| -------- | --------------------- | ------ | ----------- | -------------- |
|
||||
| height | | number | | |
|
||||
| scale | <code>optional</code> | number | | <code>1</code> |
|
||||
| width | | number | | |
|
||||
| x | | number | | |
|
||||
| y | | number | | |
|
||||
|
@ -14,5 +14,5 @@ export interface SnapshotOptions
|
||||
|
||||
| Property | Modifiers | Type | Description | Default |
|
||||
| --------------- | --------------------- | --------------------------------------------------------- | ------------------------------------------- | --------------------------------- |
|
||||
| interestingOnly | <code>optional</code> | boolean | Prune uninteresting nodes from the tree. | true |
|
||||
| interestingOnly | <code>optional</code> | boolean | Prune uninteresting nodes from the tree. | <code>true</code> |
|
||||
| root | <code>optional</code> | [ElementHandle](./puppeteer.elementhandle.md)<Node> | Root node to get the accessibility tree for | The root node of the entire page. |
|
||||
|
@ -14,11 +14,11 @@ export interface Viewport
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Modifiers | Type | Description | Default |
|
||||
| ----------------- | --------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
|
||||
| deviceScaleFactor | <code>optional</code> | number | Specify device scale factor. See [devicePixelRatio](https://developer.mozilla.org/en-US/docs/Web/API/Window/devicePixelRatio) for more info. | 1 |
|
||||
| hasTouch | <code>optional</code> | boolean | Specify if the viewport supports touch events. | false |
|
||||
| height | | number | The page height in pixels. | |
|
||||
| isLandscape | <code>optional</code> | boolean | Specifies if the viewport is in landscape mode. | false |
|
||||
| isMobile | <code>optional</code> | boolean | Whether the <code>meta viewport</code> tag is taken into account. | false |
|
||||
| width | | number | The page width in pixels. | |
|
||||
| Property | Modifiers | Type | Description | Default |
|
||||
| ----------------- | --------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ |
|
||||
| deviceScaleFactor | <code>optional</code> | number | Specify device scale factor. See [devicePixelRatio](https://developer.mozilla.org/en-US/docs/Web/API/Window/devicePixelRatio) for more info. | <code>1</code> |
|
||||
| hasTouch | <code>optional</code> | boolean | Specify if the viewport supports touch events. | <code>false</code> |
|
||||
| height | | number | The page height in pixels. | |
|
||||
| isLandscape | <code>optional</code> | boolean | Specifies if the viewport is in landscape mode. | <code>false</code> |
|
||||
| isMobile | <code>optional</code> | boolean | Whether the <code>meta viewport</code> tag is taken into account. | <code>false</code> |
|
||||
| width | | number | The page width in pixels. | |
|
||||
|
@ -12,8 +12,8 @@ export interface WaitForSelectorOptions
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Modifiers | Type | Description | Default |
|
||||
| -------- | --------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------- |
|
||||
| hidden | <code>optional</code> | boolean | Wait for the selected element to not be found in the DOM or to be hidden, i.e. have <code>display: none</code> or <code>visibility: hidden</code> CSS properties. | <code>false</code> |
|
||||
| timeout | <code>optional</code> | number | <p>Maximum time to wait in milliseconds. Pass <code>0</code> to disable timeout.</p><p>The default value can be changed by using [Page.setDefaultTimeout()](./puppeteer.page.setdefaulttimeout.md)</p> | <code>30000</code> (30 seconds) |
|
||||
| visible | <code>optional</code> | boolean | Wait for the selected element to be present in DOM and to be visible, i.e. to not have <code>display: none</code> or <code>visibility: hidden</code> CSS properties. | <code>false</code> |
|
||||
| Property | Modifiers | Type | Description | Default |
|
||||
| -------- | --------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------- |
|
||||
| hidden | <code>optional</code> | boolean | Wait for the selected element to not be found in the DOM or to be hidden, i.e. have <code>display: none</code> or <code>visibility: hidden</code> CSS properties. | <code>false</code> |
|
||||
| timeout | <code>optional</code> | number | <p>Maximum time to wait in milliseconds. Pass <code>0</code> to disable timeout.</p><p>The default value can be changed by using [Page.setDefaultTimeout()](./puppeteer.page.setdefaulttimeout.md)</p> | <code>30_000</code> (30 seconds) |
|
||||
| visible | <code>optional</code> | boolean | Wait for the selected element to be present in DOM and to be visible, i.e. to not have <code>display: none</code> or <code>visibility: hidden</code> CSS properties. | <code>false</code> |
|
||||
|
@ -12,6 +12,6 @@ export interface WaitForTargetOptions
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Modifiers | Type | Description | Default |
|
||||
| -------- | --------------------- | ------ | ------------------------------------------------------------------------------ | ----------- |
|
||||
| timeout | <code>optional</code> | number | Maximum wait time in milliseconds. Pass <code>0</code> to disable the timeout. | 30 seconds. |
|
||||
| Property | Modifiers | Type | Description | Default |
|
||||
| -------- | --------------------- | ------ | ------------------------------------------------------------------------------ | ------------------- |
|
||||
| timeout | <code>optional</code> | number | Maximum wait time in milliseconds. Pass <code>0</code> to disable the timeout. | <code>30_000</code> |
|
||||
|
@ -44,7 +44,7 @@ export interface Options {
|
||||
/**
|
||||
* Determines which platform the browser will be suited for.
|
||||
*
|
||||
* @defaultValue Auto-detected.
|
||||
* @defaultValue **Auto-detected.**
|
||||
*/
|
||||
platform?: BrowserPlatform;
|
||||
/**
|
||||
|
@ -44,7 +44,7 @@ export interface Options {
|
||||
/**
|
||||
* Determines which platform the browser will be suited for.
|
||||
*
|
||||
* @defaultValue Auto-detected.
|
||||
* @defaultValue **Auto-detected.**
|
||||
*/
|
||||
platform?: BrowserPlatform;
|
||||
/**
|
||||
@ -83,7 +83,7 @@ export interface SystemOptions {
|
||||
/**
|
||||
* Determines which platform the browser will be suited for.
|
||||
*
|
||||
* @defaultValue Auto-detected.
|
||||
* @defaultValue **Auto-detected.**
|
||||
*/
|
||||
platform?: BrowserPlatform;
|
||||
/**
|
||||
|
@ -119,7 +119,7 @@ export type Permission =
|
||||
export interface WaitForTargetOptions {
|
||||
/**
|
||||
* Maximum wait time in milliseconds. Pass `0` to disable the timeout.
|
||||
* @defaultValue 30 seconds.
|
||||
* @defaultValue `30_000`
|
||||
*/
|
||||
timeout?: number;
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ export interface ClickOptions {
|
||||
/**
|
||||
* Time to wait between `mousedown` and `mouseup` in milliseconds.
|
||||
*
|
||||
* @defaultValue 0
|
||||
* @defaultValue `0`
|
||||
*/
|
||||
delay?: number;
|
||||
/**
|
||||
@ -88,7 +88,7 @@ export interface ClickOptions {
|
||||
*/
|
||||
button?: MouseButton;
|
||||
/**
|
||||
* @defaultValue 1
|
||||
* @defaultValue `1`
|
||||
*/
|
||||
clickCount?: number;
|
||||
/**
|
||||
|
@ -153,7 +153,7 @@ export interface ScreenshotClip {
|
||||
width: number;
|
||||
height: number;
|
||||
/**
|
||||
* @defaultValue 1
|
||||
* @defaultValue `1`
|
||||
*/
|
||||
scale?: number;
|
||||
}
|
||||
@ -2090,7 +2090,7 @@ export class Page extends EventEmitter {
|
||||
* Toggles ignoring cache for each request based on the enabled state. By
|
||||
* default, caching is enabled.
|
||||
* @param enabled - sets the `enabled` state of cache
|
||||
* @defaultValue true
|
||||
* @defaultValue `true`
|
||||
*/
|
||||
async setCacheEnabled(enabled?: boolean): Promise<void>;
|
||||
async setCacheEnabled(): Promise<void> {
|
||||
|
@ -99,7 +99,7 @@ export interface SerializedAXNode {
|
||||
export interface SnapshotOptions {
|
||||
/**
|
||||
* Prune uninteresting nodes from the tree.
|
||||
* @defaultValue true
|
||||
* @defaultValue `true`
|
||||
*/
|
||||
interestingOnly?: boolean;
|
||||
/**
|
||||
|
@ -34,7 +34,7 @@ import {debugError} from './util.js';
|
||||
export interface BrowserConnectOptions {
|
||||
/**
|
||||
* Whether to ignore HTTPS errors during navigation.
|
||||
* @defaultValue false
|
||||
* @defaultValue `false`
|
||||
*/
|
||||
ignoreHTTPSErrors?: boolean;
|
||||
/**
|
||||
@ -62,7 +62,7 @@ export interface BrowserConnectOptions {
|
||||
/**
|
||||
* Timeout setting for individual protocol (CDP) calls.
|
||||
*
|
||||
* @defaultValue 180000
|
||||
* @defaultValue `180_000`
|
||||
*/
|
||||
protocolTimeout?: number;
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ export interface Configuration {
|
||||
*
|
||||
* Can be overridden by `PUPPETEER_EXECUTABLE_PATH`.
|
||||
*
|
||||
* @defaultValue Auto-computed.
|
||||
* @defaultValue **Auto-computed.**
|
||||
*/
|
||||
executablePath?: string;
|
||||
/**
|
||||
@ -103,7 +103,7 @@ export interface Configuration {
|
||||
*
|
||||
* Can be overridden by `PUPPETEER_PRODUCT`.
|
||||
*
|
||||
* @defaultValue `'chrome'`
|
||||
* @defaultValue `chrome`
|
||||
*/
|
||||
defaultProduct?: Product;
|
||||
/**
|
||||
|
@ -69,7 +69,7 @@ export interface WaitForSelectorOptions {
|
||||
*
|
||||
* The default value can be changed by using {@link Page.setDefaultTimeout}
|
||||
*
|
||||
* @defaultValue `30000` (30 seconds)
|
||||
* @defaultValue `30_000` (30 seconds)
|
||||
*/
|
||||
timeout?: number;
|
||||
}
|
||||
|
@ -83,12 +83,12 @@ export type PaperFormat =
|
||||
export interface PDFOptions {
|
||||
/**
|
||||
* Scales the rendering of the web page. Amount must be between `0.1` and `2`.
|
||||
* @defaultValue 1
|
||||
* @defaultValue `1`
|
||||
*/
|
||||
scale?: number;
|
||||
/**
|
||||
* Whether to show the header and footer.
|
||||
* @defaultValue false
|
||||
* @defaultValue `false`
|
||||
*/
|
||||
displayHeaderFooter?: boolean;
|
||||
/**
|
||||
@ -113,12 +113,12 @@ export interface PDFOptions {
|
||||
footerTemplate?: string;
|
||||
/**
|
||||
* Set to `true` to print background graphics.
|
||||
* @defaultValue false
|
||||
* @defaultValue `false`
|
||||
*/
|
||||
printBackground?: boolean;
|
||||
/**
|
||||
* Whether to print in landscape orientation.
|
||||
* @defaultValue = false
|
||||
* @defaultValue `false`
|
||||
*/
|
||||
landscape?: boolean;
|
||||
/**
|
||||
@ -148,7 +148,7 @@ export interface PDFOptions {
|
||||
preferCSSPageSize?: boolean;
|
||||
/**
|
||||
* Set the PDF margins.
|
||||
* @defaultValue no margins are set.
|
||||
* @defaultValue `undefined` no margins are set.
|
||||
*/
|
||||
margin?: PDFMargin;
|
||||
/**
|
||||
@ -158,17 +158,17 @@ export interface PDFOptions {
|
||||
*
|
||||
* If the path is relative, it's resolved relative to the current working directory.
|
||||
*
|
||||
* @defaultValue the empty string, which means the PDF will not be written to disk.
|
||||
* @defaultValue `undefined`, which means the PDF will not be written to disk.
|
||||
*/
|
||||
path?: string;
|
||||
/**
|
||||
* Hides default white background and allows generating pdfs with transparency.
|
||||
* @defaultValue false
|
||||
* @defaultValue `false`
|
||||
*/
|
||||
omitBackground?: boolean;
|
||||
/**
|
||||
* Timeout in milliseconds. Pass `0` to disable timeout.
|
||||
* @defaultValue 30000
|
||||
* @defaultValue `30_000`
|
||||
*/
|
||||
timeout?: number;
|
||||
}
|
||||
|
@ -34,22 +34,22 @@ export interface Viewport {
|
||||
* @remarks
|
||||
* Setting this value to `0` will set the deviceScaleFactor to the system default.
|
||||
*
|
||||
* @defaultValue 1
|
||||
* @defaultValue `1`
|
||||
*/
|
||||
deviceScaleFactor?: number;
|
||||
/**
|
||||
* Whether the `meta viewport` tag is taken into account.
|
||||
* @defaultValue false
|
||||
* @defaultValue `false`
|
||||
*/
|
||||
isMobile?: boolean;
|
||||
/**
|
||||
* Specifies if the viewport is in landscape mode.
|
||||
* @defaultValue false
|
||||
* @defaultValue `false`
|
||||
*/
|
||||
isLandscape?: boolean;
|
||||
/**
|
||||
* Specify if the viewport supports touch events.
|
||||
* @defaultValue false
|
||||
* @defaultValue `false`
|
||||
*/
|
||||
hasTouch?: boolean;
|
||||
}
|
||||
|
@ -143,13 +143,13 @@ export interface BrowserFetcherOptions {
|
||||
/**
|
||||
* Determines which platform the browser will be suited for.
|
||||
*
|
||||
* @defaultValue Auto-detected.
|
||||
* @defaultValue **Auto-detected.**
|
||||
*/
|
||||
platform?: Platform;
|
||||
/**
|
||||
* Determines which product the {@link BrowserFetcher} is for.
|
||||
*
|
||||
* @defaultValue `"chrome"`.
|
||||
* @defaultValue `chrome`
|
||||
*/
|
||||
product?: 'chrome' | 'firefox';
|
||||
/**
|
||||
|
@ -25,7 +25,7 @@ import {Product} from '../common/Product.js';
|
||||
export interface BrowserLaunchArgumentOptions {
|
||||
/**
|
||||
* Whether to run the browser in headless mode.
|
||||
* @defaultValue true
|
||||
* @defaultValue `true`
|
||||
*/
|
||||
headless?: boolean | 'new';
|
||||
/**
|
||||
@ -77,7 +77,7 @@ export interface LaunchOptions {
|
||||
* If `true`, do not use `puppeteer.defaultArgs()` when creating a browser. If
|
||||
* an array is provided, these args will be filtered out. Use this with care -
|
||||
* you probably want the default arguments Puppeteer uses.
|
||||
* @defaultValue false
|
||||
* @defaultValue `false`
|
||||
*/
|
||||
ignoreDefaultArgs?: boolean | string[];
|
||||
/**
|
||||
@ -98,13 +98,13 @@ export interface LaunchOptions {
|
||||
/**
|
||||
* Maximum time in milliseconds to wait for the browser to start.
|
||||
* Pass `0` to disable the timeout.
|
||||
* @defaultValue 30000 (30 seconds).
|
||||
* @defaultValue `30_000` (30 seconds).
|
||||
*/
|
||||
timeout?: number;
|
||||
/**
|
||||
* If true, pipes the browser process stdout and stderr to `process.stdout`
|
||||
* and `process.stderr`.
|
||||
* @defaultValue false
|
||||
* @defaultValue `false`
|
||||
*/
|
||||
dumpio?: boolean;
|
||||
/**
|
||||
@ -114,7 +114,7 @@ export interface LaunchOptions {
|
||||
env?: Record<string, string | undefined>;
|
||||
/**
|
||||
* Connect to a browser over a pipe instead of a WebSocket.
|
||||
* @defaultValue false
|
||||
* @defaultValue `false`
|
||||
*/
|
||||
pipe?: boolean;
|
||||
/**
|
||||
@ -129,7 +129,7 @@ export interface LaunchOptions {
|
||||
/**
|
||||
* Whether to wait for the initial page to be ready.
|
||||
* Useful when a user explicitly disables that (e.g. `--no-startup-window` for Chrome).
|
||||
* @defaultValue true
|
||||
* @defaultValue `true`
|
||||
*/
|
||||
waitForInitialPage?: boolean;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user