• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Help clicking a web button with AppleScript without GUI scripting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help clicking a web button with AppleScript without GUI scripting


  • Subject: Help clicking a web button with AppleScript without GUI scripting
  • From: Joe <email@hidden>
  • Date: Fri, 6 Jun 2008 18:04:10 -0700

I have been trying to script Safari to fill in a web form and then simulate clicking the "submit" button.

I have managed to get the first part (fill in the form) done with 'do javascript' but clicking with javascript is eluding me.
Scripting the GUI to keystroke 'return' works OK but I wanted to avoid GUI scripting if possible.


What I have so far:

tell application "Safari"
activate
do JavaScript "document.forms[0].PASSWORD.value='mypassword'; document.pagepost.PASSWORD.focus();" in document 1
end tell
tell application "System Events" to keystroke return --this is the line I would like to change to javascript if possible


Has anyone tried this? Is it possible?

Joe
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: Help clicking a web button with AppleScript without GUI scripting
      • From: SVV Satyanarayana <email@hidden>
    • Re: Help clicking a web button with AppleScript without GUI scripting
      • From: "Mark J. Reed" <email@hidden>
  • Prev by Date: LIST DISKS results differ
  • Next by Date: Scripting Xcode
  • Previous by thread: LIST DISKS results differ
  • Next by thread: Re: Help clicking a web button with AppleScript without GUI scripting
  • Index(es):
    • Date
    • Thread