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 iOS web-based apps using Safari's Develop option

Safari comes with a built-in solution for finding the elements for web apps, but we need to perform the following steps in order to set up the device for remote debugging:

  1. Navigate to Settings | Safari | Advanced:
    Finding elements for iOS web-based apps using Safari's Develop option
  2. Then, turn on Web Inspector:
    Finding elements for iOS web-based apps using Safari's Develop option
  3. Open the Safari browser on your device/simulator and navigate to the desired URL (we are navigating to www.google.com).
  4. Now, go to your Mac Safari browser, click on the Develop option from the menu, select the device/simulator (assuming that the device is connected to your Mac), and click on the URL:
    Finding elements for iOS web-based apps using Safari's Develop option
  5. Now you will get the following screen with the HTML source code:
    Finding elements for iOS web-based apps using Safari's Develop option

Now, we can easily inspect elements with Safari DevTools.

Finding elements by ID

To interact with the web page, first we need to find an element on the page. All the functions of the Appium client library need an element to perform the actions on the web page.

Finding an element by ID is used to locate only one element in the...

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