ce04b2b3de
- Add IMH_EXTRACTION_CLEANUP_FAILED and IMH_EXTRACTION_RESIDUAL_ATTRIBUTES diagnostic codes with severity warning and extraction-error category - Check for residual data-imhotep-runtime-id attributes before extraction (both fast-geometry and CDP paths), emit diagnostic if prior run leaked them - Surface cleanup failures (attribute removal, CDP session detach) as returned diagnostics instead of silent console.warn - Wrap CDP sessionManager.detach() in try/catch to prevent finally-block unhandled throws on closed/navigated pages - Count injected vs cleaned runtime-id attributes; report mismatch as IMH_EXTRACTION_CLEANUP_FAILED with metrics - Move errors array declaration before try block in fast-geometry path so finally can append cleanup diagnostics
imhotep-playwright
Playwright integration layer for Imhotep. Provides page wrapping, CDP-backed geometry extraction, runtime pooling, property-based test runners, renderer adapters, and preset assertion contracts.
Key Exports
| Export | Description |
|---|---|
imhotep(page, opts) |
Attach Imhotep to a Playwright page |
imhotepComponent(id, opts) |
Property-run entry for rendered components |
imhotepStory(url, opts) |
Property-run entry for Storybook stories |
imhotepFixture(path, opts) |
Property-run entry for fixture files |
test, expect, imhotepFixtures |
Playwright test fixtures |
ContextPool, PagePool, Semaphore |
Pooled runtime for multi-worker testing |
touchTarget through modalContainment |
Reusable assertion presets |