I have a script that accesses our website, hosted by a 3rd party. I am using Mechanize::Firefox. The script proceeds successfully thru each screen, entering some data into fields, and clicking a button to go to the next screen. Finally, I arrive at the last screen which is a table, built by javascript, that contains multiple rows of items, any of which can be clicked on to get the detail screen for that item. My problem is I don't know how to click on a table item.

here is the snapshot of the Firebug window:

<table id="tbListResults" width="100%" cellspacing="0" cellpadding="0" + border="0"> <tbody> <tr> <td id="tdList" style="height: auto"> <table width="100%" cellspacing="0" cellpadding="2" border="0"> <tbody> <tr> <tr class="listitem"> <td onclick="selectListItem(3348956)"> <b>CC026836</b> </td> <td onclick="selectListItem(3348956)"> <td onclick="selectListItem(3348956)"> <td onclick="selectListItem(3348956)">TSX/TECHNOLOGY PKG NAVIGATION SU +NROOF LEATHER HEATED SEATS REAR CAMERA ALL POWE</td> <td onclick="selectListItem(3348956)">Basque Red Pearl</td> <td onclick="selectListItem(3348956)">JH4CU2F62CC026836</td> <td onclick="selectListItem(3348956)">Certified Autoplex(27)</td> <td onclick="selectListItem(3348956)">Available</td> <td align="right" onclick="selectListItem(3348956)">$21,996.00</td> <td align="right" onclick="selectListItem(3348956)">13074</td> <td align="center" onclick="selectListItem(3348956)">0</td> <td align="center"></td> </tr> </tbody> </table> </td> </tr> </tbody> </table>

In reply to click on an row in a table using Mechanize::Firefox by billg68

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.