Automate Android native applications by installing the apk file on your PC / without the need of a mobile phone






Problem: Need for automating an android application using Appium/Selenium but without emulators and without a mobile device

Solution:  Install android app inside chrome as an extension! hOW?

Prereq: Chrome 37+ for the solution to work!

How this works?
The App Runtime for Chrome (or ARC) is the piece of software that allows Android apps to run in Chrome. In the same way that ART (and the older Dalvik) currently run Android apps in Android itself.

What we will need?
  1. ARChon Custom Runtime: ARC is officially only designed for Chrome OS at the moment. To get around this, developer vladikoff created the ARChon Custom Runtime, which not only allows Windows, OS X, and Linux to run Android apps, but also removes the limit on how many can be run.
  2. Unpacked Extension: Extensions normally come from the Chrome Web Store or prepackaged in a .CRX file. For the purposes of Android apps, we're going to use unpacked extensions. These are folders that contain all the files for an extension (or, in this case, Android APK). They function the same as extensions, but are not wrapped up in a single file.
Let's automate:
  1. Install ARChon Runtime
    • Download the ARChon runtime here.
    • Unzip the archive.
    • Open your extensions page in Chrome by going to Menu > More Tools > Extensions
    • Enable Developer mode in the top right corner, if it is not already enabled.
    • Select "Load unpacked extension."
    • Choose the folder containing the ARChon runtime you unzipped earlier.
  2. Install Existing Android Apps
  3. Once you have a .zip file containing one of these modified APKs, here's how to install it:
    • Unzip the file and place the folder (likely named something like "com.twitter.android") in a place you can easily find.
    • Open the Extensions page in Chrome.
    • Click "Load unpacked extensions."
    • Select the folder with the modified APK you downloaded
  4. Automate using Appium/Selenium
You could also Repackage Your Own Android Apps for Chrome: 
Read this  Sources: http://lifehacker.com/how-to-run-android-apps-inside-chrome-on-any-desktop-op-1637564101

Comments

Post a Comment

Popular posts from this blog

Software Testing @ Microsoft

Trim / Remove spaces in Xpath?