Blue Triangle Help Center
Auto Light Dark
Auto Light Dark

How do I close intermittent pop-ups in synthetic scripts?

Use the runScript() action in your synthetic script with this snippet of JavaScript:


if (document.querySelector('cssLocator')) { document.querySelector('cssLocator').click(); }


Note that 'cssLocator' is the CSS locator for the button, link, etc., that closes the pop-up.