Expand description
Coverage — JS and CSS code-coverage collection for a page.
Speaks CDP’s coverage domains directly on the page session:
- JS coverage via the
Profilerdomain:Profiler.startPreciseCoverage(withcallCount+detailed) on start,Profiler.takePreciseCoveragethenProfiler.stopPreciseCoverageon stop. - CSS coverage via the
CSSdomain:CSS.enable+CSS.startRuleUsageTrackingon start, andCSS.stopRuleUsageTracking(which returns rule usage) on stop.
Mirrors the shape of Playwright’s page.coverage().
Structs§
- CSSCoverage
Entry - A single CSS style sheet reported by CSS coverage.
- CSSCoverage
Result - The result of
Coverage::stop_css_coverage: rule usage grouped by sheet. - CSSCoverage
Rule - A single CSS rule’s coverage record.
- Coverage
- A code-coverage handle for a
Page. - JSCoverage
Entry - A single script reported by JS coverage.
- JSCoverage
Function - A single function within a JS coverage entry.
- JSCoverage
Range - A covered byte range inside a JS function.
- JSCoverage
Result - The result of
Coverage::stop_js_coverage: one entry per script. - JSCoverage
Start Options - Options for
Coverage::start_js_coverage.