PRESENTATION ON APPIUM
Prepared By:
Kamonasish Hore
21-Jul-16
APPIUM
What is Appium?
APPIUM is a freely distributed open source mobile application UI testing
framework.
Appium allows native, hybrid and web application testing and supports
automation test on physical devices as well as on emulator or simulator both.
Appium supports all languages that have Selenium client libraries like- Java,
Objective-C, JavaScript with node.js, PHP, Ruby, Python, C# etc.
Prerequisite for running Appium in Windows
• Android SDK - Link
• Java Development Kit (JDK) - Link
• TestNG - Link
• Eclipse - Link
• Selenium Server Jar - Link
• WebDriver Language Binding Library - Link
• APPIUM For Windows - Link
• APK App Info On Google Play - Link
• Node.js - Link
• Microsoft.Net Framework - Link
• Eclipse External Jars - Gson , SeleniumWebDriverClient(Java) , JavaClient
Appium Installation on Windows.
• Step 1- Install Java and Set Environment Variables.
a) Right click on ‘My Computer’ -> Click on Properties -> Advanced System Settings -> Advanced ->
Environment Variable -> System Variables -> Click on ‘New’
b) Add ‘Variable Name’ as “JAVA_HOME”
c) Set ‘Variable Value’ as “C:Program FilesJavajre1.8.0_91” - OK
d) Right click on ‘My Computer’ -> Click on Properties -> Advanced System Settings -> Advanced ->
Environment Variable -> System Variables -> Path -> Click on “Edit”
e) Add “; C:Program FilesJavajre1.8.0_91bin” -> Click Ok
• Step 2- Install Android SDK in your system and Set Environment Variables.
a) Right click on ‘My Computer’ -> Click on Properties -> Advanced System Settings -> Advanced ->
Environment Variable -> System Variables -> Click on ‘New’
b) Add ‘Variable Name’ as “ANDROID_HOME”
c) Set ‘Variable Value’ as “C:UsersdellAppDataLocalAndroidandroid-sdk”
d) Right click on ‘My Computer’ -> Click on Properties -> Advanced System Settings -> Advanced ->
Environment Variable -> System Variables -> Path -> Click on “Edit”
e) Add “;C:UsersdellAppDataLocalAndroidandroid-sdktools” -> Click Ok
f) Now add ‘platform-tools’ to the folder path.
g) Right click on ‘My Computer’ -> Click on Properties -> Advanced System Settings -> Advanced ->
Environment Variable -> System Variables -> Path -> Click on “Edit”
h) Add “; C:UsersdellAppDataLocalAndroidandroid-sdkplatform-tools” -> Click Ok
21-Jul-16
21-Jul-16
e) Open SDK Manager - “C:UsersdellAppDataLocalAndroidandroid-sdkSDK Manager.exe” – Click
OK and Install desired tools and desired Android Device Version.
• Step 3- Install Node.js
• Step 4 – Install Appium Desktop Client
• Step 5 - Enable Developer Mode in the phone and On the 'USB
Debugging' option
a) Open the device and in Settings go to “About Phone”
b) Tap on the ‘Build Number’ for seven times
c) Now a toaster appears as ‘You are now a Developer’
d) Go back and Click on ‘Developer Option’
e) Enable the ‘USB Debugging’
21-Jul-16
• Step 6 - Install Eclipse and set up a project.
a) Download and Install Eclipse.
b) Fig. 1, Select a location to save
and execute all the
compilation done in Eclipse.
c) Fig. 2, Select A Project (Type
Alt+Shieft+N) as Java Project.
d) Click ‘Next’
21-Jul-16
Fig. 1
Fig. 2 Fig. 3
21-Jul-16
Fig. 4
Fig. 6
Fig. 5
e) Fig. 4, Select a Package for the
Java Project.
f) Fig. 5, naming of the Java
Package
g) Fig. 6, Create a Class for the
java project.
h) Fig. 7, Landing page.
Fig. 7
Configuring Built Paths in Eclipse.
21-Jul-16
Fig. 8a Fig. 8b
Fig. 8c Fig. 8d
i) Fig. 8a, 8b, 8c, 8d describes
the flow of Configuring the
built paths in eclipse.
Appium Setup for an app.
• Appium should be installed in the PC.
• Open Appium.exe file
21-Jul-16
• On clicking in the Android button, it will list down the ‘Android
Settings’
• Select the apk path Package and Activity will auto filled or else you
can find the details of the apk from the ‘ApkInfo’ installed in he
device.
• Select desired Capabilities and Check for ‘No Reset’
21-Jul-16
• General Settings
• Developer Settings
21-Jul-16
21-Jul-16
How to find app package and app activity
• Install Apk Info from Google play
store into the device.
• Now open the app.
• Open the desired app for which
details is required.
• Press it for few seconds to view
the Detailed Information.
21-Jul-16
How to inspect elements in UI AutomartorViewer
1. Connect your device to computer.
2. Open Command prompt (Win+R, Type 'cmd' and Press 'Enter')
3. Type 'adb devices' in cmd and Press 'Enter'. It will list down the
device binary name of your device attatched.
4. Open a native app installed in your phone.
5. Browse to the android insatallation folder and open
UIAutomatorViewer.
(Location (in my machine):
C:UsersKamonasishAppDataLocalAndroidsdktoolsuiautomatorvi
ewer.bat)
6. Click on the 'Device Screenshot' to find the device image on the left
followed by a window with the detailed information of the tree nodes
in the right side and the properties information on the bottom right
side.
7. Now inspect each and every elements of the screen just by moving
the mouse
21-Jul-16
How to FindElement in Appium.
• In Fig. a, Elements can be located
as.
• In Fig. b, Elements can be located
as.
Fig. a
Fig. b
21-Jul-16
• In Fig. c, Elements can be located as.
Fig. c
21-Jul-16
Inspect elements of Mobile Web Application
Discovering devices in Chrome.
• Open Chrome browser in your desktop.
• Open Chrome Browser in device.
• Type an URL and Click ‘Open’. View in device, it re-directs to the page.
21-Jul-16
21-Jul-16
Note: Here I have explained about the installation of Appium. For live demo it’s available anytime in my cubicle.
Also for any queries feel happy to come to me for clarification.

APPIUM

  • 1.
    PRESENTATION ON APPIUM PreparedBy: Kamonasish Hore 21-Jul-16
  • 2.
    APPIUM What is Appium? APPIUMis a freely distributed open source mobile application UI testing framework. Appium allows native, hybrid and web application testing and supports automation test on physical devices as well as on emulator or simulator both. Appium supports all languages that have Selenium client libraries like- Java, Objective-C, JavaScript with node.js, PHP, Ruby, Python, C# etc.
  • 3.
    Prerequisite for runningAppium in Windows • Android SDK - Link • Java Development Kit (JDK) - Link • TestNG - Link • Eclipse - Link • Selenium Server Jar - Link • WebDriver Language Binding Library - Link • APPIUM For Windows - Link • APK App Info On Google Play - Link • Node.js - Link • Microsoft.Net Framework - Link • Eclipse External Jars - Gson , SeleniumWebDriverClient(Java) , JavaClient
  • 4.
    Appium Installation onWindows. • Step 1- Install Java and Set Environment Variables. a) Right click on ‘My Computer’ -> Click on Properties -> Advanced System Settings -> Advanced -> Environment Variable -> System Variables -> Click on ‘New’ b) Add ‘Variable Name’ as “JAVA_HOME” c) Set ‘Variable Value’ as “C:Program FilesJavajre1.8.0_91” - OK d) Right click on ‘My Computer’ -> Click on Properties -> Advanced System Settings -> Advanced -> Environment Variable -> System Variables -> Path -> Click on “Edit” e) Add “; C:Program FilesJavajre1.8.0_91bin” -> Click Ok
  • 5.
    • Step 2-Install Android SDK in your system and Set Environment Variables. a) Right click on ‘My Computer’ -> Click on Properties -> Advanced System Settings -> Advanced -> Environment Variable -> System Variables -> Click on ‘New’ b) Add ‘Variable Name’ as “ANDROID_HOME” c) Set ‘Variable Value’ as “C:UsersdellAppDataLocalAndroidandroid-sdk” d) Right click on ‘My Computer’ -> Click on Properties -> Advanced System Settings -> Advanced -> Environment Variable -> System Variables -> Path -> Click on “Edit” e) Add “;C:UsersdellAppDataLocalAndroidandroid-sdktools” -> Click Ok f) Now add ‘platform-tools’ to the folder path. g) Right click on ‘My Computer’ -> Click on Properties -> Advanced System Settings -> Advanced -> Environment Variable -> System Variables -> Path -> Click on “Edit” h) Add “; C:UsersdellAppDataLocalAndroidandroid-sdkplatform-tools” -> Click Ok 21-Jul-16
  • 6.
    21-Jul-16 e) Open SDKManager - “C:UsersdellAppDataLocalAndroidandroid-sdkSDK Manager.exe” – Click OK and Install desired tools and desired Android Device Version. • Step 3- Install Node.js • Step 4 – Install Appium Desktop Client
  • 7.
    • Step 5- Enable Developer Mode in the phone and On the 'USB Debugging' option a) Open the device and in Settings go to “About Phone” b) Tap on the ‘Build Number’ for seven times c) Now a toaster appears as ‘You are now a Developer’ d) Go back and Click on ‘Developer Option’ e) Enable the ‘USB Debugging’ 21-Jul-16
  • 8.
    • Step 6- Install Eclipse and set up a project. a) Download and Install Eclipse. b) Fig. 1, Select a location to save and execute all the compilation done in Eclipse. c) Fig. 2, Select A Project (Type Alt+Shieft+N) as Java Project. d) Click ‘Next’ 21-Jul-16 Fig. 1 Fig. 2 Fig. 3
  • 9.
    21-Jul-16 Fig. 4 Fig. 6 Fig.5 e) Fig. 4, Select a Package for the Java Project. f) Fig. 5, naming of the Java Package g) Fig. 6, Create a Class for the java project. h) Fig. 7, Landing page. Fig. 7
  • 10.
    Configuring Built Pathsin Eclipse. 21-Jul-16 Fig. 8a Fig. 8b Fig. 8c Fig. 8d i) Fig. 8a, 8b, 8c, 8d describes the flow of Configuring the built paths in eclipse.
  • 11.
    Appium Setup foran app. • Appium should be installed in the PC. • Open Appium.exe file 21-Jul-16
  • 12.
    • On clickingin the Android button, it will list down the ‘Android Settings’ • Select the apk path Package and Activity will auto filled or else you can find the details of the apk from the ‘ApkInfo’ installed in he device. • Select desired Capabilities and Check for ‘No Reset’ 21-Jul-16
  • 13.
    • General Settings •Developer Settings 21-Jul-16
  • 14.
    21-Jul-16 How to findapp package and app activity • Install Apk Info from Google play store into the device. • Now open the app. • Open the desired app for which details is required. • Press it for few seconds to view the Detailed Information.
  • 15.
    21-Jul-16 How to inspectelements in UI AutomartorViewer 1. Connect your device to computer. 2. Open Command prompt (Win+R, Type 'cmd' and Press 'Enter') 3. Type 'adb devices' in cmd and Press 'Enter'. It will list down the device binary name of your device attatched. 4. Open a native app installed in your phone. 5. Browse to the android insatallation folder and open UIAutomatorViewer. (Location (in my machine): C:UsersKamonasishAppDataLocalAndroidsdktoolsuiautomatorvi ewer.bat) 6. Click on the 'Device Screenshot' to find the device image on the left followed by a window with the detailed information of the tree nodes in the right side and the properties information on the bottom right side. 7. Now inspect each and every elements of the screen just by moving the mouse
  • 16.
    21-Jul-16 How to FindElementin Appium. • In Fig. a, Elements can be located as. • In Fig. b, Elements can be located as. Fig. a Fig. b
  • 17.
    21-Jul-16 • In Fig.c, Elements can be located as. Fig. c
  • 18.
    21-Jul-16 Inspect elements ofMobile Web Application Discovering devices in Chrome. • Open Chrome browser in your desktop.
  • 19.
    • Open ChromeBrowser in device. • Type an URL and Click ‘Open’. View in device, it re-directs to the page. 21-Jul-16
  • 20.
    21-Jul-16 Note: Here Ihave explained about the installation of Appium. For live demo it’s available anytime in my cubicle. Also for any queries feel happy to come to me for clarification.