class: ChromiumBrowser
- extends: Browser
Chromium-specific features including Tracing, service worker support, etc. You can use chromiumBrowser.startTracing
and chromiumBrowser.stopTracing
to create a trace file which can be opened in Chrome DevTools or timeline viewer.
await browser.startTracing(page, {path: 'trace.json'});
await page.goto('https://www.google.com');
await browser.stopTracing();
- chromiumBrowser.newBrowserCDPSession()
- chromiumBrowser.startTracing([page, options])
- browser.close()
- browser.contexts()
- browser.isConnected()
- browser.newContext([options])
- browser.newPage([options])
chromiumBrowser.newBrowserCDPSession()
- returns: <Promise<CDPSession>> Promise that resolves to the newly created browser session.
chromiumBrowser.startTracing([page, options])
page
<Page> Optional, if specified, tracing includes screenshots of the given page.options
<Object>- returns: <Promise>
Only one trace can be active at a time per browser.