puppeteer/next/api/index.html

69 lines
117 KiB
HTML
Raw Normal View History

<!doctype html>
<html lang="en" dir="ltr" class="docs-wrapper plugin-docs plugin-id-default docs-version-current docs-doc-page docs-doc-id-api/index" data-has-hydrated="false">
<head>
<meta charset="UTF-8">
<meta name="generator" content="Docusaurus v3.3.2">
<title data-rh="true">API Reference | Puppeteer</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://pptr.dev/next/api/"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docsearch:counter" content="3"><meta data-rh="true" property="og:title" content="API Reference | Puppeteer"><meta data-rh="true" name="description" content="Classes"><meta data-rh="true" property="og:description" content="Classes"><link data-rh="true" rel="icon" href="/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://pptr.dev/next/api/"><link data-rh="true" rel="alternate" href="https://pptr.dev/next/api/" hreflang="en"><link data-rh="true" rel="alternate" href="https://pptr.dev/next/api/" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://DVKY664LG7-dsn.algolia.net" crossorigin="anonymous"><link rel="search" type="application/opensearchdescription+xml" title="Puppeteer" href="/opensearch.xml">
<script src="/fix-location.js"></script><link rel="stylesheet" href="/assets/css/styles.67634aff.css">
<script src="/assets/js/runtime~main.9aeda1bc.js" defer="defer"></script>
<script src="/assets/js/main.8bc1a8bd.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){try{return new URLSearchParams(window.location.search).get("docusaurus-theme")}catch(t){}}()||function(){try{return localStorage.getItem("theme")}catch(t){}}();t(null!==e?e:"light")}(),function(){try{const c=new URLSearchParams(window.location.search).entries();for(var[t,e]of c)if(t.startsWith("docusaurus-data-")){var a=t.replace("docusaurus-data-","data-");document.documentElement.setAttribute(a,e)}}catch(t){}}()</script><div id="__docusaurus"><div role="region" aria-label="Skip to main content"><a class="skipToContent_gu5v" href="#__docusaurus_skipToContent_fallback">Skip to main content</a></div><nav aria-label="Main" class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Toggle navigation bar" aria-expanded="false" class="navbar__toggle clean-btn" type="button"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="https://user-images.githubusercontent.com/10379601/29446482-04f7036a-841f-11e7-9872-91d1fc2ea683.png" alt="Puppeteer Logo" class="themedComponent_mlkZ themedComponent--light_NVdE"><img src="https://user-images.githubusercontent.com/10379601/29446482-04f7036a-841f-11e7-9872-91d1fc2ea683.png" alt="Puppeteer Logo" class="themedComponent_mlkZ themedComponent--dark_xIcU"></div><b class="navbar__title text--truncate">Puppeteer</b></a><a class="navbar__item navbar__link" href="/next/category/introduction">Docs</a><a class="navbar__item navbar__link" href="/next/api/puppeteer.puppeteernode">Puppeteer API</a><a class="navbar__item navbar__link" href="/next/browsers-api/">@puppeteer/browsers API</a></div><div class="navbar__items navbar__items--right"><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a class="navbar__link" aria-haspopup="true" aria-expanded="false" role="button" href="/next/">Next</a><ul class="dropdown__menu"><li><a aria-current="page" class="dropdown__link dropdown__link--active" href="/next/api/">Next</a></li><li><a class="dropdown__link" href="/api/">22.9.0</a></li><li><hr class="dropdown-separator"></li><li class="dropdown-archived-versions"><b>Archived versions</b></li><li><a href="https://github.com/puppeteer/puppeteer/blob/puppeteer-v22.8.2/docs/api/index.md" target="_blank" rel="noopener noreferrer" class="dropdown__link">22.8.2<svg width="12" height="12" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_T11m"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li><a href="https://github.com/puppeteer/puppeteer/blob/puppeteer-v22.8.1/docs/api/index.md" target="_blank" rel="noopener noreferrer" class="dropdown__link">22.8.1<svg width="12" height="12" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_T11m"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li><a href="https://github.com/puppeteer/puppeteer/blob/puppeteer-v22.8.0/docs/api/index.md" target="_blank" rel="noopener noreferrer" class="dropdown__link">22.8.0<svg width="12" height="12" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_T11m"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li><a href="https://github.com/puppeteer/puppeteer/blob/puppeteer-v22.7.1/docs/api/index.md" target="_blank" rel="noopener noreferrer" class="dropdown__link">22.7.1<svg width="12" height="12" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_T11m"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4
<h2 class="anchor anchorWithStickyNavbar_FNw8" id="classes">Classes<a href="#classes" class="hash-link" aria-label="Direct link to Classes" title="Direct link to Classes"></a></h2>
<table><thead><tr><th><p>Class</p></th><th><p>Description</p></th></tr></thead><tbody><tr><td><span id="accessibility"><a href="/next/api/puppeteer.accessibility">Accessibility</a></span></td><td><p>The Accessibility class provides methods for inspecting the browser&#x27;s accessibility tree. The accessibility tree is used by assistive technology such as <a href="https://en.wikipedia.org/wiki/Screen_reader" target="_blank" rel="noopener noreferrer">screen readers</a> or <a href="https://en.wikipedia.org/wiki/Switch_access" target="_blank" rel="noopener noreferrer">switches</a>.</p><p><strong>Remarks:</strong></p><p>Accessibility is a very platform-specific thing. On different platforms, there are different screen readers that might have wildly different output.</p><p>Blink - Chrome&#x27;s rendering engine - has a concept of &quot;accessibility tree&quot;, which is then translated into different platform-specific APIs. Accessibility namespace gives users access to the Blink Accessibility Tree.</p><p>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 &quot;interesting&quot; nodes of the tree.</p><p>The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the <code>Accessibility</code> class.</p></td></tr><tr><td><span id="browser"><a href="/next/api/puppeteer.browser">Browser</a></span></td><td><p><a href="/next/api/puppeteer.browser">Browser</a> represents a browser instance that is either:</p><ul>
<li>connected to via <a href="/next/api/puppeteer.puppeteer.connect">Puppeteer.connect()</a> or - launched by <a href="/next/api/puppeteer.puppeteernode.launch">PuppeteerNode.launch()</a>.</li>
</ul><p><a href="/next/api/puppeteer.browser">Browser</a> <a href="/next/api/puppeteer.eventemitter.emit">emits</a> various events which are documented in the <a href="/next/api/puppeteer.browserevent">BrowserEvent</a> enum.</p><p><strong>Remarks:</strong></p><p>The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the <code>Browser</code> class.</p></td></tr><tr><td><span id="browsercontext"><a href="/next/api/puppeteer.browsercontext">BrowserContext</a></span></td><td><p><a href="/next/api/puppeteer.browsercontext">BrowserContext</a> represents individual user contexts within a <a href="/next/api/puppeteer.browser">browser</a>.</p><p>When a <a href="/next/api/puppeteer.browser">browser</a> is launched, it has a single <a href="/next/api/puppeteer.browsercontext">browser context</a> by default. Others can be created using <a href="/next/api/puppeteer.browser.createbrowsercontext">Browser.createBrowserContext()</a>. Each context has isolated storage (cookies/localStorage/etc.)</p><p><a href="/next/api/puppeteer.browsercontext">BrowserContext</a> <a href="/next/api/puppeteer.eventemitter">emits</a> various events which are documented in the <a href="/next/api/puppeteer.browsercontextevent">BrowserContextEvent</a> enum.</p><p>If a <a href="/next/api/puppeteer.page">page</a> opens another <a href="/next/api/puppeteer.page">page</a>, e.g. using <code>window.open</code>, the popup will belong to the parent <a href="/next/api/puppeteer.page.browsercontext">page&#x27;s browser context</a>.</p><p><strong>Remarks:</strong></p><p>The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the <code>BrowserContext</code> class.</p></td></tr><tr><td><span id="cdpsession"><a href="/next/api/puppeteer.cdpsession">CDPSession</a></span></td><td><p>The <code>CDPSession</code> instances are used to talk raw Chrome Devtools Protocol.</p><p><strong>Remarks:</strong></p><p>Protocol methods can be called with <a href="/next/api/puppeteer.cdpsession.send">CDPSession.send()</a> method and protocol events can be subscribed to with <code>CDPSession.on</code> method.</p><p>Useful links: <a href="https://chromedevtools.github.io/devtools-protocol/" target="_blank" rel="noopener noreferrer">DevTools Protocol Viewer</a> and <a href="https://github.com/aslushnikov/getting-started-with-cdp/blob/HEAD/README.md" target="_blank" rel="noopener noreferrer">Getting Started with DevTools Protocol</a>.</p><p>The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the <code>CDPSession</code> class.</p></td></tr><tr><td><span id="connection"><a href="/next/api/puppeteer.connection">Connection</a></span></td><td></td></tr><tr><td><span id="consolemessage"><a href="/next/api/puppeteer.consolemessage">ConsoleMessage</a></span></td><td><p>ConsoleMessage objects are dispatched by page via the &#x27;console&#x27; event.</p></td></tr><tr><td><span id="coverage"><a href="/next/api/puppeteer.coverage">Coverage</a></span></td><td><p>The Coverage class provides methods to gather information about parts of JavaScript and CSS that were used by the page.</p><p><strong>Remarks:</strong></p><p>To output coverage in a form consumable by <a href="https://github.com/istanbuljs" target="_blank" rel="noopener noreferrer">Istanbul</a>, see <a href="https://github.com/istanbuljs/puppeteer-to-istanbul" target="_blank" rel="noopener noreferrer">puppeteer-to-istanbul</a>.</p></td></tr><tr><td><span id="csscoverage"><a href="/next/api/puppeteer.csscoverage">CSSCoverage</a></span></td><td></td></tr><tr><td><span id="devicerequestprompt"><a href="/next/api/puppeteer.devicerequestprompt">DeviceRequestPrompt</a></span></td><td><p>Device request prompts let you respond to the page requesting for a device through an API like WebBluetooth.</p><p><strong>Remarks:</strong></p><p><code>DeviceRequestPrompt</code> instances are returned vi
<li><a href="/next/api/puppeteer.pageevent">PageEvent.FrameAttached</a> - <a href="/next/api/puppeteer.pageevent">PageEvent.FrameNavigated</a> - <a href="/next/api/puppeteer.pageevent">PageEvent.FrameDetached</a></li>
</ul><p>The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the <code>Frame</code> class.</p></td></tr><tr><td><span id="httprequest"><a href="/next/api/puppeteer.httprequest">HTTPRequest</a></span></td><td><p>Represents an HTTP request sent by a page.</p><p><strong>Remarks:</strong></p><p>Whenever the page sends a request, such as for a network resource, the following events are emitted by Puppeteer&#x27;s <code>page</code>:</p><ul>
<li><code>request</code>: emitted when the request is issued by the page. - <code>requestfinished</code> - emitted when the response body is downloaded and the request is complete.</li>
</ul><p>If request fails at some point, then instead of <code>requestfinished</code> event the <code>requestfailed</code> event is emitted.</p><p>All of these events provide an instance of <code>HTTPRequest</code> representing the request that occurred:</p><div class="codeBlockContainer_aalF theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_MHx8"><pre tabindex="0" class="prism-code language-text codeBlock_zHgq thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_RjmQ"><span class="token-line" style="color:#393A34"><span class="token plain">page.on(&#x27;request&#x27;, request =&gt; ...)</span><br></span></code></pre><div class="buttonGroup_Sd8_"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_LnQD" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_t3l1"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_IiZV"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>NOTE: HTTP Error responses, such as 404 or 503, are still successful responses from HTTP standpoint, so request will complete with <code>requestfinished</code> event.</p><p>If request gets a &#x27;redirect&#x27; response, the request is successfully finished with the <code>requestfinished</code> event, and a new request is issued to a redirected url.</p><p>The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the <code>HTTPRequest</code> class.</p></td></tr><tr><td><span id="httpresponse"><a href="/next/api/puppeteer.httpresponse">HTTPResponse</a></span></td><td><p>The HTTPResponse class represents responses which are received by the <a href="/next/api/puppeteer.page">Page</a> class.</p><p><strong>Remarks:</strong></p><p>The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the <code>HTTPResponse</code> class.</p></td></tr><tr><td><span id="jscoverage"><a href="/next/api/puppeteer.jscoverage">JSCoverage</a></span></td><td></td></tr><tr><td><span id="jshandle"><a href="/next/api/puppeteer.jshandle">JSHandle</a></span></td><td><p>Represents a reference to a JavaScript object. Instances can be created using <a href="/next/api/puppeteer.page.evaluatehandle">Page.evaluateHandle()</a>.</p><p>Handles prevent the referenced JavaScript object from being garbage-collected unless the handle is purposely <a href="/next/api/puppeteer.jshandle.dispose">disposed</a>. JSHandles are auto-disposed when their associated frame is navigated away or the parent context gets destroyed.</p><p>Handles can be used as arguments for any evaluation function such as <a href="/next/api/puppeteer.page._eval">Page.$eval()</a>, <a href="/next/api/puppeteer.page.evaluate">Page.evaluate()</a>, and <a href="/next/api/puppeteer.page.evaluatehandle">Page.evaluateHandle()</a>. They are resolved to their referenced object.</p><p><strong>Remarks:</strong></p><p>The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the <code>JSHandle</code> class.</p></td></tr><tr><td><span id="keyboard"><a href="/next/api/puppeteer.keyboard">Keyboard</a></span></td><td><p>Keyboard provides an api for managing a virtual keyboard. The high level api is <a href="/next/api/puppeteer.keyboard.type">Keyboard.type()</a>, which takes raw characters and generates proper keydown, keypress/input, and keyup events on your page.</p><p><strong>Remarks:</strong></p><p>For finer control, you can use <a href="/next/api/puppeteer.keyboard.down">Keyboard.down()</a>, <a href="/next/api/puppeteer.keyboard.up">Keyboard.up()</a>, and <a href="/next/
<h2 class="anchor anchorWithStickyNavbar_FNw8" id="enumerations">Enumerations<a href="#enumerations" class="hash-link" aria-label="Direct link to Enumerations" title="Direct link to Enumerations"></a></h2>
<table><thead><tr><th><p>Enumeration</p></th><th><p>Description</p></th></tr></thead><tbody><tr><td><span id="browsercontextevent"><a href="/next/api/puppeteer.browsercontextevent">BrowserContextEvent</a></span></td><td></td></tr><tr><td><span id="browserevent"><a href="/next/api/puppeteer.browserevent">BrowserEvent</a></span></td><td><p>All the events a <a href="/next/api/puppeteer.browser">browser instance</a> may emit.</p></td></tr><tr><td><span id="interceptresolutionaction"><a href="/next/api/puppeteer.interceptresolutionaction">InterceptResolutionAction</a></span></td><td></td></tr><tr><td><span id="locatorevent"><a href="/next/api/puppeteer.locatorevent">LocatorEvent</a></span></td><td><p>All the events that a locator instance may emit.</p></td></tr><tr><td><span id="pageevent"><a href="/next/api/puppeteer.pageevent">PageEvent</a></span></td><td><p>All the events that a page instance may emit.</p></td></tr><tr><td><span id="targettype"><a href="/next/api/puppeteer.targettype">TargetType</a></span></td><td></td></tr></tbody></table>
<h2 class="anchor anchorWithStickyNavbar_FNw8" id="functions">Functions<a href="#functions" class="hash-link" aria-label="Direct link to Functions" title="Direct link to Functions"></a></h2>
<table><thead><tr><th><p>Function</p></th><th><p>Description</p></th></tr></thead><tbody><tr><td><span id="clearcustomqueryhandlers"><a href="/next/api/puppeteer.clearcustomqueryhandlers">clearCustomQueryHandlers()</a></span></td><td><p><strong>Deprecated:</strong></p><p>Import <a href="/next/api/puppeteer.puppeteer">Puppeteer</a> and use the static method <a href="/next/api/puppeteer.puppeteer.clearcustomqueryhandlers">Puppeteer.clearCustomQueryHandlers()</a></p></td></tr><tr><td><span id="connect"><a href="/next/api/puppeteer.connect">connect(options)</a></span></td><td></td></tr><tr><td><span id="customqueryhandlernames"><a href="/next/api/puppeteer.customqueryhandlernames">customQueryHandlerNames()</a></span></td><td><p><strong>Deprecated:</strong></p><p>Import <a href="/next/api/puppeteer.puppeteer">Puppeteer</a> and use the static method <a href="/next/api/puppeteer.puppeteer.customqueryhandlernames">Puppeteer.customQueryHandlerNames()</a></p></td></tr><tr><td><span id="defaultargs"><a href="/next/api/puppeteer.defaultargs">defaultArgs(options)</a></span></td><td></td></tr><tr><td><span id="executablepath"><a href="/next/api/puppeteer.executablepath">executablePath(channel)</a></span></td><td></td></tr><tr><td><span id="launch"><a href="/next/api/puppeteer.launch">launch(options)</a></span></td><td></td></tr><tr><td><span id="registercustomqueryhandler"><a href="/next/api/puppeteer.registercustomqueryhandler">registerCustomQueryHandler(name, handler)</a></span></td><td><p><strong>Deprecated:</strong></p><p>Import <a href="/next/api/puppeteer.puppeteer">Puppeteer</a> and use the static method <a href="/next/api/puppeteer.puppeteer.registercustomqueryhandler">Puppeteer.registerCustomQueryHandler()</a></p></td></tr><tr><td><span id="trimcache"><a href="/next/api/puppeteer.trimcache">trimCache()</a></span></td><td></td></tr><tr><td><span id="unregistercustomqueryhandler"><a href="/next/api/puppeteer.unregistercustomqueryhandler">unregisterCustomQueryHandler(name)</a></span></td><td><p><strong>Deprecated:</strong></p><p>Import <a href="/next/api/puppeteer.puppeteer">Puppeteer</a> and use the static method <a href="/next/api/puppeteer.puppeteer.unregistercustomqueryhandler">Puppeteer.unregisterCustomQueryHandler()</a></p></td></tr></tbody></table>
<h2 class="anchor anchorWithStickyNavbar_FNw8" id="interfaces">Interfaces<a href="#interfaces" class="hash-link" aria-label="Direct link to Interfaces" title="Direct link to Interfaces"></a></h2>
<table><thead><tr><th><p>Interface</p></th><th><p>Description</p></th></tr></thead><tbody><tr><td><span id="actionoptions"><a href="/next/api/puppeteer.actionoptions">ActionOptions</a></span></td><td></td></tr><tr><td><span id="autofilldata"><a href="/next/api/puppeteer.autofilldata">AutofillData</a></span></td><td></td></tr><tr><td><span id="boundingbox"><a href="/next/api/puppeteer.boundingbox">BoundingBox</a></span></td><td></td></tr><tr><td><span id="boxmodel"><a href="/next/api/puppeteer.boxmodel">BoxModel</a></span></td><td></td></tr><tr><td><span id="browserconnectoptions"><a href="/next/api/puppeteer.browserconnectoptions">BrowserConnectOptions</a></span></td><td><p>Generic browser options that can be passed when launching any browser or when connecting to an existing browser instance.</p></td></tr><tr><td><span id="browsercontextevents"><a href="/next/api/puppeteer.browsercontextevents">BrowserContextEvents</a></span></td><td></td></tr><tr><td><span id="browsercontextoptions"><a href="/next/api/puppeteer.browsercontextoptions">BrowserContextOptions</a></span></td><td></td></tr><tr><td><span id="browserevents"><a href="/next/api/puppeteer.browserevents">BrowserEvents</a></span></td><td></td></tr><tr><td><span id="browserlaunchargumentoptions"><a href="/next/api/puppeteer.browserlaunchargumentoptions">BrowserLaunchArgumentOptions</a></span></td><td><p>Launcher options that only apply to Chrome.</p></td></tr><tr><td><span id="cdpsessionevents"><a href="/next/api/puppeteer.cdpsessionevents">CDPSessionEvents</a></span></td><td></td></tr><tr><td><span id="clickoptions"><a href="/next/api/puppeteer.clickoptions">ClickOptions</a></span></td><td></td></tr><tr><td><span id="commandoptions"><a href="/next/api/puppeteer.commandoptions">CommandOptions</a></span></td><td></td></tr><tr><td><span id="commoneventemitter"><a href="/next/api/puppeteer.commoneventemitter">CommonEventEmitter</a></span></td><td></td></tr><tr><td><span id="configuration"><a href="/next/api/puppeteer.configuration">Configuration</a></span></td><td><p>Defines options to configure Puppeteer&#x27;s behavior during installation and runtime.</p><p>See individual properties for more information.</p></td></tr><tr><td><span id="connectiontransport"><a href="/next/api/puppeteer.connectiontransport">ConnectionTransport</a></span></td><td></td></tr><tr><td><span id="connectoptions"><a href="/next/api/puppeteer.connectoptions">ConnectOptions</a></span></td><td></td></tr><tr><td><span id="consolemessagelocation"><a href="/next/api/puppeteer.consolemessagelocation">ConsoleMessageLocation</a></span></td><td></td></tr><tr><td><span id="continuerequestoverrides"><a href="/next/api/puppeteer.continuerequestoverrides">ContinueRequestOverrides</a></span></td><td></td></tr><tr><td><span id="cookie"><a href="/next/api/puppeteer.cookie">Cookie</a></span></td><td><p>Represents a cookie object.</p></td></tr><tr><td><span id="cookieparam"><a href="/next/api/puppeteer.cookieparam">CookieParam</a></span></td><td><p>Cookie parameter object</p></td></tr><tr><td><span id="coverageentry"><a href="/next/api/puppeteer.coverageentry">CoverageEntry</a></span></td><td><p>The CoverageEntry class represents one entry of the coverage report.</p></td></tr><tr><td><span id="credentials"><a href="/next/api/puppeteer.credentials">Credentials</a></span></td><td></td></tr><tr><td><span id="csscoverageoptions"><a href="/next/api/puppeteer.csscoverageoptions">CSSCoverageOptions</a></span></td><td><p>Set of configurable options for CSS coverage.</p></td></tr><tr><td><span id="customqueryhandler"><a href="/next/api/puppeteer.customqueryhandler">CustomQueryHandler</a></span></td><td></td></tr><tr><td><span id="debuginfo"><a href="/next/api/puppeteer.debuginfo">DebugInfo</a></span></td><td><p><strong><em>(Experimental)</em></strong></p></td></tr><tr><td><span id="deletecookiesrequest"><a href="/next/api/puppeteer.deletecookiesrequest">DeleteCookiesRequest</a></span></td><td></td></tr><tr><td><span id="device"><a href="/next/api/puppeteer.device">Device</a></span></td><td></td></tr><tr><td><span id="ele
<h2 class="anchor anchorWithStickyNavbar_FNw8" id="namespaces">Namespaces<a href="#namespaces" class="hash-link" aria-label="Direct link to Namespaces" title="Direct link to Namespaces"></a></h2>
<table><thead><tr><th><p>Namespace</p></th><th><p>Description</p></th></tr></thead><tbody><tr><td><span id="cdpsessionevent"><a href="/next/api/puppeteer.cdpsessionevent">CDPSessionEvent</a></span></td><td><p>Events that the CDPSession class emits.</p></td></tr></tbody></table>
<h2 class="anchor anchorWithStickyNavbar_FNw8" id="variables">Variables<a href="#variables" class="hash-link" aria-label="Direct link to Variables" title="Direct link to Variables"></a></h2>
<table><thead><tr><th><p>Variable</p></th><th><p>Description</p></th></tr></thead><tbody><tr><td><span id="default_intercept_resolution_priority"><a href="/next/api/puppeteer.default_intercept_resolution_priority">DEFAULT_INTERCEPT_RESOLUTION_PRIORITY</a></span></td><td><p>The default cooperative request interception resolution priority</p></td></tr><tr><td><span id="knowndevices"><a href="/next/api/puppeteer.knowndevices">KnownDevices</a></span></td><td><p>A list of devices to be used with <a href="/next/api/puppeteer.page.emulate">Page.emulate()</a>.</p></td></tr><tr><td><span id="mousebutton"><a href="/next/api/puppeteer.mousebutton">MouseButton</a></span></td><td><p>Enum of valid mouse buttons.</p></td></tr><tr><td><span id="predefinednetworkconditions"><a href="/next/api/puppeteer.predefinednetworkconditions">PredefinedNetworkConditions</a></span></td><td><p>A list of network conditions to be used with <a href="/next/api/puppeteer.page.emulatenetworkconditions">Page.emulateNetworkConditions()</a>.</p></td></tr><tr><td><span id="puppeteer"><a href="/next/api/puppeteer.puppeteer">puppeteer</a></span></td><td></td></tr></tbody></table>
<h2 class="anchor anchorWithStickyNavbar_FNw8" id="type-aliases">Type Aliases<a href="#type-aliases" class="hash-link" aria-label="Direct link to Type Aliases" title="Direct link to Type Aliases"></a></h2>
<table><thead><tr><th><p>Type Alias</p></th><th><p>Description</p></th></tr></thead><tbody><tr><td><span id="actionresult"><a href="/next/api/puppeteer.actionresult">ActionResult</a></span></td><td></td></tr><tr><td><span id="awaitable"><a href="/next/api/puppeteer.awaitable">Awaitable</a></span></td><td></td></tr><tr><td><span id="awaitableiterable"><a href="/next/api/puppeteer.awaitableiterable">AwaitableIterable</a></span></td><td></td></tr><tr><td><span id="awaitablepredicate"><a href="/next/api/puppeteer.awaitablepredicate">AwaitablePredicate</a></span></td><td></td></tr><tr><td><span id="awaitedlocator"><a href="/next/api/puppeteer.awaitedlocator">AwaitedLocator</a></span></td><td></td></tr><tr><td><span id="cdpevents"><a href="/next/api/puppeteer.cdpevents">CDPEvents</a></span></td><td></td></tr><tr><td><span id="chromereleasechannel"><a href="/next/api/puppeteer.chromereleasechannel">ChromeReleaseChannel</a></span></td><td></td></tr><tr><td><span id="consolemessagetype"><a href="/next/api/puppeteer.consolemessagetype">ConsoleMessageType</a></span></td><td><p>The supported types for console messages.</p></td></tr><tr><td><span id="cookiepriority"><a href="/next/api/puppeteer.cookiepriority">CookiePriority</a></span></td><td><p>Represents the cookie&#x27;s &#x27;Priority&#x27; status: <a href="https://tools.ietf.org/html/draft-west-cookie-priority-00" target="_blank" rel="noopener noreferrer">https://tools.ietf.org/html/draft-west-cookie-priority-00</a></p></td></tr><tr><td><span id="cookiesamesite"><a href="/next/api/puppeteer.cookiesamesite">CookieSameSite</a></span></td><td><p>Represents the cookie&#x27;s &#x27;SameSite&#x27; status: <a href="https://tools.ietf.org/html/draft-west-first-party-cookies" target="_blank" rel="noopener noreferrer">https://tools.ietf.org/html/draft-west-first-party-cookies</a></p></td></tr><tr><td><span id="cookiesourcescheme"><a href="/next/api/puppeteer.cookiesourcescheme">CookieSourceScheme</a></span></td><td><p>Represents the source scheme of the origin that originally set the cookie. A value of &quot;Unset&quot; allows protocol clients to emulate legacy cookie scope for the scheme. This is a temporary ability and it will be removed in the future.</p></td></tr><tr><td><span id="elementfor"><a href="/next/api/puppeteer.elementfor">ElementFor</a></span></td><td></td></tr><tr><td><span id="errorcode"><a href="/next/api/puppeteer.errorcode">ErrorCode</a></span></td><td></td></tr><tr><td><span id="evaluatefunc"><a href="/next/api/puppeteer.evaluatefunc">EvaluateFunc</a></span></td><td></td></tr><tr><td><span id="evaluatefuncwith"><a href="/next/api/puppeteer.evaluatefuncwith">EvaluateFuncWith</a></span></td><td></td></tr><tr><td><span id="eventswithwildcard"><a href="/next/api/puppeteer.eventswithwildcard">EventsWithWildcard</a></span></td><td></td></tr><tr><td><span id="eventtype"><a href="/next/api/puppeteer.eventtype">EventType</a></span></td><td></td></tr><tr><td><span id="experimentsconfiguration"><a href="/next/api/puppeteer.experimentsconfiguration">ExperimentsConfiguration</a></span></td><td><p>Defines experiment options for Puppeteer.</p><p>See individual properties for more information.</p></td></tr><tr><td><span id="flattenhandle"><a href="/next/api/puppeteer.flattenhandle">FlattenHandle</a></span></td><td></td></tr><tr><td><span id="handlefor"><a href="/next/api/puppeteer.handlefor">HandleFor</a></span></td><td></td></tr><tr><td><span id="handleor"><a href="/next/api/puppeteer.handleor">HandleOr</a></span></td><td></td></tr><tr><td><span id="handler"><a href="/next/api/puppeteer.handler">Handler</a></span></td><td></td></tr><tr><td><span id="innerparams"><a href="/next/api/puppeteer.innerparams">InnerParams</a></span></td><td></td></tr><tr><td><span id="keyinput"><a href="/next/api/puppeteer.keyinput">KeyInput</a></span></td><td><p>All the valid keys that can be passed to functions that take user input, such as <a href="/next/api/puppeteer.keyboard.press">keyboard.press</a></p></td></tr><tr><td><span id="keypressoptions"><a href="/next/api/puppeteer.keypressoptions">KeyPre
<li>
<p><code>Letter</code>: 8.5in x 11in</p>
</li>
<li>
<p><code>Legal</code>: 8.5in x 14in</p>
</li>
<li>
<p><code>Tabloid</code>: 11in x 17in</p>
</li>
<li>
<p><code>Ledger</code>: 17in x 11in</p>
</li>
<li>
<p><code>A0</code>: 33.1in x 46.8in</p>
</li>
<li>
<p><code>A1</code>: 23.4in x 33.1in</p>
</li>
<li>
<p><code>A2</code>: 16.54in x 23.4in</p>
</li>
<li>
<p><code>A3</code>: 11.7in x 16.54in</p>
</li>
<li>
<p><code>A4</code>: 8.27in x 11.7in</p>
</li>
<li>
<p><code>A5</code>: 5.83in x 8.27in</p>
</li>
<li>
<p><code>A6</code>: 4.13in x 5.83in</p>
</li>
</ul></td></tr><tr><td><span id="permission"><a href="/next/api/puppeteer.permission">Permission</a></span></td><td></td></tr><tr><td><span id="predicate"><a href="/next/api/puppeteer.predicate">Predicate</a></span></td><td></td></tr><tr><td><span id="product"><a href="/next/api/puppeteer.product">Product</a></span></td><td><p>Supported products.</p></td></tr><tr><td><span id="protocollifecycleevent"><a href="/next/api/puppeteer.protocollifecycleevent">ProtocolLifeCycleEvent</a></span></td><td></td></tr><tr><td><span id="protocoltype"><a href="/next/api/puppeteer.protocoltype">ProtocolType</a></span></td><td></td></tr><tr><td><span id="puppeteerlifecycleevent"><a href="/next/api/puppeteer.puppeteerlifecycleevent">PuppeteerLifeCycleEvent</a></span></td><td></td></tr><tr><td><span id="puppeteernodelaunchoptions"><a href="/next/api/puppeteer.puppeteernodelaunchoptions">PuppeteerNodeLaunchOptions</a></span></td><td><p>Utility type exposed to enable users to define options that can be passed to <code>puppeteer.launch</code> without having to list the set of all types.</p></td></tr><tr><td><span id="quad"><a href="/next/api/puppeteer.quad">Quad</a></span></td><td></td></tr><tr><td><span id="resourcetype"><a href="/next/api/puppeteer.resourcetype">ResourceType</a></span></td><td><p>Resource types for HTTPRequests as perceived by the rendering engine.</p></td></tr><tr><td><span id="targetfiltercallback"><a href="/next/api/puppeteer.targetfiltercallback">TargetFilterCallback</a></span></td><td></td></tr><tr><td><span id="visibilityoption"><a href="/next/api/puppeteer.visibilityoption">VisibilityOption</a></span></td><td></td></tr></tbody></table></div></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages"></nav></div></div><div class="col col--3"><div class="tableOfContents_IS5x thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#classes" class="table-of-contents__link toc-highlight">Classes</a></li><li><a href="#enumerations" class="table-of-contents__link toc-highlight">Enumerations</a></li><li><a href="#functions" class="table-of-contents__link toc-highlight">Functions</a></li><li><a href="#interfaces" class="table-of-contents__link toc-highlight">Interfaces</a></li><li><a href="#namespaces" class="table-of-contents__link toc-highlight">Namespaces</a></li><li><a href="#variables" class="table-of-contents__link toc-highlight">Variables</a></li><li><a href="#type-aliases" class="table-of-contents__link toc-highlight">Type Aliases</a></li></ul></div></div></div></div></main></div></div></div><footer class="footer footer--dark"><div class="container container-fluid"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://stackoverflow.com/questions/tagged/puppeteer" target="_blank" rel="noopener noreferrer" class="footer__link-item">Stack Overflow<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_T11m"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://twitter.com/chromedevtools" target="_blank" rel="noopener noreferrer" class="footer__link-item">Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_T11m"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://goo.gle/devtools-youtube" target="_blank" rel="noopener noreferrer" class="footer__link-item">YouTube<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_T11m"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div></div><
</body>
</html>