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 is a web browser and an Internet connection. The best part is that you don't need to install web-apps on the device. They are generally designed with cross-browser compatibility in mind.

Web apps on Android

We are going to take an example of the Google search page.

In this section, we are going to take a look at how to load the native browser on an emulator and then type data in the Google search box. Initially, we will get the native browser as shown in following screenshot:

Perform the following steps to load the native browser on an emulator and then type data in the Google search box:

  1. Update the desired capabilities in the setup() method to launch the native browser:

    caps.setCapability("avd","AVD_Nexus_4");// Mention the created AVD name
    caps.setCapability(MobileCapabilityType.BROWSER_NAME, "Browser");
  2. Now, we need to navigate to https://www.google.com using the following command:

    driver.get("https://www...
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