I have problem to use locater of www::selenium to follow a link of a webpage. This link has a id as its locater and with a href attribute, not a exactly html link. I can't find any instruction or codes to explains this.

<a id="ctl00_MainCol_DataList1_ctl00_SearchListing1_FrmImage_hlMoreInfo" href="javascript:__doPostBack('ctl00$MainCol$DataList1$ctl00$SearchListing1$FrmImage$hlMoreInfo','')">More Info</a><br />

When I use click($locator), of cause it gives me error messages.

The selenium RC and perl function really good on my PC. I just need selenium to surf some link and get_text(). This can save me lots of work. Very appreciated if anyone can help me out.

Zli034

In reply to Need help with selenium locator by zli034

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.