How to configure local Android device for UiPath mobile automation ?
Follow steps below to configure local Android device for UiPath mobile automation:
- Install Node.js
- Install Appium
-
npm
install
-g appium
>
- Install Android Studio
- Check environment variable "ANDROID_HOME"
- It should point to "%localappdata%\Android\Sdk"
- If it is not set just set it manually
- Click on Configure → SDK Manager
- Uncheck 'Hide Obsolete Packages'
- Check 'Android SDK Tools (Obsolete)'
- Select 'Save & Install'
- Open the AVD Manager
- Click on 'Create Virtual Device'
- Select 'Pixel 3'
- Use 'Android 10.0 (Q)' as the 'System Image'
- Proceed with the suggested default settings
- Wait until the device creation process completes
- Click the play button to start the device
- Wait until you see the home screen in the Android Emulator
- Open the 'Play Store' app on the device
-
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.
- Open 'Settings'
- Go to 'Apps & Notifications'
- Click on 'See all apps'
- Click on 'Android System Webview'
- Select 'Advanced'
- Scroll down and save its version
-
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.
- Select the version that corresponds to the Android System Webview version from the previous step, and extract it to a folder.
Start Appium in the Command Prompt with the following parameters.
- Open Command Prompt and run the command below:
appium -p 10001 --default-capabilities "{\"systemPort\": 8201, \"udid\": \"emulator-5554\"}" --relaxed-security
|
- 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 |
- 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"
|