Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Appium Essentials
Appium Essentials

Appium Essentials: Explore mobile automation with Appium and discover new ways to test native, web, and hybrid applications

eBook
Mex$378.99 Mex$541.99
Paperback
Mex$676.99
Subscription
Free Trial

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Appium Essentials

Chapter 2. Getting Started with Appium

Today, a lot is going on in the field of mobile development, and we need to test these developments to meet the expectations of the end users. It is this progress that has contributed to the growth of mobile automation. Dan Cuellar came up with a brilliant idea that involved integrating the tool with Selenium, post which he created Appium. Appium is a good tool and is widely used to automate mobile apps. The best part is that it is open source.

In this chapter, we will learn the following:

  • The advantages of Appium
  • System requirements for Android/iOS
  • Installing different software
  • Creating emulators and simulators
  • Setting up an Eclipse Java project

Appium – pros and cons

Appium is an open source tool for automating mobile apps, such as native, web-based, and hybrid applications designed for the Android, iOS, and Firefox OS platforms.

Before diving into Appium's advantages, let's discuss its shortcomings, as follows:

  • No direct support for Android Alert Handling: Alert handling is not implemented yet for native apps via Alert API but, we have an alternative to handle it which we will see in Chapter 7, Advanced User Interactions. Hopefully, alert handling will be implemented soon.
  • Limited support for Android versions: Appium directly supports Android Version 17 or later, but if we want to work with versions older than version 17, then we can use the integrated tool Selendroid.
  • Lack of image recognition: We can't locate images; to work with images, we have to work with screen coordinates, which is not the best way but again it's in their road map to apply the locator strategy to find images.
  • Mobile gestures support...

System requirements for Android/iOS

We have read about Appium; now, it's time to know about the system requirements for Android/iOS.

Android requirements on Windows and Mac

The following are the system requirements for Appium on Android:

  • Java (version 7 or later)
  • Android SDK API (version 17 or later)
  • Android Virtual Device (AVD) or real device

iOS requirements

These are the system requirements for iOS devices to start with Appium:

  • Mac OS X 10.7 or later
  • Xcode (greater than or equal to 4.6.3; 5.1 is recommended) with the command-line build tool
  • Java version 7 or later
  • Homebrew
  • Node and npm

In the following section, we will look at how to install different software.

Installing different software

To get started with Appium, we need to install some software on our machines. Let's start the installation process on different machines.

Appium installation for Android

The prerequisites for the installation of Appium on Android are as follows:

  • JDK (Java development kit)
  • Android SDK (Software development kit)
  • Appium for different OSes

Installing JDK on Windows

In order to install the JDK, you can visit http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html.

After installing the JDK, you need to set the environment variables. To do this, perform the following steps:

  1. Open System Properties by pressing the Windows logo + Pause key or right-click on My Computer and then click on Properties.
  2. Click on Advanced system settings.
  3. Click on Environment Variables.
  4. Under User variables, click on New. Then, you will get the following screenshot:
    Installing JDK on Windows
  5. Enter the Variable name as JAVA_HOME.
  6. Enter the Variable value as the installation path for the JDK, for example...

Creating emulators and simulators

We'll now look at how we can create emulators and simulators, starting with an iOS simulator and then move on to an Android simulator.

An iOS simulator

We don't need to create a simulator for Mac; it already comes with Xcode under developer tools. When you start the Appium server for the first time, it will prompt you to authorize the use of Instruments, or if you are running it from npm, run sudo authorize_ios to work with the simulator.

An Android emulator

There are two ways to create an AVD for testing android apps:

  • Create the AVD from the command line
  • Create the AVD using the AVD Manager

Let's create AVD using the command line, as follows:

  1. Open the Command Prompt and type android list targets; this will generate a list of available targets.
  2. Run android create avd –n <name of the AVD> -t <targetID which you can get from the first step> --abi <again you can get it from first step>.

Note

You can also customize the AVD with...

Setting up an Eclipse Java project

We need an integrated development environment (IDE) to write test scripts; in the market, there are a lot of open source IDE's such as Eclipse, NetBeans, IntelliJ IDEA, and others. Here we are going to use an Eclipse IDE. If you have downloaded the Android ADT bundle, then you will get Eclipse along with it. Otherwise, you can download it from http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/lunasr1a.

Once you have downloaded the IDE, launch it by double-clicking on the eclipse.exe icon.

After this, you need to perform the following steps to set up the Java project:

  1. After clicking on the icon, it will ask you for a Workspace location. Enter the location and click on the OK button, as shown here:
    Setting up an Eclipse Java project
  2. Click on the Workbench icon on the welcome screen, which is at the top-right corner of the screen.
  3. Create a new project by clicking on the shortcut icon; you can also do this by navigating to File | New | Project. A dialog box will appear...

Appium – pros and cons


Appium is an open source tool for automating mobile apps, such as native, web-based, and hybrid applications designed for the Android, iOS, and Firefox OS platforms.

Before diving into Appium's advantages, let's discuss its shortcomings, as follows:

  • No direct support for Android Alert Handling: Alert handling is not implemented yet for native apps via Alert API but, we have an alternative to handle it which we will see in Chapter 7, Advanced User Interactions. Hopefully, alert handling will be implemented soon.

  • Limited support for Android versions: Appium directly supports Android Version 17 or later, but if we want to work with versions older than version 17, then we can use the integrated tool Selendroid.

  • Lack of image recognition: We can't locate images; to work with images, we have to work with screen coordinates, which is not the best way but again it's in their road map to apply the locator strategy to find images.

  • Mobile gestures support: Some of the gesture...

Left arrow icon Right arrow icon

Description

This book is intended for automation testers and developers who want to enhance their skills from web-based automation to mobile application automation using Appium. Basic knowledge of mobile application testing, Selenium WebDriver, and programming is assumed.

Who is this book for?

This book is intended for automation testers and developers who want to enhance their skills from web-based automation to mobile application automation using Appium. Basic knowledge of mobile application testing, Selenium WebDriver, and programming is assumed.

What you will learn

  • Understand the desired capabilities that need to be acquired before starting Appium
  • Get to know and use the settings that are required to automate mobile applications
  • Interact with mobile applications by identifying elements using different locator strategies and techniques
  • Install mobile apps onto an emulator/simulator or a real device using Appium scripts
  • Test scripts written to automate applications
  • Configure mobile devices and perform automation testing on them
  • Explore the advanced features of Appium such as scroll, zoom, and swipe

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Apr 09, 2015
Length: 188 pages
Edition : 1st
Language : English
ISBN-13 : 9781784392482
Languages :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Apr 09, 2015
Length: 188 pages
Edition : 1st
Language : English
ISBN-13 : 9781784392482
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just Mex$85 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just Mex$85 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total Mex$ 2,584.97
Appium Essentials
Mex$676.99
Mastering Mobile Test Automation
Mex$1004.99
Mobile Test Automation with Appium
Mex$902.99
Total Mex$ 2,584.97 Stars icon

Table of Contents

8 Chapters
1. Appium – Important Conceptual Background Chevron down icon Chevron up icon
2. Getting Started with Appium Chevron down icon Chevron up icon
3. The Appium GUI Chevron down icon Chevron up icon
4. Finding Elements with Different Locators Chevron down icon Chevron up icon
5. Working with Appium Chevron down icon Chevron up icon
6. Driving Appium on Real Devices Chevron down icon Chevron up icon
7. Advanced User Interactions Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.5
(19 Ratings)
5 star 47.4%
4 star 10.5%
3 star 5.3%
2 star 15.8%
1 star 21.1%
Filter icon Filter
Top Reviews

Filter reviews by




Jitendra Kumar Jul 20, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This is very good help for beginners in mobile automation testing .Author has started from the basics & the book has been written in a good way to cover all that which requires to run Appium.
Amazon Verified review Amazon
Ajay Mar 22, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Good Book for beginners
Amazon Verified review Amazon
Ram Jul 18, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Very effective for beginners,covers most advanced topics in Appium.its a quick reference for anyone who's working on Appium automation.Author has described everything from basic to advance , I admire the author’s approach towards explaining the concepts .I would very much recommend this book for all the Appium users!
Amazon Verified review Amazon
megha sapra Jul 20, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Easy understandable.Described each and every concept thoroughly.Good book for mobile tester. Appium Essentials
Amazon Verified review Amazon
liyiwan Mar 02, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
even i haven't saw it,but it maybe good for us!
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.