Selenium-Requests
Selenium-Requests copied to clipboard
Popup blocker can inhibit window.open
There seems to be a bug where selenium-requests will hang trying to acquire the mutex from the web server.
The root cause of this is that the popup blocker inhibits the window.open
JavaScript code.
This is at least a problem when trying to combine it with undetected-chromedriver, see ultrafunkamsterdam/undetected-chromedriver#380, but I would suspect that it can also trigger in other cases.
To fix it, one approach is to do:
opts = ChromeOptions()
opts.add_argument('--disable-popup-blocking')
driver = MyCustomWebDriver(options=opts)
It's possible that there are other approaches too, such as selectively toggling it while still blocking other popups, or using another method to open a tab - someone suggests driver.tab_new(url)
in the issue I linked above.
Can anyone else confirm that this fixes the issue for them too?