|
Post by leiwang on Mar 24, 2017 7:17:58 GMT
After updating to Chrome 57, there will be a "Chrome is being controlled by automated test software" notification on top of chrome when running automation test with SeleniumPlus. How to get rid of it? As usual, we need to start browser with custom settings- Firstly, please create a chrome preference data file (such as "c:\pref.json.dat") containing
Note: If you have used a preference data file, you can just add the pair "disable-infobars" : "" in you existing preference data file.
{ "disable-infobars" : "" }
- Then, please call as
String preferenceDataFile = "c:\\pref.json.dat"; StartWebBrowser(URL, ID, SelectBrowser.BROWSER_NAME_CHROME, "30", "true", quote(SelectBrowser.KEY_CHROME_PREFERENCE), preferenceDataFile);
Attachments:
|
|
|
Post by leiwang on Oct 9, 2019 6:37:03 GMT
Our user found that this setting doesn't work anymore on chrome 77. Carl found this explanation "As of v 76, the ability to suppress the infobar was moved from command line options to Enterprise Policy settings for Chrome." and the solution is to set experimental options as below: ChromeOptions options = ...; options.setExperimentalOption(" excludeSwitches", Collections.singletonList(" enable-automation")); options.setExperimentalOption(" useAutomationExtension", false); In seleniumplus, we should set this experimental options when starting the browser. - Firstly, create a chrome experimental option file (such as "c:\experimentalOptions.dat") containing
{ "useAutomationExtension" : false, "excludeSwitches" : ["enable-automation"] }
- Then, start browser as below:
String optionsFile = "c:\\experimentalOptions.dat";
StartWebBrowser(URL, ID, SelectBrowser.BROWSER_NAME_CHROME, "30", "true", quote(SelectBrowser.KEY_CHROME_EXPERIMENTAL_OPTIONS), optionsFile);
|
|
|
Post by leiwang on Oct 23, 2019 9:14:46 GMT
For key SelectBrowser.KEY_CHROME_EXPERIMENTAL_OPTIONS, it also accept a string of key-value pairs like "key:value, key2:value2, key3:value3", so we can also simply call as below
StartWebBrowser(URL, ID, SelectBrowser.BROWSER_NAME_CHROME, "30", "true", SelectBrowser.KEY_CHROME_EXPERIMENTAL_OPTIONS, "useAutomationExtension : false, excludeSwitches : [\"enable-automation\"] ");
|
|