mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
parent
8e1c8b9be6
commit
32400954c5
19
docs/api/puppeteer.page.getdefaulttimeout.md
Normal file
19
docs/api/puppeteer.page.getdefaulttimeout.md
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
---
|
||||||
|
sidebar_label: Page.getDefaultTimeout
|
||||||
|
---
|
||||||
|
|
||||||
|
# Page.getDefaultTimeout() method
|
||||||
|
|
||||||
|
**Signature:**
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
class Page {
|
||||||
|
getDefaultTimeout(): number;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Returns:**
|
||||||
|
|
||||||
|
number
|
||||||
|
|
||||||
|
Maximum time in milliseconds.
|
@ -108,6 +108,7 @@ page.off('request', logRequest);
|
|||||||
| [exposeFunction(name, pptrFunction)](./puppeteer.page.exposefunction.md) | | <p>The method adds a function called <code>name</code> on the page's <code>window</code> object. When called, the function executes <code>puppeteerFunction</code> in node.js and returns a <code>Promise</code> which resolves to the return value of <code>puppeteerFunction</code>.</p><p>If the puppeteerFunction returns a <code>Promise</code>, it will be awaited.</p><p>:::note</p><p>Functions installed via <code>page.exposeFunction</code> survive navigations.</p><p>:::note</p> |
|
| [exposeFunction(name, pptrFunction)](./puppeteer.page.exposefunction.md) | | <p>The method adds a function called <code>name</code> on the page's <code>window</code> object. When called, the function executes <code>puppeteerFunction</code> in node.js and returns a <code>Promise</code> which resolves to the return value of <code>puppeteerFunction</code>.</p><p>If the puppeteerFunction returns a <code>Promise</code>, it will be awaited.</p><p>:::note</p><p>Functions installed via <code>page.exposeFunction</code> survive navigations.</p><p>:::note</p> |
|
||||||
| [focus(selector)](./puppeteer.page.focus.md) | | This method fetches an element with <code>selector</code> and focuses it. If there's no element matching <code>selector</code>, the method throws an error. |
|
| [focus(selector)](./puppeteer.page.focus.md) | | This method fetches an element with <code>selector</code> and focuses it. If there's no element matching <code>selector</code>, the method throws an error. |
|
||||||
| [frames()](./puppeteer.page.frames.md) | | |
|
| [frames()](./puppeteer.page.frames.md) | | |
|
||||||
|
| [getDefaultTimeout()](./puppeteer.page.getdefaulttimeout.md) | | |
|
||||||
| [goBack(options)](./puppeteer.page.goback.md) | | This method navigate to the previous page in history. |
|
| [goBack(options)](./puppeteer.page.goback.md) | | This method navigate to the previous page in history. |
|
||||||
| [goForward(options)](./puppeteer.page.goforward.md) | | This method navigate to the next page in history. |
|
| [goForward(options)](./puppeteer.page.goforward.md) | | This method navigate to the next page in history. |
|
||||||
| [goto(url, options)](./puppeteer.page.goto.md) | | |
|
| [goto(url, options)](./puppeteer.page.goto.md) | | |
|
||||||
|
@ -1042,6 +1042,13 @@ export class Page extends EventEmitter {
|
|||||||
this.#timeoutSettings.setDefaultTimeout(timeout);
|
this.#timeoutSettings.setDefaultTimeout(timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @returns Maximum time in milliseconds.
|
||||||
|
*/
|
||||||
|
getDefaultTimeout(): number {
|
||||||
|
return this.#timeoutSettings.timeout();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Runs `document.querySelector` within the page. If no element matches the
|
* Runs `document.querySelector` within the page. If no element matches the
|
||||||
* selector, the return value resolves to `null`.
|
* selector, the return value resolves to `null`.
|
||||||
|
Loading…
Reference in New Issue
Block a user