On Jul 8, 2010, at 6:51 PM, Bill Cheeseman wrote:
As far as I know, the only straightforward way to test it is to see whether it works. That usually involves discovering that some step further along in the script generates an unexpected result. So, examine the Web site to determine what change (if any) takes place when you click that UI element manually, then see whether you can add some statements to your script that test whether the change occurred.
Bill,
Thanks for your reply. Clicking the link manually, as I stated in my original post, works just fine. The change in Safari is that a new window opens with the page reformatted for printing.
Since this script worked before the weekend, but quit working after the weekend, I suspect that Fidelity changed their web page code for this menu over the weekend, thus breaking my script. I dumped the source of the page and isolated the code pertaining to this link. It looks like this:
<ul class="ofAuxLink ofAuxLinkElevated">
<li><a href="" >Download</a> | </li>
<li><a href="" title="Format for printing in new window">Format For Printing</a> | </li>
<li><a accesskey="6" href="">Help/Glossary</a></li>
</ul>
Clicking on the link (manually) is triggering a _javascript_ function via onclick. I suspect (but can't prove, since I don't have page source from before the weekend) that this used to be an actual link via href, which is why it worked before. I'm not sure how I can trigger this via Applescript. Obviously a click event isn't the same as an actual mousedown/mouseup event. More exploration is needed.
Jim