How to configure Appium
with android IDE & Eclipse
Appium ver.0.1
Mobile
Automation
Check your mobile – Setting - about device
To know your android version and api level check this URL
https://source.android.com/setup/start/build-numbers
and compare with version on your mobile go to setting / about
device to check that.
Setup Android-Studio
• Download from https://developer.android.com/studio/
• Follow the Screen shots to finish installation successfully on your machine
• Setup Steps :
1. Click on the android-studio-ide-171.4443003-windows.exe
2- Confirm installing of Android SDK and AVD
Setup Android-Studio
3- Accept the license to continue the installation.
Setup Android-Studio
4- Select the location of installation.
Setup Android-Studio
5- Create a new shortcut for Android Studio.
Setup Android-Studio
6- Leave the Start Android Studio check box checked to run this
software.
Setup Android-Studio
7- Import settings [Don’t Import any thing as there is no previous
versions on the machine]
Setup Android-Studio
8- Choose an installation type [Standard option is recommended].
Setup Android-Studio
9- Wait until it downloads and unzips Android Studio components.
Setup Android-Studio
10- Successfully Installed [Welcome to Android Studio ].
Setup Android-Studio
11- Create a new project as following : after creation you will found
some errors in gradle in android studio, you will fix them by
download some files on this project.
Setup Android-Studio
12- Target Android Devices : to select which device will test
it for example phone and tablet as image
Setup Android-Studio
13- Select an activity for example
Setup Android-Studio
14- Install Android Studio Components
Setup Android-Studio
15- Wait till Building App Gradle Project
Setup Android-Studio
16- Confirm that VT-x is enabled in BIOS as Intel HAXM is required to
run this AVD.
Setup Android-Studio
17 – Confirm the AVD Name as the following for example
Setup Android-Studio
Run Emulator from CMD
18- after finishing the configuration of Device and Android Build, we can run the
Emulator directly from CMD without need for the Android Studio Follow the steps:
• Make sure that Android Studio is closed
• Navigate to the Setup location and get the Emulator path, C:Users<User-
Name>AppDataLocalAndroidSdkemulator
• Run CMD
• Write the Command line :
[cd C:Users<UserName>AppDataLocalAndroidSdkemulator]  Click Enter
• Write the Command [emulator -avd <Device-Name>]  Click Enter
• Now Check that the emulator is running without run the Android Studio
• Drag and drop the required (.apk) on the running emulator to begin setup.
Run Appium Server
1. Download Appium version from [http://appium.io]
2. Click on Download Now, latest (1.5.0)
3. Select to Download the (.exe) version
4. Double click on the downloaded .exe
5. Wait till the installing is finished
6. Keep the settings as default, then Click on Start Server
7. Click on [Start Inspector Session] icon
8. Add Desired Capabilities, can click on link [Desired Capabilities
Documentation ] to check the required Capabilities.
Run Appium Server
9- add the following in the JSON Representation section :
{
"platformName": "Android",
"platformVersion": "8.0",
"deviceName": "PixelXL-API26",
"app": "T:AppuimMobileAppiumAPKsselendroid.apk"
}
• Check that values equal to the created emulator properties (which
created on Android Studio previously)
10- Click on Start Session button.
Run Appium Server
11- now check that the installed (.apk) is running on App Source
12- Locate the required elements to capture it’s properties such
(id, xpath, class name, …… etc).
13- open Eclipse IDE and create new project with new Package
(name it as Appium).
Run Appium Server
14- Create a new class with the following capabilities [same as defined on Appium
Server] :
public void openApplication() throws MalformedURLException
{
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("platformName", "Android");
caps.setCapability("platformVersion", "8.0");
caps.setCapability("deviceName", "PixelXL-API26");
caps.setCapability("app", "T:AppuimMobileAppiumAPKsselendroid.apk");
AndroidDriver<WebElement> driver = new AndroidDriver<WebElement>(new
URL("http://0.0.0.0:4723/wd/hub"), caps);
}
Run Appium Server
15- Now, run the code to make sure it connected to the specified
emulator.
Run Appium Server
START NOW WITH APPIUM

How to configure Appium with android IDE & eclipse

  • 1.
    How to configureAppium with android IDE & Eclipse Appium ver.0.1 Mobile Automation
  • 2.
    Check your mobile– Setting - about device To know your android version and api level check this URL https://source.android.com/setup/start/build-numbers and compare with version on your mobile go to setting / about device to check that.
  • 3.
    Setup Android-Studio • Downloadfrom https://developer.android.com/studio/ • Follow the Screen shots to finish installation successfully on your machine • Setup Steps : 1. Click on the android-studio-ide-171.4443003-windows.exe
  • 4.
    2- Confirm installingof Android SDK and AVD Setup Android-Studio
  • 5.
    3- Accept thelicense to continue the installation. Setup Android-Studio
  • 6.
    4- Select thelocation of installation. Setup Android-Studio
  • 7.
    5- Create anew shortcut for Android Studio. Setup Android-Studio
  • 8.
    6- Leave theStart Android Studio check box checked to run this software. Setup Android-Studio
  • 9.
    7- Import settings[Don’t Import any thing as there is no previous versions on the machine] Setup Android-Studio
  • 10.
    8- Choose aninstallation type [Standard option is recommended]. Setup Android-Studio
  • 11.
    9- Wait untilit downloads and unzips Android Studio components. Setup Android-Studio
  • 12.
    10- Successfully Installed[Welcome to Android Studio ]. Setup Android-Studio
  • 13.
    11- Create anew project as following : after creation you will found some errors in gradle in android studio, you will fix them by download some files on this project. Setup Android-Studio
  • 14.
    12- Target AndroidDevices : to select which device will test it for example phone and tablet as image Setup Android-Studio
  • 15.
    13- Select anactivity for example Setup Android-Studio
  • 16.
    14- Install AndroidStudio Components Setup Android-Studio
  • 17.
    15- Wait tillBuilding App Gradle Project Setup Android-Studio
  • 18.
    16- Confirm thatVT-x is enabled in BIOS as Intel HAXM is required to run this AVD. Setup Android-Studio
  • 19.
    17 – Confirmthe AVD Name as the following for example Setup Android-Studio
  • 20.
    Run Emulator fromCMD 18- after finishing the configuration of Device and Android Build, we can run the Emulator directly from CMD without need for the Android Studio Follow the steps: • Make sure that Android Studio is closed • Navigate to the Setup location and get the Emulator path, C:Users<User- Name>AppDataLocalAndroidSdkemulator • Run CMD • Write the Command line : [cd C:Users<UserName>AppDataLocalAndroidSdkemulator]  Click Enter • Write the Command [emulator -avd <Device-Name>]  Click Enter • Now Check that the emulator is running without run the Android Studio • Drag and drop the required (.apk) on the running emulator to begin setup.
  • 21.
    Run Appium Server 1.Download Appium version from [http://appium.io] 2. Click on Download Now, latest (1.5.0) 3. Select to Download the (.exe) version 4. Double click on the downloaded .exe 5. Wait till the installing is finished 6. Keep the settings as default, then Click on Start Server 7. Click on [Start Inspector Session] icon 8. Add Desired Capabilities, can click on link [Desired Capabilities Documentation ] to check the required Capabilities.
  • 22.
  • 23.
    9- add thefollowing in the JSON Representation section : { "platformName": "Android", "platformVersion": "8.0", "deviceName": "PixelXL-API26", "app": "T:AppuimMobileAppiumAPKsselendroid.apk" } • Check that values equal to the created emulator properties (which created on Android Studio previously) 10- Click on Start Session button. Run Appium Server
  • 24.
    11- now checkthat the installed (.apk) is running on App Source 12- Locate the required elements to capture it’s properties such (id, xpath, class name, …… etc). 13- open Eclipse IDE and create new project with new Package (name it as Appium). Run Appium Server
  • 25.
    14- Create anew class with the following capabilities [same as defined on Appium Server] : public void openApplication() throws MalformedURLException { DesiredCapabilities caps = new DesiredCapabilities(); caps.setCapability("platformName", "Android"); caps.setCapability("platformVersion", "8.0"); caps.setCapability("deviceName", "PixelXL-API26"); caps.setCapability("app", "T:AppuimMobileAppiumAPKsselendroid.apk"); AndroidDriver<WebElement> driver = new AndroidDriver<WebElement>(new URL("http://0.0.0.0:4723/wd/hub"), caps); } Run Appium Server
  • 26.
    15- Now, runthe code to make sure it connected to the specified emulator. Run Appium Server
  • 27.