Re: Help clicking a web button with AppleScript without GUI scripting
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