docs(alpha): simplify native setup and verify generic starter creation

This commit is contained in:
2026-10-20 21:42:34 +01:00
parent dce2d759d7
commit a40898f79a
10 changed files with 272 additions and 529 deletions
+4 -2
View File
@@ -246,7 +246,9 @@ export async function launchChrome({ width = 1440, height = 900, chromePath } =
return api.evaluate(`(() => {
const el = document.querySelector(${JSON.stringify(selector)});
if (!el) return null;
el.scrollIntoView({ block: "center", inline: "center" });
// CSS smooth scrolling is asynchronous; measuring immediately after
// it can click outside the viewport instead of the target control.
el.scrollIntoView({ block: "center", inline: "center", behavior: "instant" });
const r = el.getBoundingClientRect();
return { x: r.x + r.width / 2, y: r.y + r.height / 2 };
})()`);
@@ -267,7 +269,7 @@ export async function launchChrome({ width = 1440, height = 900, chromePath } =
const all = [...document.querySelectorAll(${JSON.stringify(selector)})];
const el = all.find((node) => (node.textContent ?? "").includes(wanted));
if (!el) return false;
el.scrollIntoView({ block: "center" });
el.scrollIntoView({ block: "center", behavior: "instant" });
el.setAttribute("data-test-click", "1");
return true;
})()`);