Quick guide on Appium setup for windows

appium-setup-on-windowsIn this article, we will see basic setup of Appium, where we can run appium tests on mobile handset or tablet or mobile emulators

Refer below links to know the concept behind appium

Follow the below steps one by one to accomplish the appium setup…

Step1 : For the selenium setup

please refer selenium webDriver setup
[Above link describes, selenium with eclipse setup]

Step2 : Install Android SDK

http://developer.android.com/sdk/index.html#downloads
Open the above link and scroll down to the screen, chose the recommended option and install (select a folder to install)                        [screenshot]
andSDK
Once install done, you will get folder structure as below
andSDKFolders
Click on SDK Manager.exe, to install required packages
check the following options and click on install packages

  • Android SDK Platform-tools
  • Android SDK Build-tools
  • Respective Android API level (i.e which version of android OS running on your mobile)
    [e.g – Android 5.1.1 (API 22)]
    Scroll down to the below and check
  • Google USB driver

Set environmental variable: [How to : set Env variable]

Add environmental variable
variable name: ANDROID_HOME
value: c:MyFilesSeleniumAppiumAndroidSDKInstall

Edit environmental variable
variable name: path
value: ;C:MyFilesSeleniumAppiumAndroidSDKInstalltools; C:MyFilesSeleniumAppiumAndroidSDKInstallplatform-tools;

Step3 : Enable Developer options 

On mobiles or tablets
navigate to Settings > About / About phone
Scroll down and tap around 7 times on Build number
Confirmation popup comes with text “Developer mode has been enabled” or “you are now a developer”
Now come back to Settings, and you can see Developer options, turn ON this option.

Now connect mobile / tablet to the computer, you will see device shows “USB debugging connected”

Step4 : get device information by ADB commands

[Device can be mobile, tablet or emulators]
Connect device to computer in debug mode, open command prompt and type
adb devices : lists devices connected to computer
adbcmd

If in case, adb devices shows no result, better to use below troubleshooting steps:
type: adb kill-server and key press enter
then, adb start-server and key press enter
then try, adb devices [you should be able to see the device details now]

Note: From the above screenshot, adb devices have any one of the states
[Serial number] [state]
if device is connected, then state shows “device”,
if device is not connected properlly or not responding, then state shows “offline”
If no device connected, then result will be blank

Solution if adb command doesn’t work directly from start –> Run

Navigate to the platform-tools folder under AndroidSDKInstall folder, key press SHIFT and right click then select  “Open command prompt here”, now adb command should work.

reference https://developer.android.com/studio/command-line/adb.html

Step5 : Download Appium language bindings

We use java language to automate, so download appium-java jar file appiumjavaclient
go to: http://appium.io/downloads.html
S
elect language as, Java and download the jar file. [java-client-x.x.x.jar]

 

Step6 : Appium.exe for windows

Navigate to this link and download latest appium for windwos zip file
https://bitbucket.org/appium/appium.app/downloads
install AppiumForwindows and open the exe to get window as shown below sceeenshot

appiumdownload

Step7 : download and install node.js

Navigate to https://nodejs.org/en/download/
Select respective installer (32 or 64 bit) depending on your OS to download and install as usual way.
nodejs

 

Content posted is based on learning or working experience, Share the post with others if find useful, Any queries?, leave comments or discuss on our facebook:qavalidation.com, Thanks!

6 Responses

  1. June 7, 2016

    […] to download and install android SDK, follow this post ] Double click on SDK Manager.exe, (from AndroidSDKInstall folder), and install following […]

  2. June 7, 2016

    […] devices, for this we will be using UIAutomatorViewer tool. Before continuing further, please refer Appium setup for windows to get started with. (become easy to get started […]

  3. June 7, 2016

    […] proceeding to get the details, refer Appium setup for windows (Make sure you have Android SDK installed folder on your machine and environmental […]

  4. June 9, 2016

    […] Appium setup for windows [Mandatory to have the setup before proceeding] […]

  5. July 21, 2016

    […] Download and install appium.exe (refer step6 of appium setup) […]

  6. October 21, 2016

    […] To install Android SDK and enable USB debugging, Refer step 2 & 3 of Appium setup for windows. […]

Leave a Reply

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

%d bloggers like this: