3

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 :

  "platformName":
  "deviceName": 
  "appPackage":
  "appActivity": 
2
  • 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. Jun 1, 2017 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 Aug 1, 2017 at 6:12

3 Answers 3

1

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.

0
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("http://127.0.0.1:" +      port + 
"/wd/hub"), capabilities));

This code should work !

0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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