Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Appium Essentials

You're reading from  Appium Essentials

Product type Book
Published in Apr 2015
Publisher
ISBN-13 9781784392482
Pages 188 pages
Edition 1st Edition
Languages

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:

  2. Then, turn on Web Inspector:

  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:

  5. Now you will get the following screen with the HTML source code:

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 mobile...

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 $15.99/month. Cancel anytime}