How can I make Selenium Chromedriver anti-detectable settings work on tabs opened by webdriver?

509 Views Asked by At

In Selenium Chromedriver added proxy, fake user agent, disabled Webrtc by extension, spoofed Webgl with selenium-stealth, spoofed time zone and language as follows:

driver.execute_cdp_cmd('Emulation.setTimezoneOverride', tz_params)
options.add_experimental_option('prefs', {'intl.accept_languages': language})

so that on https://pixelscan.net/ my browser is not detected as a bot. But it works only on one(first) tab opened. On the website I work with the authorization window pops up, which does not save all the settings that are necessary for the browser to remain undetectable (of the above remains only the proxy and useragent) How to make these parameters work on pop-up windows opened by a website? I would also be glad if there are any alternative libraries that can help me achieve the desired result

I found a way out - an extension that changes my location and language depending on what country my ip address is. Unfortunately, such an extension for WebGL I have not found, only those that change drivers WebGL to random values (I need the values specified by me)

1

There are 1 best solutions below

3
On

selenium-stealth settings is effective only on the first tab and the settings doesn't propogates to the subsequent tabs or window handles is a known issue for quite some time now.

This issue is being actively tracked through the discussion Settings doesn't apply on all tabs (but only on the first one)