new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Playwright · API reference · all subjects

coverage/methods

4 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Coverage.startCSSCoverage method

startCSSCoverage() is an async method available since v1.11 that returns coverage is started. It accepts one option: resetOnNavigation (boolean, defaults to true) which controls whether to reset coverage on every navigation.

Coverage.startJSCoverage method

startJSCoverage() is an async method available since v1.11 that returns coverage is started. It accepts two options: resetOnNavigation (boolean, defaults to true, discouraged to set to false as it may still reset on navigations due to browser architecture limitations) and reportAnonymousScripts (boolean, defaults to false) which controls whether anonymous scripts generated by the page should be reported. Anonymous scripts are ones without an associated URL, created dynamically using eval or new Function. If reportAnonymousScripts is true, anonymous scripts will have __playwright_evaluation_script__ as their URL.

Coverage.stopCSSCoverage method

stopCSSCoverage() is an async method available since v1.11 that returns an array of coverage reports for all stylesheets. Each report object contains: url (string, StyleSheet URL), text (optional string, StyleSheet content if available), and ranges (array of objects with start as int start offset in text inclusive and end as int end offset in text exclusive, sorted and non-overlapping). CSS Coverage does not include dynamically injected style tags without sourceURLs.

Coverage.stopJSCoverage method

stopJSCoverage() is an async method available since v1.11 that returns an array of coverage reports for all scripts. Each report object contains: url (string, Script URL), scriptId (string, Script ID), source (optional string, Script content if applicable), and functions (array of objects in V8-specific coverage format with functionName as string, isBlockCoverage as boolean, and ranges as array of objects containing count as int, startOffset as int, and endOffset as int). JavaScript Coverage does not include anonymous scripts by default, but scripts with sourceURLs are reported.

Give your agent this brain