If you take screenshots of websites programmatically, the GDPR cookie banner is your number-one enemy. Most APIs make you write CSS overrides per site, or charge extra for "stealth mode." I built a JS dismiss-rules library covering 12 major Consent Management Platforms automatically: OneTrust, Cookiebot, Quantcast, TrustArc, Sourcepoint, Didomi, Iubenda, Usercentrics, Borlabs, Complianz, CookieYes, GDPR Plugin. Plus a generic text-matching fallback ("Accept all" / "I agree" / etc). The shape of a rule { cmp : " OneTrust " , accept_selectors : [ " #onetrust-accept-btn-handler " , " [data-cy='accept-all-cookies'] " ], container_selectors : [ " #onetrust-banner-sdk " , " #onetrust-consent-sdk " ], } Enter fullscreen mode Exit fullscreen mode The dismiss script: Iterates rules in order For each rule, tries every accept_selector and clicks the first visible match If no accept button works, hides containers via display: none Falls back to button text matching ( /^(accept all|accept|i agree|got it|ok)$/i ) Where to…