#30

Add navigateHref action for dynamic links

Openbrooksy4503wants to merge intofrom

Summary

Adds a navigateHref step action for following links whose URLs are generated during a recording.

This lets a script wait for a dynamic link, read its fresh href from the DOM, resolve it against the current page URL, and navigate the captured page to that destination.

Example:

{ "action": "wait", "selector": "a.preview-link" }
{ "action": "navigateHref", "selector": "a.preview-link" }

Why

Some product demos generate preview, deployment, report, or published-site links at runtime. A normal click can open a new tab or leave the recording attached to the original page, and hardcoding the URL is not possible when it changes every run.

navigateHref keeps these recordings deterministic without requiring the author to know the URL ahead of time.

Changes

  • Adds StepNavigateHref type.
  • Adds validation for navigateHref.selector.
  • Implements runtime navigation by reading element.href || element.getAttribute("href") and resolving it with new URL(..., window.location.href).
  • Adds dry-run/verbose formatting.
  • Updates config tests and runner formatting tests.
  • Updates docs, schema, and skill step reference.

Verification

  • pnpm --filter @webreel/core build
  • pnpm --filter webreel test
  • pnpm type-check
  • pnpm build
  • pnpm test
  • pnpm lint
  • pnpm format:check

I also verified the built CLI with a local fixture where navigateHref follows a relative link from index.html to target.html, waits for the target page text, and captures a screenshot successfully.

Activity

2
vercel[bot]5mo ago

@brooksy4503 is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.