There's an API for chrome and firefox that lets you remote-control the browser with code. I use this to run my unit tests so they really fill out forms as a user would and to save screenshots resized in various device resolutions.<p><a href="https://github.com/puppeteer/puppeteer/" rel="nofollow">https://github.com/puppeteer/puppeteer/</a>