How To Configure Local Android Device For UiPath Mobile Automation?

How to configure local Android device for UiPath mobile automation ?

Follow steps below to configure local Android device for UiPath mobile automation:

  1. Install Node.js
  2. Install Appium
  • npm install -g appium

    >

  1. Install Android Studio
  2. Check environment variable "ANDROID_HOME"
  3. It should point to "%localappdata%\Android\Sdk"
  4. If it is not set just set it manually
  5. Click on Configure → SDK Manager
  6. Uncheck 'Hide Obsolete Packages'
  7. Check 'Android SDK Tools (Obsolete)'
  8. Select 'Save & Install'


  9. Open the AVD Manager


  10. Click on 'Create Virtual Device'
  11. Select 'Pixel 3'
  12. Use 'Android 10.0 (Q)' as the 'System Image'
  13. Proceed with the suggested default settings
  14. Wait until the device creation process completes
  15. Click the play button to start the device
  16. Wait until you see the home screen in the Android Emulator
  17. Open the 'Play Store' app on the device
  18. Wait until it completes updating all Google apps

    Note.


    You might encounter a buggy version of the Google Phone Emulator. In this case the updates menu will be stuck the first time a device is created and powered up.

    Follow these steps if nothing happens after 5 to 10 minutes.

    • Cancel Updates
    • Goto Context Menu ("Three Dots")
    • Select Updates
    • Update Each App Manually

Follow the steps below to automate hybrid & web apps running on Android.

  1. Open 'Settings'
  2. Go to 'Apps & Notifications'
  3. Click on 'See all apps'
  4. Click on 'Android System Webview'
  5. Select 'Advanced'
  6. Scroll down and save its version
  7. Download ChromeDriver

    Note: Consider this during download and installation.

    • Select the version that corresponds to the Android System Webview version from the previous step, and extract it to a folder.
    • Look for an exact match for the version (major.minor.patch.revision).
    • In case an exact match is not available, use the latest major version of ChromeDriver that matches the major version of the Android System Webview.
    • To automate the Chrome app, perform the same steps from above and keep note of the Chrome version instead.

Start Appium in the Command Prompt with the following parameters.

  1. Open Command Prompt and run the command below:
appium -p 10001 --default-capabilities "{\"systemPort\": 8201, \"udid\": \"emulator-5554\"}" --relaxed-security
  1. When automating hybrid & web apps, you should also add # When automating hybrid & web apps add the below text to the command above:
--allow-insecure chromedriver_autodownload
  1. If for some reason the auto-download fails, you can add this to the above command instead, to point it to an already downloaded chromedriver.exe (replace path_to_chromedriver with your local path):
--chromedriver-executable "path_to_chromedriver"
1 Like