Appium 1.16.0, chromedriver_mac64_v80.0.3987.106
I am trying to set flag “android-setup-search-engine” to disable chrome start screen on real device.
Found solution here https://groups.google.com/d/msg/chromedriver-users/cI8hj7eihRo/At6OQV4bAwAJ
I am set up chrome options this way
ChromeOptions chromeOptions = new ChromeOptions(); HashMap<String, Object> chromeLocalStatePrefs = new HashMap<String, Object>(); List<String> experimentalFlags = new ArrayList<String>(); experimentalFlags.add("android-setup-search-engine@0"); chromeLocalStatePrefs.put("browser.enabled_labs_experiments", experimentalFlags); chromeOptions.setExperimentalOption("localState", chromeLocalStatePrefs); capabilities.setCapability(ChromeOptions.CAPABILITY, chromeOptions);
and webdriver started with capabilities:
Starting W3C Chromedriver session with capabilities: {
“capabilities”: {
“alwaysMatch”: {
“goog:chromeOptions”: {
“androidPackage”: “com.android.chrome”,
“args”: ,
“extensions”: ,
“localState”: {
“browser.enabled_labs_experiments”: [
“android-setup-search-engine@0”
]
},
“androidDeviceSerial”: “blablabla”
},
“goog:loggingPrefs”: {
“browser”: “ALL”
}
}
}
with error
Failed to start Chromedriver session: invalid argument: cannot parse capability: goog:chromeOptions from invalid argument: unrecognized chrome option: localState
But according to Sign in - Google Accounts localState is a part of chromeOptions.
Did i do something incorrect or this is doesn’t work in appium?