On the HTML, yes, but not your actual Perl code. Have you even looked at your own submission!? It contains the following text:

#$sel->click("xpath=//divclass='payselectButtonsSprite s_add-your-card add-instrument-button action_link'");

This is surely not what you intended (it's invalid XPath, and there's a link to a node in the middle of it).

A short, self contained, correct example is doing a courtesy to those who might volunteer their time.

There's more than one Selenium module on CPAN; you haven't told us which one you're using.

The core of your question is to do with Selenium RC, not Perl. Maybe someone here will happen to know the answer, but you'd have more luck on a Selenium mailing list or similar.

Finally, using an XPath query is the way to go about this. I'd love to try to help, but a) you haven't posted the full HTML excerpt either (your commented out XPath queries show references to a <div> tag, which is not in the HTML given), so I can't actually write one!, and b) your sample code isn't in <c></c> tags, so I can't use that to try to guess what your HTML does actually have!

Please: help us help you.

Anneli


In reply to Re^3: UNABLE TO CLICK ON SELENIUM ELEMENT by anneli
in thread UNABLE TO CLICK ON SELENIUM ELEMENT by Monkomatic

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.