Skip to content

Set ChromeOptions with androidProcess in DesiredCapabilities will raise error #969

@megolee

Description

@megolee

Description

Set DediredCapabilities with androidProcess in ChromeOptions as below:

DesiredCapabilities desired_capabilities = new DesiredCapabilities(); desired_capabilities.setCapability(AndroidMobileCapabilityType.PLATFORM, "Android"); desired_capabilities.setCapability(AndroidMobileCapabilityType.VERSION, "6.0"); desired_capabilities.setCapability("deviceName", "Android"); desired_capabilities.setCapability(AndroidMobileCapabilityType.APP_PACKAGE, "com.tencent.mm"); desired_capabilities.setCapability(AndroidMobileCapabilityType.APP_ACTIVITY, "ui.LauncherUI"); desired_capabilities.setCapability("showChromedriverLog", true); desired_capabilities.setCapability(AndroidMobileCapabilityType.AUTO_GRANT_PERMISSIONS, true); desired_capabilities.setCapability("noReset", true); ChromeOptions chrome_options = new ChromeOptions(); chrome_options.setExperimentalOption("androidProcess", "com.tencent.mm:tools"); desired_capabilities.setCapability(ChromeOptions.CAPABILITY, chrome_options);

When try to launch driver, appium will give the Error: Could not find package com.android.chrome on the device

This error happened with java client 6.0.0, but it is ok with 5.0.0

Environment

  • java client build version or git revision if you use some shapshot: 6.0.0
  • Appium server version or git revision if you use some shapshot: 1.8.1
  • Desktop OS/version used to run Appium if necessary: Mac High Sierra
  • Node.js version (unless using Appium.app|exe) or Appium CLI or Appium.app|exe: 10.1.0
  • Mobile platform/version under test: Android 6.0
  • Real device or emulator/simulator: emulator

Details

Please provide more details, if necessary.

Code To Reproduce Issue [ Good To Have ]

Ecxeption stacktraces

https://gist.github.com/megolee/9e010f6efb7d9572494cbb3fd4c00061

Link to Appium logs

java client 6.0.0: https://gist.github.com/megolee/8d9c4dd279d70e34dd5934c0e9886ce8

java client 5.0.0: https://gist.github.com/megolee/60d9b9746531343bea886ae1e4757c7c

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions