Class Coverage
- Namespace
- PuppeteerSharp.PageCoverage
- Assembly
- PuppeteerSharp.dll
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.
public class Coverage : ICoverage
- Inheritance
-
Coverage
- Implements
Methods
StartCSSCoverageAsync(CoverageStartOptions)
Starts CSS coverage.
public Task StartCSSCoverageAsync(CoverageStartOptions options = null)
Parameters
options
CoverageStartOptionsSet of configurable options for coverage.
Returns
- Task
A task that resolves when coverage is started.
StartJSCoverageAsync(CoverageStartOptions)
Starts JS coverage.
public Task StartJSCoverageAsync(CoverageStartOptions options = null)
Parameters
options
CoverageStartOptionsSet 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.
public 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.
public 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.