Open Website
Set Browser Timeout 10
New Browser ${browser} headless=${headless} args=[‘–disable-notifications’,‘–disable-
infobars’,‘–ignore-certificate-errors’,‘–disable-popup-blocking’]
New Context viewport={‘width’: 1920, ‘height’: 1080}
New Page ${url}
Firstly what sort of “pop-ups” are you trying to block?
is it a dialogue the the browser is producing
a new browser window/tab opening to another page
a browser dialogue telling about a certificate error
a simulated dialogue in the HTML page (more common these days)?
The options you’ve selected should prevent the first 3, but not the last one of the above list. The browser will always render the HTML, so if it’s in the HTML you’ll have to handle the simulated “pop-up”.
You can confirm what it is by opening dev tools and try to inspect an element of the “pop-up”.
I read, “I want to block pop-ups…”
I saw the command-line argument, “–disable-popup-blocking”
I might just drop command-line argument, “–disable-popup-blocking” and see what happens.