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