--axtree
- CLI
- --axtree
- REST
- with_axtree
Writes an accessibility tree alongside the render. The path’s extension picks the form: .txt or .text for the indented snapshot, anything else for JSON with bounding boxes.
Several URLs
Each render writes its own tree, numbered like the primary output: page.json becomes page-1.json, page-2.json.
Timed Output
With video or an animated image, the tree reflects the last frame. --log-level warn reports this.
Server
with_axtree takes true or json for the JSON tree and text for the snapshot. The tree is returned as a Link response header.
Example
zshot -f page.png \
--axtree page.json \
https://zshot-cli.com/example_assets/gazette/{
"url": "https://zshot-cli.com/example_assets/gazette/",
"output_type": "png",
"with_axtree": "json"
}curl -X POST http://127.0.0.1:3000/ \
-H "Content-Type: application/json" \
-d '{"url":"https://zshot-cli.com/example_assets/gazette/","output_type":"png","with_axtree":"json"}' \
-D - -o page.png