Skip to main content

Appium architecture (How Appium works internally)


Appium Architecture 

Appium is a cross-platform automation tool, API of it supports both OS (Android and iOS) test scripts.It is tested on simulators (iOS,), emulators (Android), and real devices (iOS, Android)  
Appium is an HTTP server written in Node.js that creates and handles WebDriver sessions.The Appium web server follows the same approach as the Selenium WebDriver, which receives HTTP requests from client libraries through JSON and then handles those requests in different ways
 JSON wire protocol
The JSON wire protocol (JSONWP) is a transport mechanism created by WebDriver developers. This wire protocol is a specific set of predefined, standardized endpoints exposed via a RESTful API.  
Appium implements the Mobile JSONWP, the extension to the Selenium JSONWP, and it controls the different mobile device behaviors, such as installing/uninstalling apps over the session
Let’s have a look at some of the endpoints from the API which are used to interact with mobile applications:
  • l /session/:sessionId
  • l /session/:sessionId/element
  • l /session/:sessionId/element 
  • l /session/:sessionId/element/:id/click
 Appium provides client libraries similar to WebDriver that act as an interface to the REST API. These libraries have functions similar to the following method:
AppiumDriver.getPageSource();

Appium on Android



On an Android device, Appium uses the UIAutomator framework to automate the apps. UIAutomator is a framework that is developed by the Android developers to test the Android user interface.
1. Appium client (C# or Java or python .etc) connects with Appium Server and communicate via JSON Wire Protocol
2. Appium Server then creates a automation session for the client and also checks the desired capabilities of client and connects with respective vendor-provided frameworks like UIAutomator.
3. UIAutomator will then communicate with bootstrap.jar which is running in Emulator/Real device for performing client operations
4. Here, bootstrap.jar plays the role of a TCP server, which we can use to send the test command in order to perform the action on the Android device using UIAutomator.

After the execution of the command, the client sends back the message to the Appium server with the log details of the executed command.

Appium on iOS


On an iOS device, Appium uses Apples UIAutomation API to interact with the UI elements. UIAutomation is a JavaScript library provided by Apple to write test scripts; Appium utilizes these same libraries to automate iOS apps.


1.Appium client (Java or Python) connects with Appium Server and communicate via JSON Wire Protocol.

2.Appium Server then creates a automation session for the client and also checks the desired capabilities of client and connects with respective vendor-provided framework like UIAutomation

3.UIAutomation will then communicate with bootstrap.js which is running in Simulator/Real device for performing client operations

4.Bootstrap.js will perform action on our AUT (Application Under Test)

After the execution of the command, the client sends back the message to the Appium server with the log details of the executed command.



 

 

Comments

  1. Great blog for the freshers. Its really useful and got many innovative ideas.
    Thanks for posting this information.
    selenium training in coimbatore
    best selenium training in coimbatore
    selenium course in coimbatore

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. https://www.kitsonlinetrainings.com/course/arc-sight-online-training
    https://kitsonlinetrainings.com/course/build-and-release-online-training
    https://www.kitsonlinetrainings.com/course/dell-bhoomi-online-training
    https://www.kitsonlinetrainings.com/course/dot-net-online-training

    ReplyDelete
  4. Nice Blog, When I was read this blog, I learnt new things & it’s truly have well stuff related to developing technology, Thank you for sharing this blog. Need to learn software testing companies, please share. It is very useful who is looking for Smart test automation platform

    ReplyDelete
  5. you blog is very useful SAP bods learners.very informative content and detailed topic explanation.one of the recommanded content.we are very glad to leave a comment here.thank you for sharing your knowledge.also visit our blogs
    Appium Training in Bangalore

    ReplyDelete

Post a Comment

Popular posts from this blog

Handle radio button & Check Boxes in Selenium

The main difference between Radio button and Checkbox is that, using radio button we will be able to select only one option from the options available. whereas using checkbox, we can select multiple options. Selenium WebDriver supports Radio Button and Radio Group controls using the WebElement class. We can select and deselect the radio buttons using the click() method of the WebElement class and check whether a radio button is selected or deselected using the isSelected() method. Before performing the click on the Radio buttons or check boxes we will have to verify follwing scenarios :- If Radio button or Checkbox is displayed on the webpage If Radio button or Checkbox is enabled on the webpage Check the default selection of the Radio button or Checkbox We use predefined methods present in selenium to handle check Box and Radio  button :- isDisplayed() isEnabled() isSelected() 1.  isDisplayed () this method returns a Boolean value, if it returns t

How To Send Report In Mail Using Java In Selenium Web driver

Today we will share code how to send any type of selenium report in mail using java. For sending the email using JavaMail API, you need to load the two jar files: mail.jar activation.jar package SeleniumNew; import java.util.Properties; import javax.activation.DataHandler; import javax.activation.DataSource; import javax.activation.FileDataSource; import javax.mail.*;  import javax.mail.internet.*;  public class SendEmail {     public static void main(String[] args)     {                 String host="smtp.gmail.com";          final String user="ashishxx@gmail.com";//change accordingly          final String password="XXX";//change accordingly                    /*String[] to={"AshishXX@gmail.com","Ashishxxx@gmail.com"};           String[] cc={};           String[] bcc={};         */           String to="ashishxx@gmail.com";//change accordingly                     //Get the session object            Properties props = new