Skip to content

Instantly share code, notes, and snippets.

@jacobsalmela
Last active August 20, 2022 13:57
Show Gist options
  • Save jacobsalmela/ad72a786bc6b2607aa56 to your computer and use it in GitHub Desktop.
Save jacobsalmela/ad72a786bc6b2607aa56 to your computer and use it in GitHub Desktop.
Bookmark the current site
# Open real test site
killall Safari > /dev/null
osascript -e 'tell application "Safari"
activate
set the URL of the front document to "http://selfregister.testnav.com"
end tell'
sleep 10
# Bookmark site
osascript -e 'tell application "System Events"
tell process "Safari"
activate
set frontmost to true
keystroke "d" using command down
delay 1.0
keystroke return
end tell
end tell'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment