Introduction to Appium: An Open-Source Automation Testing Tool

Appium is an open-source automation testing tool that supports native applications, web applications, and hybrid applications on both the iOS and Android platforms.

Concepts in Appium:

Client/Server Architecture: Appium's core is a network server that exposes a publicly available REST API. It receives connections from clients, listens for commands, executes those commands on mobile devices, and presents the results of command execution as HTTP responses. The client/server architecture offers flexibility, allowing testers to write API test code with an HTTP client in any programming language. However, using the Appium client library makes the process more convenient. The server can be hosted on different machines for test execution, and cloud services like Sauce Labs and Lambda Test can be used to receive and analyze the test results.

Session: Automation is always performed within the context of a session. The client initiates a session with the server using a specific library. Ultimately, the session is ended by sending a POST /session request to the server, which includes a JSON object called desired capabilities. The server starts an automation session and returns a session ID, which can be used to send other commands.

Desired Capabilities: Desired capabilities are a collection of key-value pairs (e.g., map, hash) sent to the Appium server, informing it about the desired configuration for the automation test session. They provide a way to modify the server's behavior during automation. For example, setting the platformName to "ios" informs the Appium server that an iOS session is needed, rather than an Android or Windows session. Similarly, setting safariAllowPopups to true ensures that JavaScript can open new windows during Safari session automation. The Capabilities documentation provides information on the parameters supported by Appium.

Appium Components:

Appium Server: Appium Server is written in Node.js and can be built and installed from source code or installed directly via npm: $ npm install -g appium $ appium For beta versions of Appium, use npm install -g appium@beta. These versions are intended for developers and may contain modifications that could cause issues. To install a new version, uninstall appium@beta first using npm uninstall -g appium@beta.

Appium Client: There are several client libraries supporting the Appium extension of the WebDriver protocol, including Java, Ruby, Python, PHP, JavaScript, and C#. When using Appium, if you prefer to use these client libraries instead of standard WebDriver client libraries, refer to the documentation for the respective client library.

Appium Desktop: Appium Server also provides a GUI mode called Appium Desktop, which can be downloaded for various platforms. It bundles all the necessary software required for executing Appium Server and can assist in inspecting the hierarchy of an app. This can be helpful when writing tests.

What is Appium Inspector & How to Use It?

Appium Inspector is a graphical tool provided by Appium for viewing and editing Appium test scripts. It allows easy exploration of the element hierarchy of an application and helps locate elements for testing purposes.

How to use Appium Inspector:

Start the Appium Server (Appium Server acts as a web interface service implemented in Node.js).

Open Appium Inspector and select the connected device or emulator.

Click the "Start Session" button.

Wait for the application to launch.

Use Appium Inspector to view the element hierarchy of the application and utilize the "Inspect" tool to locate elements.

Edit the test script using the located elements for testing purposes.


Note: Appium Inspector is a visual tool and can be used on Windows or MacOS systems but not on Linux systems.


By following these steps and utilizing the capabilities of Appium and Appium Inspector, testers can efficiently automate their testing processes for native, web, and hybrid applications on iOS and Android platforms. With its client/server architecture and support for various programming languages, Appium offers flexibility and code reusability, making it a powerful open-source tool for automation testing.

However, it's important to note that learning and utilizing tools like Appium and Appium Inspector can be time-consuming and may require a significant investment in terms of learning curve and resources. If you are looking for a more efficient and faster way to automate your tests, you might want to consider exploring other automation tools like WeTest Automation. With it, you can easily create, execute, and manage test cases using a visual drag-and-drop interface.

Latest Posts
1Exploring Valuable Test Cases in the Android Official MVP Project: A Comprehensive Guide to Unit Tes This article serves as an appendix to "Interpreting the Unit Testing of the Android Official MVP Project". This MVP project and its unit testing cases can provide many insights for our work, so it is worth giving it a quick read.
2A Comprehensive Guide to XSS Attacks and Defenses This article provides a detailed introduction to XSS(Cross Site Scripting) vulnerability attacks and defenses, including vulnerability basics, XSS fundamentals, encoding basics, XSS Payload, and XSS attack defense.
3How to Make Your Go Program Run Faster? This article is about the Go language. It primarily focuses on runtime speed, rather than development speed – these two types of speed are distinct.
4Enhancing Mobile App Quality with Crowdsourced Testing: Benefits and Key Components In this article, we will explore the benefits of employing crowdsourcing for mobile app testing and discuss the key components that contribute to successful testing, including testing on different devices, languages, and locations.
5Video Game Testing: A Fun and Profitable Way to Make Money Playing Games In this article, we will explore various avenues through which you can potentially earn a substantial income by playing games, including creating guides, writing reviews, coaching and boosting, and game testing.