zshot/cliDownload

--navigator-goal

CLI
--navigator-goal
ValueGOAL
LicensePro

Ends the navigation as soon as this goal is met, instead of when the navigator judges its instructions done.

GoalMet when
url:PATTERNThe page URL matches PATTERN, where * matches anything. A pattern without * matches anywhere in the URL.
css:SELECTORAn element matching SELECTOR is on the page
text:TEXTThe page’s visible text contains TEXT, matching case
regex:SOURCE or regex:/SOURCE/FLAGSA JavaScript regular expression matches the page’s visible text. A pattern that does not compile fails the navigation.
js:EXPRESSIONThe JavaScript expression is truthy in the page
Any other textThe navigator judges the statement true of the page

Every goal but a statement is checked before each step, with no navigator asked. --navigator-captures-playwright and --navigator-captures-puppeteer scripts end by waiting for the same check.

Example

Run locally
zshot -f pipeline.png \
  --navigator-type "anthropic://YOUR_API_KEY@" \
  --navigator-credential email=success@zshot-app.com \
  --navigator-credential password=password \
  --navigate "Log in" \
  --navigator-goal "css:#kpi-pipeline" \
  https://zshot-cli.com/example_assets/zrm/