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
Arrow up icon
GO TO TOP
Appium Essentials

You're reading from   Appium Essentials Explore mobile automation with Appium and discover new ways to test native, web, and hybrid applications

Arrow left icon
Product type Paperback
Published in Apr 2015
Publisher
ISBN-13 9781784392482
Length 188 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Working with web apps


Web apps can be run on any device or platform. The only requirement for running them is a web browser and an Internet connection; the best part is that you don't need to install the app on the device. Web apps are generally designed with cross-browser compatibility.

Web apps on Android

We will take the example of the Gmail login page. In this section, we are going to take a look at how to load the Chrome browser on a real device and then type in invalid credentials and click on the Sign in button that is shown in the following screenshot:

Let's start with the following steps to automate the web apps:

  1. Set the desired capabilities to launch the Chrome browser:

    caps.setCapability(MobileCapabilityType.BROWSER_NAME, "Chrome");
  2. Now, we need to navigate to https://www.gmail.com using the driver.get("https://www.gmail.com"); command.

  3. We need to find the username box element (we can take a reference from Chapter 4, Finding Elements with Different Locators, to find an element); in this...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime