File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -253,7 +253,10 @@ def _set_chrome_options(
253
253
chrome_options .add_argument ("--disable-prompt-on-repost" )
254
254
if servername != "localhost" :
255
255
use_auto_ext = True # Use Automation Extension with the Selenium Grid
256
- if not use_auto_ext : # (It's ON by default. Disable it when not wanted.)
256
+ if not use_auto_ext : # Disable Automation Extension / detection. (Default)
257
+ if browser_name != constants .Browser .OPERA :
258
+ chrome_options .add_argument (
259
+ "--disable-blink-features=AutomationControlled" )
257
260
chrome_options .add_experimental_option ("useAutomationExtension" , False )
258
261
if (settings .DISABLE_CSP_ON_CHROME or disable_csp ) and not headless :
259
262
# Headless Chrome doesn't support extensions, which are required
@@ -790,6 +793,8 @@ def get_local_driver(
790
793
prefs ["profile.managed_default_content_settings.images" ] = 2
791
794
edge_options .add_experimental_option ("prefs" , prefs )
792
795
edge_options .add_experimental_option ("w3c" , True )
796
+ edge_options .add_argument (
797
+ "--disable-blink-features=AutomationControlled" )
793
798
edge_options .add_experimental_option (
794
799
"useAutomationExtension" , False )
795
800
edge_options .add_experimental_option (
You can’t perform that action at this time.
0 commit comments