iOS Mobile Web Automation- Safari Develop plugin for finding elements on Mobile Web

In my previous blog i have talked about how to find mobile web elements on android using chrome ADB plugin. In this blog we will learn how to find mobile web elements using Safari Developer Plugin.

Follow below steps to use Safari plugin to find Mobile Web elements:

  1. Mobile Safari: On your iOS simulator go to “Settings > Safari > Advanced” and turn on “Web Inspector”.1.png
  2. Desktop Safari: In menu bar click “Safari > Preferences > Advanced” and select the “Show develop menu in menu bar” checkbox.2.png
  3. Now we need to check if we can see “Develop” in the menu bar on Safari.3.png
  4. If We can see the Develop option in the Menu, we need to check if we see our iOS simulator or iPhone in the Develop option or not.4.png
  5. Now open Safari on Simulator and open google.com5.png
  6. On Desktop Safari, Go to Develop options and choose the iOS Simulator and click on “>” arrow. Select “google.com”
  7. Now Safari’s web inspector will open and can we used to find elements.6.png
  8. Now, we are going to find the ID of an element using Safari plugin. Here we are taking an example of Google search page.
    1. Navigate to https://www.google.com on your mobile safari browser.
    2. Open Safari inspector and click Inspect button.
    3. Open Simulator and on Mobile Safari click on the element you want to use locator for.
    4. Locator of that element will be highlighted in Safari Inspector.

7.png

8.png

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s