I am trying to find out if it is possible to start Safari to specific site and select Internet Explorer 8.0 as User Agent?
I am trying next code, it doesn’t work:
There is someting wrong in click line.
tell application “Safari” to activate
tell application “System Events”
tell process “Safari”
click menu item 10 of menu 2 of menu bar item 8 of menu bar 1
end tell
end tell
tell application "Safari" to activate
tell application "System Events"
tell process "Safari"
click menu item 13 of menu 1 of menu item 2 of menu 1 of menu bar item 8 of menu bar 1
end tell
end tell
This is the way. Remember submenus are contained by their menu item. The 13 might be a 10 though it was weird for me, I use the name way:
tell application "Safari" to activate
tell application "System Events"
tell process "Safari"
click menu item "Internet Explorer 8.0" of menu "User Agent" of menu item "User Agent" of menu "Develop" of menu bar item "Develop" of menu bar 1
end tell
end tell