youandhubris
3/30/2018 - 11:39 PM

Safari Login Giphy

# Safari Login Giphy

# Notes
# Since layouts change, today this may not apply. Regardless, logic stands still.

tell application "Safari"
	
	set the URL of the front document to "https://giphy.com/login/"
	delay 5
	
	tell application "System Events" to keystroke tab
	tell application "System Events" to keystroke tab
	# Mail / Username
	tell application "System Events" to keystroke "******@****.**"
	tell application "System Events" to keystroke tab
	# Password
	tell application "System Events" to keystroke "**************"
	tell application "System Events" to keystroke tab
	tell application "System Events" to keystroke return
	delay 5
	
	set the URL of the front document to "https://giphy.com/logout/"
	
	close window 1
end tell