I have downloaded the latest Appium Desktop to inspect the different elements for automating an app. I was able to launch the calculator app on my Android phone but was unable to launch an app that I have installed from the APK.

These are the variables that I have used to launch the apps on my phone :

  • You should check out the DesiredCapabilities for Appium. By reading the documentation and following the correct set of procedures, you will get it running in no time. – Mayank Gupta Jun 1 '17 at 8:41
  • You need to specify what happened - just mentioning unable to launch could mean a lot of things could go wrong. Did you get an error? Did the code execute without doing anything? Please edit the question with description of the issue – demouser123 Aug 1 '17 at 6:12

You could also share the code that you are using - like the setUp method - to be easier to detect what pieces are missing.

Just by looking at those variables, you're providing I could say that it would not hurt to pass also the platformVersion and the path to your local .apk file.

| improve this answer | |
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("automationName", "uiautomator2");
capabilities.setCapability("deviceName", deviceName);       
capabilities.setCapability("udid", udid);       
capabilities.setCapability("platformName", platformName);       
capabilities.setCapability("platformVersion", platformVersion);       
capabilities.setCapability("appPackage", "package");       
capabilities.setCapability("appActivity", appActivity); driver =       
Driver().setDriver(new AndroidDriver(new URL("" +      port + 
"/wd/hub"), capabilities));

This code should work !

| improve this answer | |

Make sure you have setup everything as explained in the official Appium website. Link to the page.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.