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:
Navigate to Settings | Safari | Advanced:
Then, turn on Web Inspector:
Open the Safari browser on your device/simulator and navigate to the desired URL (we are navigating to www.google.com).
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:
Now you will get the following screen with the HTML source code:
Now, we can easily inspect elements with Safari DevTools.