Failing to Launch Android App via testing.xml parameters

Hello :slight_smile: ,

I’m failing to launch Android App using testing.xml parameters.
I’m probably doing something wrong but I can’t figure out what …

My code is looking like this:
try {
client.launch((String) testParams.get(ā€œAppPackageā€), false, true);
client.launch((String) testParams.get(ā€œAppActivityā€), false, true);
} catch (ClassCastException ignored) {
}

My Testng.xml is looking like this:
parameter name=ā€œAppPackageā€ value="com.MyAppPackage"
parameter name=ā€œAppActivityā€ value=".MyAppActivity"

When trying to Run a test also via Testng.xml I’m getting this error:

org.openqa.selenium.WebDriverException: javascript error (javascript error. An unknown server-side error occurred. status=ā€˜false’. Failed to complete internal method: ā€˜launch args: [com.MyAppPackage, false, true]’, details: Failed to launch activity / URL. Launch failed, please verify that the application is installed on the device) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 55.99 seconds

Hi Liran

The launch command is used with AppPackage + ā€œ/ā€ + Activity
I also changed the instrument parameter for true

e.g -

try {
client.launch((String) testParams.get("AppPackage") + "/" + (String) testParams.get("AppActivity"), true, true);
} catch (ClassCastException ignored) {
}

My Testng.xml is looking like this:
parameter name="AppPackage" value="com.MyAppPackage"
parameter name="AppActivity" value=".MyAppActivity"