Compare replica against original
compare_replicaCapture synchronized screenshots of the original and replica pages, then pixel-diff them to return match percentage and worst-matching regions.
Instructions
Screenshot the original website and a replica (local file or URL) at the same viewport with animations frozen, then pixel-diff them. Returns a match percentage, the worst-matching regions with coordinates, and a visual diff image. Use in a loop: build, compare, fix the worst regions, repeat.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fullPage | No | Compare the full page instead of only the viewport. | |
| threshold | No | Per-pixel RGB delta (sum of channel differences) above which a pixel counts as mismatched. | |
| timeoutMs | No | Navigation timeout in milliseconds. | |
| userAgent | No | Optional browser user-agent override. | |
| waitUntil | No | Page lifecycle event to await before extraction. | domcontentloaded |
| autoScroll | No | Scroll through the page before extraction to trigger lazy-rendered content. | |
| maxScrolls | No | Maximum viewport-sized scroll steps when autoScroll is enabled. | |
| replicaUrl | No | URL of the replica, e.g. http://localhost:5173. Provide this or replicaPath. | |
| maxHeightPx | No | Cap on the compared page height. | |
| originalUrl | Yes | Absolute http:// or https:// URL of the original website. | |
| replicaPath | No | Absolute path to a local replica HTML file. Provide this or replicaUrl. | |
| viewportWidth | No | Browser viewport width in CSS pixels. | |
| viewportHeight | No | Browser viewport height in CSS pixels. | |
| allowPrivateNetwork | No | Allow localhost and private-network URLs. Enable only for trusted sites. | |
| allowPrivateReplica | No | Allow localhost/private replica URLs (the usual case for a dev server). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |