Screenshots
Automation Steps and Targeted Screenshots
Interact with pages before capture using steps and CSS target selectors.
What are automation steps?
Automation steps let you interact with a page before the screenshot is taken. This is useful for logging in, dismissing popups, filling forms, or navigating to the right state.
Available step commands
click— click an element by CSS selectortype— type text into an input fieldwait— wait a fixed number of millisecondswaitForSelector— wait for a CSS selector to appear in the DOMscroll— scroll to a position or elementscreenshot— take an intermediate screenshot
Example: Login before screenshot
{
"url": "https://example.com/dashboard",
"steps": [
{ "action": "click", "selector": "#login-btn" },
{ "action": "type", "selector": "#email", "value": "user@example.com" },
{ "action": "type", "selector": "#password", "value": "secret" },
{ "action": "click", "selector": "[type=submit]" },
{ "action": "waitForSelector", "selector": ".dashboard-header" }
]
}
Targeted element screenshots
Use the target parameter with a CSS selector to capture only a specific element on the page instead of the full viewport.
Clean output helpers
hide_popups=true— automatically dismisses cookie banners and GDPR noticeshide_ads=true— hides common ad containers
Tags
Last updated March 27, 2026