0% found this document useful (0 votes)
47 views5 pages

ANDROID TRAINING Pre Requisites

This document provides instructions for setting up an environment for mobile app testing using Selenium and Appium. It includes downloading Java, Eclipse, Android Studio, Node.js, and Appium. It also provides steps for configuring environment variables and ensuring dependencies are installed by running Appium Doctor. Further steps include enabling developer options and USB debugging on Android devices, installing test apps, and using tools like scrcpy to mirror devices.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views5 pages

ANDROID TRAINING Pre Requisites

This document provides instructions for setting up an environment for mobile app testing using Selenium and Appium. It includes downloading Java, Eclipse, Android Studio, Node.js, and Appium. It also provides steps for configuring environment variables and ensuring dependencies are installed by running Appium Doctor. Further steps include enabling developer options and USB debugging on Android devices, installing test apps, and using tools like scrcpy to mirror devices.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

All the Candidates must be having knowledge/Experience about the Selenium Web

Automation

Windows Machine Installation


1. ## Java Download
https://www.oracle.com/java/technologies/downloads/

2. ## Eclipse Downloads
https://www.eclipse.org/downloads/

3. ## Download android Studio


https://developer.android.com/studio

**_NOTE:_**
We can also set up android SDK without android studio https://proandroiddev.com/how-to-setup-
android-sdk-without-android-studio-6d60d0f2812a

4. ## NodeJs
https://nodejs.org/en/download/

To check if node is installed properly - type in command prompt - npm

Node js can be installed in mac using home brew -


https://support.smartbear.com/testcomplete/docs/app-testing/mobile/device-cloud/configure-
appium/android-on-mac.html

5. ## Install appium desktop


https://github.com/appium/appium-desktop/releases/tag/v1.21.0

## Setting up environment variables:

Setup JAVA_HOME and PATH environment variable


- Windows - https://mkyong.com/java/how-to-set-java_home-on-windows-10/
- Linux - https://medium.com/@rohancbandara/install-openjdk-and-set-java-home-path-in-ubuntu-
2ce2bc3a8fb2
- Mac - https://mkyong.com/java/how-to-set-java_home-environment-variable-on-mac-os-x/
- Setup ANDROID_HOME environment variable with SDK location.

SDK location in windows - C:\Users\username\AppData\Local\Android\Sdk

Add following to Path variable


%ANDROID_HOME%\tools
%ANDROID_HOME%\platform-tools

6. Install Appium Doctor and check if All the set up working fine or not.
Execute the following commands on the command prompt
1. Install npm Package Tool (https://nodejs.org/en/download/)
2. npm install appium-doctor –g (Installation)
3. appium-doctor –android
No Errors should be displayed in the command prompt after executing the
above command.
Mac Machine Installation:
- Create the bash_profile file if not exists- https://redfinsolutions.com/blog/creating-bashprofile-
your-mac
- Open the file ~/.bash_profile using any editor example nano ~/.bash_profile and add the
environment variables.

export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk_folder/Contents/Home
export ANDROID_HOME=/Users/<username>/Library/Android/sdk
export PATH=$/Library/Java/JavaVirtualMachines/jdk_folder/Contents/Home/
bin:$PATH
export PATH="/Users/ <username> /Library/Android/sdk/platform-tools":$PATH

Run the command - ~/.bash_profile to save the settings added.

## Enable virtualization
Needed only for android emulator (windows):
- https://mashtips.com/enable-virtualization-windows-10/

## Install appium via node:


npm install -g appium
## Install appium doctor from command line
npm install appium-doctor -g

## Run appium doctor to confirm all appium dependencies are installed:


appium-doctor --android

## Android device side setting:


Enable developer options and USB debugging (https://developer.android.com/studio/debug/dev-
options )

## Appium Inspector App (only for appium 1.22 onwards - not to be used for this workshop)
https://github.com/appium/appium-inspector/releases

## Extract package name and activity name from the android app:
Command - adb shell “dumpsys activity activities | grep mResumedActivity”
Sample output:
mResumedActivity: ActivityRecord{f01a302 u0
com.ravendmaster.linearmqttdashboard/.activity.MainActivity t44804}

Package Name - com.ravendmaster.linearmqttdashboard


Activity name - .activity.MainActivity

## Install application (outside app store):


adb install app_path

## Mirror Android Phone to host pc/laptop:


https://github.com/Genymobile/scrcpy (Direct link -
https://github.com/Genymobile/scrcpy/releases/download/v1.19/scrcpy-win64-v1.19.zip)
https://www.vysor.io/

## Enable WebView debugging


- call the static method setWebContentsDebuggingEnabled on the WebView class. Details available
in
https://developer.chrome.com/docs/devtools/remote-debugging/webviews/

## Sample App Used for the workshop:


- https://github.com/cloudgrey-io/the-app/releases/download/v1.10.0/TheApp-v1.10.0.apk

You might also like