Skip to main content

Adapter parity

Every adapter writes the same on-disk contract (Extension API), but not every adapter writes all of it. This page says, adapter by adapter, which capture features it has, with the file that shows it. It was written from the code, not from the other docs; a test (action/src/__tests__/adapter-parity-docs.test.ts) fails when an adapter listed here leaves the repo, when a new adapter folder is not listed, or when a file cited here no longer exists.

What the columns mean:

ColumnYes means
DOM snapshotThe adapter writes dom.html (the page's HTML, ignored elements removed): the DOM diff and the noise hint.
Element mapIt writes elements.json with the shared collector (collectElementMap, shipped to Python, Ruby and Java as a generated script): selector attribution, page-shift detection.
Style digestIts element map carries each element's styleHash, so the compare can say whether computed styles changed (dom.styleCheck). Without it, an identical DOM reads "styles not compared", never likely render noise.
Capture until stableIt takes screenshots until two in a row match (stable-capture.ts), which guards against Chrome returning a frame painted for the wrong viewport. Waiting for the page to settle before one screenshot is not this.
MasksIt measures selector masks at capture time (maskRects in the capture's metadata.json) and takes masks per call. Partial: it does neither, so only region masks (x, y, width, height) from config.json work, which the compare applies to every adapter's captures; a selector mask there only warns.
Capture healthIt records what failed to load (health in metadata.json, from HEALTH_PROBE_EXPRESSION), so a failed web font or stylesheet reads as an unhealthy capture, never as render noise.
Capture provenanceIt records where the capture came from (environment in metadata.json), so a diff caused by a new browser, OS or capture method reads as rendering drift.
Per-browser baselinesIt applies environmentPolicy: "separate" and keys snapshots <name>__<browser>__<platform> by itself. Partial: only a manual variant suffix.

Summary​

AdapterCodeDOM snapshotElement mapStyle digestCapture until stableMasksCapture healthCapture provenancePer-browser baselines
Playwright (JS/TS)packages/playwrightyesyesyespartialyesyesyesyes
WebdriverIO (JS/TS)packages/webdriverioyesyesyesnopartialyesyesyes
Selenium (JS/TS)packages/seleniumyesyesyespartialpartialyesyesyes
Python Playwrightpythonyesnononopartialyesyespartial
Python Seleniumpythonyesyesyesnopartialyesyespartial
Ruby (Capybara / Selenium)rubyyesyesyesnopartialnonono
Java Playwrightjavayesnononopartialnonopartial
Java Seleniumjavayesyesyesnopartialnonopartial
Standalone CLIpackages/witnessyesnonoyespartialyesyesyes

The standalone CLI is testivai witness <url>, which captures pages without a test framework.

Evidence​

Playwright (JS/TS)​

FeatureStatusWhereNote
DOM snapshotyessnapshot.ts snapshot()Taken after the capture styles come off.
Element mapyessnapshot.ts buildElementMapExpressionShared collector, with elementIdAttributes.
Style digestyeselement-map.ts collectElementMapstyleHash per element.
Capture until stablepartialfull-page.ts captureFullPageScreenshotOnly the CDP path on Chromium. Firefox and WebKit, a failed CDP capture, and useBrowserCapture: false take one screenshot.
Masksyessnapshot.ts maskRectsConfig and per-call selector masks measured in the page; per-call region masks.
Capture healthyeshealth.ts probeCaptureHealthIn-page probe right after the screenshot, before the capture styles come off. No network-side evidence.
Capture provenanceyesenvironment.ts playwrightEnvironmentfull-page:cdp, full-page:playwright or full-page:stitched; framework and project included.
Per-browser baselinesyessnapshot.ts applyEnvironmentPolicyToNameWith more than one project, the project name is a suffix whatever the policy.

WebdriverIO (JS/TS)​

FeatureStatusWhereNote
DOM snapshotyeswitness.ts witness()Web pages only; a native app screen has no DOM.
Element mapyeselement-map.ts toViewportElementMapShared collector, moved to viewport coordinates to match the viewport screenshot.
Style digestyeselement-map.ts collectElementMap
Capture until stablenowitness.ts takeScreenshotOne viewport screenshot (WebDriver takeScreenshot), after a web-font wait. No full-page capture.
Maskspartialwitness.ts writeTempMetadataNo selector or per-call masks. Native app captures get an automatic status-bar mask.
Capture healthyeswitness.ts shoot(), capture-health.ts probeCaptureHealthHEALTH_PROBE_EXPRESSION right after the screenshot, before the capture style comes off. Web pages only: a native app screen is never probed. No network-side evidence.
Capture provenanceyeswitness.ts webDriverEnvironmentviewport:webdriver; native app captures screen:appium with a device section.
Per-browser baselinesyeswitness.ts applyEnvironmentPolicyToNameThe platform is the machine running the tests, not a remote browser's.

Selenium (JS/TS)​

FeatureStatusWhereNote
DOM snapshotyeswitness.ts witness()
Element mapyeswitness.ts buildElementMapExpressionShared collector, in page coordinates, also on the viewport fallback.
Style digestyeselement-map.ts collectElementMap
Capture until stablepartialfull-page.ts captureFullPageScreenshotOnly the CDP path (Chrome, Edge). Other browsers, and a failed CDP capture, take one viewport screenshot. A settle wait runs before either.
Maskspartialwitness.ts writeTempMetadataNo selector or per-call masks.
Capture healthyeswitness.ts shoot(), health.ts probeCaptureHealthHEALTH_PROBE_EXPRESSION right after the screenshot (CDP full page or viewport), before the capture style comes off and the settle observer stops. No network-side evidence.
Capture provenanceyeswitness.ts webDriverEnvironmentfull-page:cdp or viewport:webdriver.
Per-browser baselinesyeswitness.ts applyEnvironmentPolicyToName

Python Playwright​

FeatureStatusWhereNote
DOM snapshotyes_capture.py witness()
Element mapno_capture.py witness()The collector is loaded in this module, but only the Selenium adapter calls it.
Style digestno_capture.py witness()No element map.
Capture until stableno_capture.py witness()One page.screenshot(full_page=True) after a web-font wait; no settle wait.
Maskspartial_capture.py witness()No masks; ignore_selectors hides elements, it does not mask them.
Capture healthyes_capture.py _shoot(), _health.py probe_healthThe generated health_probe.js right after the screenshot, before the capture styles come off (since 0.3.0). No network-side evidence.
Capture provenanceyes_environment.py playwright_environmentfull-page:playwright; the browser from Playwright, else the user agent; variant as the project (since 0.3.0).
Per-browser baselinespartial_capture.py sanitize_variantvariant= gives <name>__<variant>; environmentPolicy is not read.

Python Selenium​

FeatureStatusWhereNote
DOM snapshotyesselenium.py witness()
Element mapyesselenium.py _element_map_expressionGenerated element_map.js; elementIdAttributes is not passed.
Style digestyeselement_map.js collectElementMap
Capture until stablenoselenium.py _capture_screenshotOne screenshot (CDP full page on Chrome and Edge, Firefox full page, else the viewport) after a web-font and settle wait.
Maskspartialselenium.py witness()No masks.
Capture healthyesselenium.py _shoot(), _health.py probe_healthSame probe and timing as the Playwright path (since 0.3.0). No network-side evidence.
Capture provenanceyesselenium.py _environment(), _environment.py webdriver_environmentfull-page:cdp, full-page:firefox or viewport:webdriver, whichever took the screenshot; browser and driver from the capabilities (since 0.3.0).
Per-browser baselinespartialselenium.py witness()variant= only.

Ruby (Capybara / Selenium)​

FeatureStatusWhereNote
DOM snapshotyescapture.rb witnessWorks with Capybara's Selenium driver or a Selenium driver.
Element mapyeselement_map.rbGenerated element_map.js; elementIdAttributes is not passed.
Style digestyeselement_map.js collectElementMap
Capture until stablenocapture.rb capture_screenshotOne screenshot after a web-font wait and settle.rb.
Maskspartialcapture.rb witnessNo masks.
Capture healthnocapture.rb witnessNo metadata.json is written.
Capture provenancenocapture.rb witnessNo metadata.json is written.
Per-browser baselinesnocapture.rb witnessNo variant option, no environmentPolicy.

Java Playwright​

FeatureStatusWhereNote
DOM snapshotyesWitness.java witness
Element mapnoWitness.java witnessCaptureOptions has skipElementMap, but this adapter never runs the collector.
Style digestnoWitness.java witnessNo element map.
Capture until stablenoWitness.java witnessOne full-page Playwright screenshot after a web-font wait.
MaskspartialCaptureOptions.javaNo mask option.
Capture healthnoWitness.java witnessNo metadata.json is written.
Capture provenancenoWitness.java witnessNo metadata.json is written.
Per-browser baselinespartialWitness.java witnessvariant only; environmentPolicy is not read.

Java Selenium​

FeatureStatusWhereNote
DOM snapshotyesSeleniumWitness.java witness
Element mapyesElementMap.javaGenerated element-map.js; elementIdAttributes is not passed.
Style digestyeselement-map.js collectElementMap
Capture until stablenoSeleniumWitness.java captureScreenshotOne screenshot (CDP, Firefox full page, else the viewport) after a web-font wait and Settle.java.
MaskspartialCaptureOptions.javaNo mask option.
Capture healthnoSeleniumWitness.java witnessNo metadata.json is written.
Capture provenancenoSeleniumWitness.java witnessNo metadata.json is written.
Per-browser baselinespartialSeleniumWitness.java witnessvariant only.

Standalone CLI​

FeatureStatusWhereNote
DOM snapshotyesrun.ts runStandaloneWitness
Element mapnorun.ts runStandaloneWitnessBy design, as the file's header says: styles are not compared for these captures.
Style digestnorun.ts runStandaloneWitnessNo element map.
Capture until stableyesrun.ts captureFullPageCDP in Chrome, its only capture path.
Maskspartialrun.ts runStandaloneWitnessNo masks measured.
Capture healthyesrun.ts standaloneHealthThe in-page probe plus failed requests seen on the network (watchNetwork), cross-origin ones included.
Capture provenanceyesrun.ts standaloneEnvironmentfull-page:cdp; no framework.
Per-browser baselinesyesrun.ts applyEnvironmentPolicyToNameAlways chromium.