<titledata-rh="true">@puppeteer/browsers | Puppeteer</title><metadata-rh="true"name="viewport"content="width=device-width,initial-scale=1"><metadata-rh="true"name="twitter:card"content="summary_large_image"><metadata-rh="true"property="og:url"content="https://pptr.dev/browsers-api/"><metadata-rh="true"property="og:locale"content="en"><metadata-rh="true"name="docsearch:language"content="en"><metadata-rh="true"name="docsearch:counter"content="2"><metadata-rh="true"property="og:title"content="@puppeteer/browsers | Puppeteer"><metadata-rh="true"name="description"content="Manage and launch browsers/drivers from a CLI or programmatically."><metadata-rh="true"property="og:description"content="Manage and launch browsers/drivers from a CLI or programmatically."><linkdata-rh="true"rel="icon"href="/img/favicon.ico"><linkdata-rh="true"rel="canonical"href="https://pptr.dev/browsers-api/"><linkdata-rh="true"rel="alternate"href="https://pptr.dev/browsers-api/"hreflang="en"><linkdata-rh="true"rel="alternate"href="https://pptr.dev/browsers-api/"hreflang="x-default"><linkdata-rh="true"rel="preconnect"href="https://DVKY664LG7-dsn.algolia.net"crossorigin="anonymous"><linkrel="search"type="application/opensearchdescription+xml"title="Puppeteer"href="/opensearch.xml">
<h2class="anchor anchorWithStickyNavbar_FNw8"id="cli">CLI<ahref="#cli"class="hash-link"aria-label="Direct link to CLI"title="Direct link to CLI"></a></h2>
<divclass="language-sh codeBlockContainer_aalF theme-code-block"style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><divclass="codeBlockContent_MHx8"><pretabindex="0"class="prism-code language-sh codeBlock_zHgq thin-scrollbar"style="color:#393A34;background-color:#f6f8fa"><codeclass="codeBlockLines_RjmQ"><spanclass="token-line"style="color:#393A34"><spanclass="token comment"style="color:#999988;font-style:italic"># Download the latest available Chrome for Testing binary corresponding to the Stable channel.</span><spanclass="token plain"></span><br></span><spanclass="token-line"style="color:#393A34"><spanclass="token plain">npx @puppeteer/browsers </span><spanclass="token function"style="color:#d73a49">install</span><spanclass="token plain"> chrome@stable</span><br></span><spanclass="token-line"style="color:#393A34"><spanclass="token plain"style="display:inline-block"></span><br></span><spanclass="token-line"style="color:#393A34"><spanclass="token plain"></span><spanclass="token comment"style="color:#999988;font-style:italic"># Download a specific Chrome for Testing version.</span><spanclass="token plain"></span><br></span><spanclass="token-line"style="color:#393A34"><spanclass="token plain">npx @puppeteer/browsers </span><spanclass="token function"style="color:#d73a49">install</span><spanclass="token plain"> chrome@116.0.5793.0</span><br></span><spanclass="token-line"style="color:#393A34"><spanclass="token plain"style="display:inline-block"></span><br></span><spanclass="token-line"style="color:#393A34"><spanclass="token plain"></span><spanclass="token comment"style="color:#999988;font-style:italic"># Download the latest Chrome for Testing version for the given milestone.</span><spanclass="token plain"></span><br></span><spanclass="token-line"style="color:#393A34"><spanclass="token plain">npx @puppeteer/browsers </span><spanclass="token function"style="color:#d73a49">install</span><spanclass="token plain"> chrome@117</span><br></span><spanclass="token-line"style="color:#393A34"><spanclass="token plain"style="display:inline-block"></span><br></span><spanclass="token-line"style="color:#393A34"><spanclass="token plain"></span><spanclass="token comment"style="color:#999988;font-style:italic"># Download the latest available ChromeDriver version corresponding to the Canary channel.</span><spanclass="token plain"></span><br></span><spanclass="token-line"style="color:#393A34"><spanclass="token plain">npx @puppeteer/browsers </span><spanclass="token function"style="color:#d73a49">install</span><spanclass="token plain"> chromedriver@canary</span><br></span><spanclass="token-line"style="color:#393A34"><spanclass="token plain"style="display:inline-block"></span><br></span><spanclass="token-line"style="color:#393A34"><spanclass="token plain"></span><spanclass="token comment"style="color:#999988;font-style:italic"># Download a specific ChromeDriver version.</span><spanclass="token plain"></span><br></span><spanclass="token-line"style="color:#393A34"><spanclass="token plain">npx @puppeteer/browsers </span><spanclass="token function"style="color:#d73a49">install</span><spanclass="token plain"> chromedriver@116.0.5793.0</span><br></span></code></pre><divclass="buttonGroup_Sd8_"><buttontype="button"aria-label="Copy code to clipboard"title="Copy"class="clean-btn"><spanclass="copyButtonIcons_LnQD"aria-hidden="true"><svgviewBox="0 0 24 24"class="copyButtonIcon_t3l1"><pathfill="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><svgviewBox="0 0 24 24"class="copyButtonSuccessIcon_IiZV"><pathfill="currentColor"d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div>
<h2class="anchor anchorWithStickyNavbar_FNw8"id="known-limitations">Known limitations<ahref="#known-limitations"class="hash-link"aria-label="Direct link to Known limitations"title="Direct link to Known limitations"></a></h2>
<h2class="anchor anchorWithStickyNavbar_FNw8"id="api">API<ahref="#api"class="hash-link"aria-label="Direct link to API"title="Direct link to API"></a></h2>
<p>The programmatic API allows installing and launching browsers from your code. See the <code>test</code> folder for examples on how to use the <code>install</code>, <code>canInstall</code>, <code>launch</code>, <code>computeExecutablePath</code>, <code>computeSystemExecutablePath</code> and other methods.</p>
<h2class="anchor anchorWithStickyNavbar_FNw8"id="classes">Classes<ahref="#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><spanid="cli"><ahref="/browsers-api/browsers.cli">CLI</a></span></td><td></td></tr><tr><td><spanid="installedbrowser"><ahref="/browsers-api/browsers.installedbrowser">InstalledBrowser</a></span></td><td><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>InstalledBrowser</code> class.</p></td></tr><tr><td><spanid="process"><ahref="/browsers-api/browsers.process">Process</a></span></td><td></td></tr><tr><td><spanid="timeouterror"><ahref="/browsers-api/browsers.timeouterror">TimeoutError</a></span></td><td><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>TimeoutError</code> class.</p></td></tr></tbody></table>
<h2class="anchor anchorWithStickyNavbar_FNw8"id="enumerations">Enumerations<ahref="#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><spanid="browser"><ahref="/browsers-api/browsers.browser">Browser</a></span></td><td><p>Supported browsers.</p></td></tr><tr><td><spanid="browserplatform"><ahref="/browsers-api/browsers.browserplatform">BrowserPlatform</a></span></td><td><p>Platform names used to identify a OS platform x architecture combination in the way that is relevant for the browser download.</p></td></tr><tr><td><spanid="chromereleasechannel"><ahref="/browsers-api/browsers.chromereleasechannel">ChromeReleaseChannel</a></span></td><td></td></tr></tbody></table>
<h2class="anchor anchorWithStickyNavbar_FNw8"id="functions">Functions<ahref="#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><spanid="candownload"><ahref="/browsers-api/browsers.candownload">canDownload(options)</a></span></td><td></td></tr><tr><td><spanid="computeexecutablepath"><ahref="/browsers-api/browsers.computeexecutablepath">computeExecutablePath(options)</a></span></td><td></td></tr><tr><td><spanid="computesystemexecutablepath"><ahref="/browsers-api/browsers.computesystemexecutablepath">computeSystemExecutablePath(options)</a></span></td><td></td></tr><tr><td><spanid="createprofile"><ahref="/browsers-api/browsers.createprofile">createProfile(browser, opts)</a></span></td><td></td></tr><tr><td><spanid="detectbrowserplatform"><ahref="/browsers-api/browsers.detectbrowserplatform">detectBrowserPlatform()</a></span></td><td></td></tr><tr><td><spanid="getinstalledbrowsers"><ahref="/browsers-api/browsers.getinstalledbrowsers">getInstalledBrowsers(options)</a></span></td><td><p>Returns metadata about browsers installed in the cache directory.</p></td></tr><tr><td><spanid="getversioncomparator"><ahref="/browsers-api/browsers.getversioncomparator">getVersionComparator(browser)</a></span></td><td><p>Returns a version comparator for the given browser that can be used to sort browser versions.</p></td></tr><tr><td><spanid="install"><ahref="/browsers-api/browsers.install">install(options)</a></span></td><td></td></tr><tr><td><spanid="install"><ahref="/browsers-api/browsers.install_1">install(options)</a></span></td><td></td></tr><tr><td><spanid="launch"><ahref="/browsers-api/browsers.launch">launch(opts)</a></span></td><td></td></tr><tr><td><spanid="makeprogresscallback"><ahref="/browsers-api/browsers.makeprogresscallback">makeProgressCallback(browser, buildId)</a></span></td><td></td></tr><tr><td><spanid="resolvebuildid"><ahref="/browsers-api/browsers.resolvebuildid">resolveBuildId(browser, platform, tag)</a></span></td><td></td></tr><tr><td><spanid="uninstall"><ahref="/browsers-api/browsers.uninstall">uninstall(options)</a></span></td><td></td></tr></tbody></table>
<h2class="anchor anchorWithStickyNavbar_FNw8"id="interfaces">Interfaces<ahref="#interfaces"class="hash-link"aria-label="Direct link to Interfaces"title="Direct link to Interfaces"></a></h2>
<h2class="anchor anchorWithStickyNavbar_FNw8"id="variables">Variables<ahref="#variables"class="hash-link"aria-label="Direct link to Variables"title="Direct link to Variables"></a></h2>