Install prerequisite apk’s in your Appium Android Tests

When running an Android test, you can install an apk on your Android device/emulator using the app capability. But what if there is one or more other apk’s that you wish to install during that session?

With Appium 1.8, we’re introducing a new capability called otherApps which lets you specify one or more other apk’s to be installed alongside the main apk.

To install just one other apk:

driver.setCapability("otherApps", "/path/to/app.apk")

To install more than one other apk, provide a JSON array containing a list of apk’s:

driver.setCapability("otherApps", "[\"/path/to/app-a.apk\", \"/path/to/app-b.apk\"]")

This won’t work:

driver.setCapability("otherApps", "['/path/to/app-a.apk', '/path/to/app-b.apk']")

The otherApps capability expects a JSON array and "['/path/to/app-a.apk', '/path/to/app-b.apk']" is not valid JSON because it contains single quotes (visit https://jsonlint.com/ to learn about JSON and use their JSON validator)

31 Replies to “Install prerequisite apk’s in your Appium Android Tests”

  1. BEST PROGRAM FOR ADVERTISEMENT!

    XRumer is the best program for advertisement!
    It’s have CAPTCHA recognizer, email verificator, and a lot of other functions…

    This software will help to increase traffic to website to hundreds, thousands times.
    Program have a rich seven year history, which use experience of professionals in search engine optimization.
    Appreciate and use a truly unique and powerful XRumer program, can both professionals and beginners.
    MORE INFO=> https://bit.ly/39RzWR4

  2. YOU NEED POTENTIAL CUSTOMERS THAT BUY FROM YOU ?

    I’m talking about a better promotion method than all that exists on the market right now, even better than email marketing.
    Just like you received this message from me, this is exactly how you can promote your business or product.

    CLAIM YOUR FREE TEST=> https://bit.ly/Good_Promotion

  3. I WILL FIND POTENTIAL CUSTOMERS FOR YOU

    I’m talking about a better promotion method than all that exists on the market right now, even better than email marketing.
    Just like you received this message from me, this is exactly how you can promote your business or product.

    CLAIM YOUR TEST PERIOD => https://bit.ly/3hdwfaC

  4. All ED meds are claimed to cause headaches, indigestion, nasal congestion and, sometimes, dizziness.
    WOMEN’S VIAGRA PRANK LET’S MAKE IT WANT A LOT OF KIDS THAT WE MADE A HILARIOUS PRANK OVER GUY MORE.
    Learn how to get a regular parcel to your house for as little as $100.

  5. NOT SATISFIED WITH YOUR HOSTING ?

    Check Out Our Coupons for This Month & Get Your Domain, Hosting and SSLs For Less!
    Namecheap Offers Amazing Deals That Save You Money Across Our Product Range!
    Best Value Web Products. 20 Years Serving You. Free WhoisGuard. #1 for Value Vs. Others.

    Check Out Our Coupons for This Month => http://bit.ly/Our_Current_Deals

  6. The goal for treating Afib is to restore the regular rhythm
    of the heart, which can be done with medications or through
    the use of electrical stimulation. viagra samples The goal for
    treating Afib is to restore the regular rhythm of the heart, which can be
    done with medications or through the use of electrical stimulation.

  7. However, research has supported links between certain factors and the subsequent development of substance
    related problems. pfizer viagra However, research has supported links between certain factors and the subsequent development of substance related problems.

  8. This new way of living will provide new meaning and direction and those with rich participation in recovery will achieve freedom and serenity.
    genericviagrix.com This new way of living will provide new meaning
    and direction and those with rich participation in recovery will achieve
    freedom and serenity.

  9. Data integrity MEDgle processes personal information only for the purposes for which it was collected and in accordance with this Policy or any applicable
    service-specific privacy notice. how long does viagra last Data integrity MEDgle processes personal information only for the purposes for which it was collected and in accordance with this Policy or any applicable service-specific privacy notice.

Leave a Reply

Your email address will not be published. Required fields are marked *