I updated both ChromeDriver and Chrome app on mobile to latest version, but bug still occurs.
Caused by: org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: An unknown server-side error occurred while processing the command. Original error: invalid argument: cannot parse capability: goog:chromeOptions
Then I ReRun on 10.1, code work OK
So I debug and see the reason is Katalon always auto adds this pref everytime I start existing app : profile.password_manager_leak_detection=false
10.2
User set preference: [âgoog:chromeOptionsâ, â{args=[âdisable-popup-blocking, --disable-notifications], extensions=, prefs={profile.password_manager_leak_detection=false}}â]
10.1:
User set preference: [âgoog:chromeOptionsâ, â{args=[âdisable-popup-blocking, --disable-notifications], extensions=}â]
My code to start Chrome on Mobile:
RunConfiguration.setMobileDriverPreferencesProperty('chromedriverExecutable', pathDriver)
RunConfiguration.setMobileDriverPreferencesProperty('browserName', 'Chrome')
Map<String, Object> chromeOptions = new HashMap<>()
chromeOptions.put("args", Arrays.asList("--disable-popup-blocking", "--disable-notifications"))
RunConfiguration.setMobileDriverPreferencesProperty("goog:chromeOptions", chromeOptions)
Mobile.startExistingApplication(GlobalVariable.G_ANDROID_OMNI_PACKAGEID)
// use WebUI to continue test:
WebUI.openBrowser(Url)
Hereâs full log:
Caused by: org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: An unknown server-side error occurred while processing the command. Original error: invalid argument: cannot parse capability: goog:chromeOptions
from invalid argument: unrecognized chrome option: prefs
Host info: host: 'HCM-HMK-014', ip: '10.168.16.215'
Build info: version: '4.28.1', revision: '73f5ad48a2'
System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '17.0.14'
Driver info: io.appium.java_client.android.AndroidDriver
Command: [null, newSession {capabilities=[Capabilities {appium:allowTestPackages: true, appium:appWaitActivity: *, appium:autoGrantPermissions: true, appium:automationName: uiautomator2, appium:browserName: chrome, appium:chromedriverExecutable: C:/Users/lamnt21/.katalon/p..., appium:deviceId: , appium:deviceName: HONOR CRT-LX2 (Android 14), appium:disableIdNamespace: true, appium:newCommandTimeout: 1800, appium:noReset: true, appium:platformVersion: 14, appium:udid: AH8M6R3616004440, appium:unlockKey: 147147, appium:unlockType: pin, goog:chromeOptions: {args: [--disable-popup-blocking, --disable-notifications], extensions: [], prefs: {profile.default_content_setting_values.notifications: 2}}, platformName: ANDROID}]}]
Capabilities {appium:allowTestPackages: true, appium:appWaitActivity: *, appium:autoGrantPermissions: true, appium:automationName: uiautomator2, appium:browserName: chrome, appium:chromedriverExecutable: C:/Users/lamnt21/.katalon/p..., appium:deviceId: , appium:deviceName: HONOR CRT-LX2 (Android 14), appium:disableIdNamespace: true, appium:newCommandTimeout: 1800, appium:noReset: true, appium:platformVersion: 14, appium:udid: AH8M6R3616004440, appium:unlockKey: 147147, appium:unlockType: pin, goog:chromeOptions: {args: [--disable-popup-blocking, --disable-notifications], extensions: [], prefs: {profile.default_content_setting_values.notifications: 2}}, platformName: ANDROID}```