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
$17.99 $25.99
Paperback
$32.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

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 : 9781784399474
Languages :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Apr 09, 2015
Length: 188 pages
Edition : 1st
Language : English
ISBN-13 : 9781784399474
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 $5 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 $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 125.97
Appium Essentials
$32.99
Mastering Mobile Test Automation
$48.99
Mobile Test Automation with Appium
$43.99
Total $ 125.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

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.