Discover how to interact with a button, link, or other elements before capturing a screenshot.
This feature is particularly useful for handling pop-up messages and notifications.
You need to specify the name of the element to interact with, such as a link or button. The interaction can be specified by:
Check out our element selection examples for more details.
To interact with multiple items, repeat the click parameter such as &click=.button1&click=.button2
The screenshot below displays a website with a "This site uses cookies..." header and an OK button.
Example 1: Locate the button labeled "OK" and click on it to dismiss the notice.
// Line breaks added for readability https://api.addscreenshots.com/screenshots
?apikey=YOUR_API_KEY
&click=OK
&url=wherescape.com
Your API key can be found on the API Keys page. Need an API Key? Sign up to get started.
For internal applications, replace YOUR_API_KEY with your own unique API Key.
For public facing websites or hotlinks, generate a signed URL.
Example 2: Locate the button by the class name ".gdpr-viewed-action" and click on it to dismiss the notice.
// Line breaks added for readability https://api.addscreenshots.com/screenshots
?apikey=YOUR_API_KEY
&click=.gdpr-viewed-action
&url=wherescape.com