Tracing
Namespace: PuppeteerSharp
public class Tracing : ITracingYou 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();Methods
Section titled “Methods”StartAsync(TracingOptions)
Section titled “StartAsync(TracingOptions)”public Task StartAsync(TracingOptions options = null)Starts tracing.
Parameters
| Name | Type | Description |
|---|---|---|
options |
TracingOptions | Tracing options. |
Returns: Task — Start task.
StopAsync()
Section titled “StopAsync()”public Task<string> StopAsync()Stops tracing.
Returns: Task<string> — Stop task.
Made with love by Dario Kondratiuk