DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workkloads.

Secure your stack and shape the future! Help dev teams across the globe navigate their software supply chain security challenges.

Releasing software shouldn't be stressful or risky. Learn how to leverage progressive delivery techniques to ensure safer deployments.

Avoid machine learning mistakes and boost model performance! Discover key ML patterns, anti-patterns, data strategies, and more.

  1. DZone
  2. Refcards
  3. Getting Started With Appium
refcard cover
Refcard #239

Getting Started With Appium

Mobile App Automation Made Awesome

In this Refcard, you will learn everything you need to know about getting started with this open-source tool, from installing the Appium server to running your first tests. Download this Refcard now to see why Appium is "Mobile App Automation Made Awesome."

Download Refcard
Free PDF for Easy Reference
refcard cover

Written By

author avatar Wim Selles
Staff Product Manager Mobile, Sauce Labs
author avatar Dave Haeffner
Author, Elemental Selenium
Table of Contents
► What is Appium? ► Interrogating Your App ► Commands and Operations ► Appium Service Providers
Section 1

What is Appium?

Appium is a free and open-source mobile automation framework used for native, hybrid, and mobile web apps. It works on iOS, Android, Mac, and Windows apps using the WebDriver protocol. WebDriver (the API to automate browsers, maintained by the Selenium project) is currently going through a W3C (World Wide Web Consortium) specification.


This is a preview of the Getting Started With Appium Refcard. To read the entire Refcard, please download the PDF from the link above.

Getting Started

In order to get up and running on your local machine, you need to download an Appium server and client bindings for your preferred programming language. There are Appium language bindings for multiple programming languages. The officially supported ones (in alphabetical order) are:

  • C# (.NET)
  • Java
  • JavaScript (Node.js)
  • Objective C
  • PHP
  • Python
  • Robot Framework
  • Ruby

Before we dive into installing all of the Appium dependencies, we are first going to look into the iOS and Android dependencies.


This is a preview of the Getting Started With Appium Refcard. To read the entire Refcard, please download the PDF from the link above.

Section 2

Interrogating Your App

Writing automated scripts to drive an app in Appium is very similar to how it's done in Selenium. You first need to choose a locator strategy. A locator is how you want to find an element. Then, you have the selector, which finds an element based on the provided search criteria.

Below, you will find a table with all available locator strategies for Selenium/Appium:

Locator strategy

From

Support in Appium

class name

Selenium

Yes

id

Selenium

Yes

name

Selenium

Yes

xpath

Selenium

Yes

accessibility id

Appium

Yes

-ios predicate string

Appium

Yes

-ios class chain

Appium

Yes

-android uiautomator

Appium

Yes

-ios uiautomation

Appium

Deprecated

css selector

Selenium

No/Yes*

link text

Selenium

No/Yes*

partial link text

Selenium

No/Yes*

tag name

Selenium

No/Yes*


This is a preview of the Getting Started With Appium Refcard. To read the entire Refcard, please download the PDF from the link above.

Section 3

Commands and Operations

The most common operations you'll end up doing in Appium are finding an element (or a set of elements) and performing actions with those elements (e.g. tap, type text, swipe, etc.). You can also ask questions about the elements (e.g. Is it displayed? Is it enabled? etc.), pull information out of the element (e.g. the text of an element or the text of a specific attribute within an element), or perform additional gestures.

Finding an Element

Java
 




xxxxxxxxxx
1


 
1
// The $ is a shorthand for browser. findElement('locator', 'selector') 
2
// Find 1 element const element = $('locator'); 
3

          
4
// The $$ is a shorthand for browser. findElements('locator', 'selector') 
5
// Find multiple elements with the same locator const elements = $$('locator');


Work With a Found Element

Java
 




xxxxxxxxxx
1


 
1
// Chain actions together $('locator').click(); 
2
// Store the element and then click it const element = $('locator'); element.click();



This is a preview of the Getting Started With Appium Refcard. To read the entire Refcard, please download the PDF from the link above.

Section 4

Appium Service Providers

Appium Service Providers Rather than take on the overhead of standing up and maintaining a test infrastructure, you can easily outsource these services to a third-party cloud provider like Sauce Labs. With Sauce Labs, you'll be able to get access to real devices as well as simulators and emulators.

Note: You'll need an account to use Sauce Labs. Their free trial offers enough to get you started. And if you're signing up because you want to test an open-source project, then be sure to check out their Open Sauce account.


This is a preview of the Getting Started With Appium Refcard. To read the entire Refcard, please download the PDF from the link above.

Like This Refcard? Read More From DZone

related article thumbnail

DZone Article

Comprehensive Guide to Property-Based Testing in Go: Principles and Implementation
related article thumbnail

DZone Article

AI-Based Threat Detection in Cloud Security
related article thumbnail

DZone Article

Is Agile Right for Every Project? When To Use It and When To Avoid It
related article thumbnail

DZone Article

Blue Skies Ahead: An AI Case Study on LLM Use for a Graph Theory Related Application
related refcard thumbnail

Free DZone Refcard

Getting Started With Low-Code Development
related refcard thumbnail

Free DZone Refcard

JavaScript Test Automation Frameworks
related refcard thumbnail

Free DZone Refcard

Salesforce Application Design
related refcard thumbnail

Free DZone Refcard

E-Commerce Development Essentials

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: