tnhurst57 has asked for the wisdom of the Perl Monks concerning the following question:

How do you Click a cell in a table. I have tried every imaginable combination. Here is my latest version:

my $mytable = $ie->getTable("id:","SN_include"); my $HR = $mytable->tableCells(4, 4); my $CT = $HR->cellText; print "HR=$HR celltext=$CT\n"; $EL = Win32::IEAutomation::getElement($HR); print "EL=$EL\n"; Win32::IEAutomation::Element::Click($HR);

20071026 Janitored by Corion: Added formatting, code tags, as per Writeup Formatting Tips

Replies are listed 'Best First'.
Re: IEAutomation Cell Click
by TOD (Friar) on Oct 25, 2007 at 05:32 UTC
    that's a frontend problem and thus not a matter of perl, but of javascript and html.
    <script type="text/javascript"> function haveBeenClicked() { alert("Here we are!"); } </script> <table><tbody> <tr><td onclick="haveBeenClicked()">click me</td> </tr> </tbody></table>
    notice that the internet exploder insists on the <tbody> element (in case you want to modify the table structure via javascript).
    --------------------------------
    masses are the opiate for religion.
      Here is a cutout of the HTML - is there any way around it?
      <td Class=TabCell><a target=_new Class=NormalLink OnMouseOver=LinkOve +r() OnMouseOut=LinkOut() OnClick="MyDNetErrorTextWindow('DuvelHealthR +eport3.0', '14', '2823754', 'APM00043404730')"'> Health Report</a></t +d>

      20071025 Janitored by Corion: Added code tags, as per Writeup Formatting Tips