9/10/16

Appium FAQ'S

1.What is Appium?
Appium is an open source tool which is useful in testing of Native Apps,Hybrid Apps and Mobile Web Apps.By using Appium you can automate Android ,IOS and Mobile Web applications
with the help of many languages.

2.What are the drivers supported in Appium?
Appium support two drivers to Automate the apps in different platforms,i.e Android driver and IOS Driver.

3.What are Native Apps?
Native apps which is developed by Android SDK and IOS platform ,for examples we are using daily purpose apps are What's Up,ICICI Direct,Google Duos(Video Calling).

4.What are Hybrid Apps?
Hybrid apps are web applications in the native browser,such as UIWebView and webView.Hybrid apps are developed using HTML,CSS and Javascript & then wrapped in a native applications using web content projects like PhoneGap,Cardova etc.

5.What are Mobile Web View apps?
Mobile Web view apps those are which is working in mobile borwser i.w Google Chrome in our Smart Phones,Safari browser in IPhone,For example Blogger,m.facebook.com etc apps.

6.Which languages supported by Appium to prepare Test Scripts in Selenium?
Appium supports 6 programming languages those are

1.Java
2.Ruby
3.JavaScript
4.C#
5.Python
6.PHP

The above mention languages it will support for creating Selenium Test scripts for Automate Mobile apps.

7.Appium pre requisite to use for Automation?
Appium pre requires before creating the test scripts for Mobile apps i.e

1.Android SDK Should be installed in your system
2.Java should be installed ,set up environment variables
3.Set up Enviroonment variables for Android SDK
4.Development Tool ex:Eclipse IDE
5.Selenium language Bindings
6.Appium for windows.exe file
7.Install node.js
8.Test Framework ex:Test NG
9.APK file which is install in your mobile/Emulator.

8.What are the Advantages of using Appium?
Appium provide flexibility to write tests against multiple mobile platforms.
APPIUM test scripts can run using any language(java,ruby,javascript,C#,Python and PHP) or test framework.
APPIUM is a open source automate mobile tool which is very easy to create the scripts and run the scripts in Mobile App,WebBrowser.

9.What are the limitations of Appium?
1.Appium will not support multiple session handling
2.Appium will not work lower than android version 4.2
3.Unable to run test scripts in Microsoft Windows platform.

10.Explain the architecture of Appium
When you download the Appium server i.e Appium.exe file it will automatically download Node.js where server code is written in Node.js.Appium is a client/Server architecture where it is a HTTP webserver where web server is a REST API which is written in Node.js language.When you implements the scripts in Selenium Webdriver,when you run the test script it will hit the Appium server ,from APPIUM server requests is sending to Mobile App/Emulators and it will works as your web app which is identify the elements with DOM .

REST API perform below steps
1.REST API receives connection from WebDriver Client
2.Listen Commands
3.Execute those commands in Mobile App/Emulators
4.it sends request status i.e Execution status to Client.

11.How you will configure APPIUM in Android platform?
1: Install Appium for windows(32 bit/64 bit)I.E Desktop client.
2:Install node.js
3:Install Microsoft .net
4:Install Android SDK
5:Set Up Java Environment Variables
6:Now Install Appium exe file
7:Install pda.net in desktop as well as Mobile Devices /Tablets

12.How you will configure APPIUM in IOS Platform?
Mac OS version should be Mac OSX 10.7+
1:Install Jdk,Set up Environment Variables
2:Install Appium for Mac OS
3:Install Node.js
4:Install XCode4.5 or Higher Version
5:Iphone Simulator SDK
6:Command line tools

13.What is Appium Inspector?
Appium inspector is a option in Appium which is displays in Appium server window and it is useful in identifying the elements in mobile app same like selenium ide to identify the elements in a webpage.In windows it will not work in windows platform.Note:Before running Appium server  just select Pre launch application check box in General Settings to get screen shot which is open in Mobile App.Appium Inspector which is used to record and playback the scripts.

14.What is UIAutomator?
UiAutomator comes with Android SDK package which is displays under tools folder I.E C:\Program Files (x86)\Android\android-sdk\tools Which is used to identify elements locators same as Selenium Locators id,name,css,linktext etc.UIAutomator is a tool which is used to inspect UI of an apps in order to find the layout hierarchy.While creating the script it is very useful in finding elements locators such as id and other attributes of an element.Element details displays in Node Details screen.

15.What are the requirements while writing the scripts in Appium?
Whlie preparing the Test Script for Mobile App in Appium ,we require below components those are

1.Driver Client:
Such as Android driver , IOS driver which is useful in sending requests to Appium server in order to run the test scripts for Mobile Applications.
2.Appium Session : 
In APPIUM all the commands are executed in the context of a Session.This session is useful in JSON objects call the capabilities in order to send same response with
the same session for sending further commands.
3.Desired Capabilities:
Desired Capabilities are commands which is sent by the Client to the Appium Server(WebDerver)  via REST application/JSON by generated APPIUM Session and some of the
desired capabilities are platformName,deviceName,platformVersion etc.

16.What is the default server and port number in APPIUM?
Appium default server address is 127.0.0.1
Appium default server port is :4723

17.Write Sample script to open app in Appium
//First Create DesiredCapabilities object
 DesiredCapabilities capabilities = new DesiredCapabilities();
//Now set Device Name
capabilities.setCapability("deviceName","pixelV1");
//Now set Browser name
capabilities.setCapability(capabilityType.BROWSER_NAME,"Android");
//Now set Platform
capabilities.setCapability("platform","Android");
//Nowset Android Version
capabilities.setCapability(capabilityType.VERSION,"6.0");
//Now Set app package
capabilities.setCapability("appPackage","com.oxigen.futurepay");
//Now set launch activity
capabilities.setCapability("appActivity","com.oxigen.futurepay.ui.activities.xxx");
//Now set URL to access the node server using Android Driver
driver = new AndroidDriver(new Url("http://127.0.0.1:4723/wb/hub"),capabilities);
driver.manage().timeouts().implicitlyWait(20,Timeunit.SECONDS);