Hi,
I’m using latest Appium java client 4.0. I want to set the package name using below statement but APP_ACTIVITY is not available in MobileCapabilityType. Hence the error when using below statement. Please help.
desiredCapabilities.setCapability(MobileCapabilityType.APP_ACTIVITY, “com.myapp.android”);
@Bharath_Madishetti : From 4.0, this is moved to specific to android package:
* The list of Android-specific capabilities.
* Read:
* https://github.com/appium/appium/blob/1.5/docs/en/writing-running-appium/caps.md#android-only
*/
public interface AndroidMobileCapabilityType extends CapabilityType {
/**
* Activity name for the Android activity you want to launch from your package.
* This often needs to be preceded by a . (e.g., .MainActivity instead of MainActivity).
*/
String APP_ACTIVITY = "appActivity";
/**
* Java package of the Android app you want to run.
*/
String APP_PACKAGE = "appPackage";
/**
* Activity name for the Android activity you want to wait for.
*/
String APP_WAIT_ACTIVITY = "appWaitActivity";
So you should use: AndroidMobileCapabilityType.APP_ACTIVITY .
3 Likes
Thanks a lot for the quick reply