I am using the APK info app to know what activities' name are:
package name.v2.acyivities.SplashActivity
package name.v2.acyivities.OnBoardingChooseRegion
(...)
And then I create the DesiredCapabilities:
public AndroidDriver remoteRunningDevice() throws Exception {
DesiredCapabilities cap = new DesiredCapabilities();
cap.setCapability("platformName", MobileConfig.platformName);
cap.setCapability("deviceName", MobileConfig.emulatorDeviceName);
cap.setCapability("platformVersion", MobileConfig.emulatorPlatformVersion);
cap.setCapability("app-package", MobileConfig.appPackage);
cap.setCapability("appActivity","MobileConfig.appPackage" +".v2.acyivities.OnBoardingChooseRegion");
cap.setCapability("noSign", true);
driver = new AndroidDriver(new URL(MobileConfig.url), cap);
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
return driver;
}
But it can't be run and result is:
java.lang.NullPointerException
How do I solve this?