Wait for a JavaScript event
Requires a Standard license
Capture the Hello from ZShot page once its animation:complete event fires, saved to hello.png.
zshot -f hello.png --wait-for js:animation:complete https://zshot-cli.com/example_assets/hello_zshot/{
"url": "https://zshot-cli.com/example_assets/hello_zshot/",
"output_type": "png",
"wait_for": "js:animation:complete"
}curl -X POST http://127.0.0.1:3000/ \
-H "Content-Type: application/json" \
-d '{"url":"https://zshot-cli.com/example_assets/hello_zshot/","output_type":"png","wait_for":"js:animation:complete"}' \
-o hello.png
See --wait-for for the other conditions you can wait on.