The full html source code is quite huge.. quite huge... or i would have posted it. I am using selenium 1 to make the requets

I do realize it is an xpath solution. However all the attempts i have tried have been from the web and selenium has many more flavors than perl so i was never sure my syntax was correct which is why i was asking here for correct perl sytax.

I am hoping somone knows the correct perl syntax for finding and clicking an image by alt or partial or full image name? Everytime i try to use @ i get an error and if i dont use it it complains the element cannot be found.

#$sel->click("xpath=//imgcontains($addcardlink)");

#$sel->click("xpath=//input@src=$addcardlink");

p.s.<I do appreciate that your trying to help anneli

#$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).

That is exactly how it appears in the code above. This is what im dealing with. And that node is exactly what i am looking to press. I am thinking of downloading firebug or another gadget to get all elements. Is there a simply was selenium will list all elements or images on a page maybe?


In reply to Re^4: UNABLE TO CLICK ON SELENIUM ELEMENT by Monkomatic
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.