Table of Contents

Interface ICoverage

Namespace
PuppeteerSharp.PageCoverage
Assembly
PuppeteerSharp.dll

gathers information about parts of JavaScript and CSS that were used by the page.

public interface ICoverage

Methods

StartCSSCoverageAsync(CoverageStartOptions)

Starts CSS coverage.

Task StartCSSCoverageAsync(CoverageStartOptions options = null)

Parameters

options CoverageStartOptions

Set of configurable options for coverage.

Returns

Task

A task that resolves when coverage is started.

StartJSCoverageAsync(CoverageStartOptions)

Starts JS coverage.

Task StartJSCoverageAsync(CoverageStartOptions options = null)

Parameters

options CoverageStartOptions

Set of configurable options for coverage.

Returns

Task

A task that resolves when coverage is started.

StopCSSCoverageAsync()

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

Task<CoverageEntry[]> StopCSSCoverageAsync()

Returns

Task<CoverageEntry[]>

Task that resolves to the array of coverage reports for all stylesheets.

Remarks

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

StopJSCoverageAsync()

Stops JS coverage and returns coverage reports for all scripts.

Task<JSCoverageEntry[]> StopJSCoverageAsync()

Returns

Task<JSCoverageEntry[]>

Task that resolves to the array of coverage reports for all stylesheets.

Remarks

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