Unable to hide “Chrome is being controlled by automated software” infobar within Chrome v76

后端 未结 6 1184
逝去的感伤
逝去的感伤 2020-11-28 08:48

After updating Chrome to version 76, I cannot figure out how to hide the \"Chrome is being controlled by automated software...\" notification overriding some controls on the

6条回答
  •  萌比男神i
    2020-11-28 09:18

    As of 1 Aug 2019 - You can send the excludeswitch - enable-automation to hide the message. and to disable pop up 'Disable developer mode extensions' set useAutomationExtension=false . Refer for useAutomationExtension

    Tested on : Windows 10 Version 76.0.3809.87 (Official Build) (64-bit) ChromeDriver 76.0.3809.68

    --enable-automation : Inform users that their browser is being controlled by an automated test Reference

         "goog:chromeOptions": {
    
            "excludeSwitches": [ "enable-automation" ],
            "useAutomationExtension": false
         }
    

    In C# :

    To disable pop up "Disable developer mode extensions" and automation info-bar message .

    options.AddExcludedArgument("enable-automation");
    options.AddAdditionalCapability("useAutomationExtension", false);
    

    In JAVA :

    options.setExperimentalOption("excludeSwitches", Collections.singletonList("enable-automation"));
    options.setExperimentalOption("useAutomationExtension", false);
    

    In Python :

    options.add_experimental_option("excludeSwitches", ["enable-automation"])
    options.add_experimental_option('useAutomationExtension', False)
    

    In Protractor :

    Add below capabilities in conf.js/conf.ts

    capabilities: {
        'browserName': 'chrome',
        "goog:chromeOptions": {
          "excludeSwitches": [ "enable-automation" ],
          "useAutomationExtension": false
       }
      },
    

提交回复
热议问题