Script URL JavaScript Injection

Inject a custom script URL to interact with the website before taking a screenshot.

For example, run JavaScript code to hide or modify elements such as menus and input forms.

Custom Script Example

The example below is using a JavaScript file to interact with a website:

// Line breaks added for readability https://api.addscreenshots.com/screenshots
?apikey=
YOUR_API_KEY
&script_url=https://example.com/google.js
&url=google.com

The JavaScript contained in the demo will enter the search criteria 'Car Rental' and click on the search button:

document.querySelector('input[name=q]').value = 'Car Rental';
document.querySelector('input[name=btnK]').click();

Screenshot with JavaScript Injection