elestio / ws-screenshot

A simple way to take a screenshot of a website by providing its URL. ws-screenshot include a simple web UI but also a REST API and a Websocket API to automate screenshots.
http://backup15.terasp.net/
MIT License
106 stars 36 forks source link

Add basic dismissModal argument #37

Closed jwjacobs88 closed 6 months ago

jwjacobs88 commented 6 months ago

This tries to dismiss any modals.

In a basic attempt it tries focusing the page, pressing escape, and then waiting 200ms for any animations to clear. In testing various URLs this seems to work quite well. Especially for pages that ask you to login on page load. For example, facebook.com

Here is an example: Screencast from 2023-12-15 13-45-42.webm

jbenguira commented 6 months ago

Thanks for your contribution :)