--navigator-captures-playwright
- CLI
- --navigator-captures-playwright
Writes the navigation session as a Node.js Playwright script that replays its actions. On the server, the script is returned as a Link response header.
zshot --cdp -- node PATH replays the script in ZShot, and node PATH in the browser Playwright launches. BASE_URL points it at another host.
Warning: Scripts Contain Credentials
The script holds every value the navigator typed, credentials included, in plain text.
Example
zshot -f pipeline.png \
--navigator-type "anthropic://YOUR_API_KEY@" \
--navigator-credential email=success@zshot-app.com \
--navigator-credential password=password \
--navigate "Log in and open the pipeline" \
--navigator-captures-playwright session.spec.js \
https://zshot-cli.com/example_assets/zrm/{
"url": "https://zshot-cli.com/example_assets/zrm/",
"output_type": "png",
"navigate": "Log in and open the pipeline",
"with_navigator_playwright": true,
"navigator_type": ["anthropic://YOUR_API_KEY@"],
"navigator_credential": { "email": "success@zshot-app.com", "password": "password" }
}curl -X POST http://127.0.0.1:3000/ \
-H "Content-Type: application/json" \
-d '{"url":"https://zshot-cli.com/example_assets/zrm/","output_type":"png","navigate":"Log in and open the pipeline","with_navigator_playwright":true,"navigator_type":["anthropic://YOUR_API_KEY@"],"navigator_credential":{"email":"success@zshot-app.com","password":"password"}}' \
-D - -o pipeline.png