Coverage
Namespace: PuppeteerSharp.PageCoverage
public class Coverage : ICoverageSupports 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
Methods
Section titled “Methods”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.
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.
StopCSSCoverageAsync()
Section titled “StopCSSCoverageAsync()”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.
StopJSCoverageAsync()
Section titled “StopJSCoverageAsync()”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.
Made with love by Dario Kondratiuk