Skip to content

Coverage

Namespace: PuppeteerSharp.PageCoverage

public class Coverage : ICoverage

Supports all classes in the .NET class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all .NET classes; it is the root of the type hierarchy.

Inheritance: object

Implements: ICoverage

View source

StartCSSCoverageAsync(CoverageStartOptions)

Section titled “StartCSSCoverageAsync(CoverageStartOptions)”
public Task StartCSSCoverageAsync(CoverageStartOptions options = null)

Starts CSS coverage.

Parameters

Name Type Description
options CoverageStartOptions Set of configurable options for coverage.

Returns: Task — A task that resolves when coverage is started.

View source

StartJSCoverageAsync(CoverageStartOptions)

Section titled “StartJSCoverageAsync(CoverageStartOptions)”
public Task StartJSCoverageAsync(CoverageStartOptions options = null)

Starts JS coverage.

Parameters

Name Type Description
options CoverageStartOptions Set of configurable options for coverage defaults to resetOnNavigation : true, reportAnonymousScripts : false, includeRawScriptCoverage : false, useBlockCoverage : true.

Returns: Task — A task that resolves when coverage is started.

View source

public Task<CoverageEntry[]> StopCSSCoverageAsync()

Stops JS coverage and returns coverage reports for all non-anonymous scripts.

Returns: Task<CoverageEntry[]> — Task that resolves to the array of coverage reports for all stylesheets.

JavaScript Coverage doesn’t include anonymous scripts; however, scripts with sourceURLs are reported.

View source

public Task<JSCoverageEntry[]> StopJSCoverageAsync()

Stops JS coverage and returns coverage reports for all scripts.

Returns: Task<JSCoverageEntry[]> — Task that resolves to the array of coverage reports for all stylesheets.

JavaScript Coverage doesn’t include anonymous scripts by default; however, scripts with sourceURLs are reported.

View source

Made with love by Dario Kondratiuk