Table of Contents

Class Tracing

Namespace
PuppeteerSharp
Assembly
PuppeteerSharp.dll

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

public class Tracing : ITracing
Inheritance
Tracing
Implements

Examples

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

Methods

StartAsync(TracingOptions)

Starts tracing.

public Task StartAsync(TracingOptions options = null)

Parameters

options TracingOptions

Tracing options.

Returns

Task

Start task.

StopAsync()

Stops tracing.

public Task<string> StopAsync()

Returns

Task<string>

Stop task.