puppeteer/new-docs/puppeteer.tracing.md
Martin Splitt a46c78fc91 docs(new): Adds TSDoc to Tracing class (#6088)
* Adds tsdoc to Tracing class

* Updates tsdocs

Co-authored-by: martinsplitt <martin@geekonaut.de>
2020-06-25 13:01:46 +02:00

1.4 KiB

Home > puppeteer > Tracing

Tracing class

The Tracing class exposes the tracing audit interface.

Signature:

export declare class Tracing 

Remarks

You can use tracing.start and tracing.stop to create a trace file which can be opened in Chrome DevTools or timeline viewer.

The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the Tracing class.

Example

await page.tracing.start({path: 'trace.json'});
await page.goto('https://www.google.com');
await page.tracing.stop();

Properties

Property Modifiers Type Description
_client CDPSession
_path string
_recording boolean

Methods

Method Modifiers Description
start(options) Starts a trace for the current page.
stop() Stops a trace started with the start method.