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

Finding elements for native and hybrid apps

There are multiple ways to find an element for native and hybrid apps, such as UIAutomatorviewer (for Android only) and Appium Inspector (for both Android and iOS). Let's start with the uiautomator.

Finding elements with UIAutomatorviewer

We can find the UIAutomatorviewer in the Android SDK folder C:\android-sdk\tools (assuming that the SDK located in the C drive); you can find the same in Mac as well under the tools folder, as shown in the following screenshot:

Finding elements with UIAutomatorviewer

To open uiautomatorviewer, you need to double-click on it. You will get the following screen:

Finding elements with UIAutomatorviewer

Now, we are going to take an example of finding an element of the Android app calculator. We need to perform the following steps:

  1. Open the Android emulator or real device (For a real device, we need to enable USB debugging).
  2. Open the calculator app.
  3. Now, click on the device's screenshot icon Finding elements with UIAutomatorviewer from the UI Automator Viewer window (The progress information box will be visible.). If more than...
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