Skip to content

Tracing

Namespace: PuppeteerSharp

public class Tracing : ITracing

You can use StartAsync(TracingOptions) and StopAsync() to create a trace file which can be opened in Chrome DevTools or timeline viewer.

Inheritance: object

Implements: ITracing

Example

await Page.Tracing.StartAsync(new TracingOptions
{
Screenshots = true,
Path = _file
});
await Page.GoToAsync(TestConstants.ServerUrl + "/grid.html");
await Page.Tracing.StopAsync();

View source

public Task StartAsync(TracingOptions options = null)

Starts tracing.

Parameters

Name Type Description
options TracingOptions Tracing options.

Returns: Task — Start task.

View source

public Task<string> StopAsync()

Stops tracing.

Returns: Task<string> — Stop task.

View source

Made with love by Dario Kondratiuk