
Your Docs Have Three Sites. They All Have Different Cookie Banners.
Running screenshot automation across multiple domains sounds clean until you hit reality. Your staging site has a #dev-banner . Production has .cookie-consent . The marketing site has a floating chat bubble. Each domain is its own mess. The obvious fix is a hide action on every screenshot: { "name" : "user-settings" , "url" : "https://app.example.com/settings" , "actions" : [ { "type" : "hide" , "selector" : ".cookie-banner" } ] } Fifty screenshots later, .cookie-banner is scattered across your entire config. When the selector changes, you're updating it fifty times. There's a better way. One rule, all screenshots Heroshot has a top-level hiddenElements config that maps domains to CSS selectors: { "hiddenElements" : { "app.example.com" : [ ".cookie-banner" , "#support-chat" ], "docs.example.com" : [ ".announcement-bar" ], "staging.example.com" : [ "#dev-banner" , ".cookie-banner" ] } } These fire automatically for every screenshot on that domain. No per-screenshot setup. The .cookie-ba
Continue reading on Dev.to Webdev
Opens in a new tab



