mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 23:50:42 +00:00
22 lines
509 B
JavaScript
22 lines
509 B
JavaScript
import fs from "node:fs";
|
|
|
|
const snapshotPath = process.argv[2] ?? "/tmp/browser-cdp-snapshot.txt";
|
|
const snapshot = fs.readFileSync(snapshotPath, "utf8");
|
|
|
|
for (const needle of [
|
|
'button "Save"',
|
|
'link "Docs"',
|
|
"https://docs.openclaw.ai/browser-cdp-live",
|
|
'generic "Clickable Card"',
|
|
"cursor:pointer",
|
|
'Iframe "Child"',
|
|
'button "Inside"',
|
|
]) {
|
|
if (!snapshot.includes(needle)) {
|
|
console.error(snapshot);
|
|
throw new Error(`missing snapshot needle: ${needle}`);
|
|
}
|
|
}
|
|
|
|
console.log("ok");
|