Skip to content

Instantly share code, notes, and snippets.

@mniebling
Created June 20, 2014 16:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mniebling/5c309ebc796106e51db7 to your computer and use it in GitHub Desktop.
Save mniebling/5c309ebc796106e51db7 to your computer and use it in GitHub Desktop.
Open Safari's Dev Tools and attach to running iOS Simulator
tell application "Safari" to activate
tell application "System Events"
tell process "Safari"
click menu item "index.html" in menu "iPhone Simulator" of menu item "iPhone Simulator" in menu "Develop" of menu bar item "Develop" in menu bar 1
end tell
end tell
@dantaylor
Copy link

I could not make that one work, but here is what did it for me besides using "iPad Simulator" instead of iPhone:
tell application "Safari" to activate
tell application "System Events" to tell process "Safari"
tell menu bar 1
tell menu bar item "Develop"
tell menu "Develop"
tell menu item "iPad Simulator"
tell menu "iPad Simulator"
click menu item "index.html"
end tell
end tell
end tell
end tell
end tell
end tell

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment