- Launch a manual session with the iOS simulator of your choice.
- In the manual session, open Safari (desktop). To do this:
- Click outside the simulator, activating Finder.
- Select File in the menu —> New Finder Window
- Select Applications —> Safari and open it
- Check to see if Develop is in the menu for Safari. If it isn't:
- Select Safari —> Preferences
- Go to the Advanced tab, and check the box at the bottom to turn ON the develop menu.
- Check to see if the web inspector is active for the iOS Simulator (it should be enabled by default):
- Select Settings (for iOS Simulator) —> Safari —> Advanced (scroll to the bottom of the settings page) —> Turn on web inspector.
- Select iOS Simulator —> Quit iOS Simulator. (Important)
- Re-launch the iOS Simulator. (This can usually be done from the Apple menu —> Recent Items)
- Open your webpage or web app in the iOS Simulator.
- In Safari, select Develop —> iOS Simulator —> yourpage.html
You should now see the same developer tools as though you were in Safari itself.
The reason the simulator needs to be relaunched is related to the debugging connection. Appium owns the connection at the start of the test, which prevents Safari from using it – this is why the webpage will appear grayed out if the simulator is not re-launched . When the simulator is re-launched, Appium no longer controls the connection, allowing Safari to connect to the debugger and select the webpage as expected.