

If we talk about a command life-cycle, it goes like, Selenium webdriver picks a command form the code like (Element.click) and sends it in form of JSon via http request to the Appium server. In the above figure, we can see the architecture of the Appium in context to the iOS automation.

Appium utilizes these same libraries to automate iOS Apps. Apple provides this application called ‘instruments’ which is used to do lot activities like profiling, controlling and building iOS apps but it also has an automation component where we can write some commands in javascript which uses UIAutomation APIs to interact with the App UI.
#APPIUM SERVER DIAGRAM MAC#
On iOS, Appium proxies command to a UIAutomation script running in Mac Instruments environment. When using Appium, you want to use these client libraries instead of your regular WebDriver client. There are client libraries (in Java, Ruby, Python, PHP, JavaScript, and C#) which support Appium's extensions to the WebDriver protocol. It can be built and installed from source or installed directly from NPM.

See the capabilities doc for the complete list of capabilities available for Appium.Īppium is a server written in Node.js. Or we might set the safariAllowPopups capability to true in order to ensure that, during a Safari automation session, we're allowed to use JavaScript to open up new windows.
#APPIUM SERVER DIAGRAM ANDROID#
For example, we might set the platformName capability to iOS to tell Appium that we want an iOS session, rather than an Android one. There are also various capabilities which can modify the behavior of the server during automation. At this point the server will start up the automation session and respond with a session ID which is used for sending further commands.ĭesired capabilities are a set of keys and values (i.e., a map or hash) sent to the Appium server to tell the server what kind of automation session we're interested in starting up. Clients initiate a session with a server in ways specific to each library, but they all end up sending a POST /session request to the server, with a JSON object called the 'desired capabilities' object. We can put the server on a different machine than our tests are running on.Īutomation is always performed in the context of a session. The fact that we have a client/server architecture opens up a lot of possibilities: we can write our test code in any language that has a http client API, but it is easier to use one of the Appium client libraries. It receives connections from a client, listens for commands, executes those commands on a mobile device, and responds with an HTTP response representing the result of the command execution. Appium is at its heart a webserver that exposes a REST API.
