• 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
Re: Help clicking a web button with AppleScript without GUI scripting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help clicking a web button with AppleScript without GUI scripting


  • Subject: Re: Help clicking a web button with AppleScript without GUI scripting
  • From: "Mark J. Reed" <email@hidden>
  • Date: Mon, 9 Jun 2008 10:21:02 -0400

If you have any control over the HTML (as opposed to running
Javascript locally on someone else's HTML), the most reliable way of
addressing individual elements is to give them unique ID attributes
and use the document.getElementById() method, e.g.

<form id="login_form" method="post" action="https://my.site/log/me/in";>
 <input id="username1" name="username" type="text" />
 <input id="password1" name="password" type="text" />
...
</form>

Then you can get at the Form object via the call (
document.getElementById('login_form') ), even if new forms are added
earlier in the page.  You can get to the Input fields either via the
form ( document.getElementById('login_form').username ) or directly by
their own identifiers ( document.getElementById('username1') ).
 _______________________________________________
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>
References: 
 >Help clicking a web button with AppleScript without GUI scripting (From: Joe <email@hidden>)
 >Re: Help clicking a web button with AppleScript without GUI scripting (From: SVV Satyanarayana <email@hidden>)

  • Prev by Date: Re: Newbie Question...
  • Next by Date: RE: Newbie Question...
  • Previous by thread: Re: Help clicking a web button with AppleScript without GUI scripting
  • Next by thread: Re: Help clicking a web button with AppleScript without GUI scripting
  • Index(es):
    • Date
    • Thread