UNABLE TO CLICK ON SELENIUM ELEMENT

Hi All,

Im running into a simple problem with selenium perl clicking an image with no name value or ID. I have tried everything i could think of and included the trys below.

I need to click the following image. Yet i can find no way to do it. https://images.com/images/G/01/x-locale/common/transparent-pixel._V192234675_.gif

Page code is:

<td colspan="2" class="add-instrument-container"> <input title="" alt="add your card" class="payselectButtonsSprite s_ad +d-your-card add-instrument-button action_link" id="" value="" name="" + src="https://images.com/images/G/01/x-locale/common/transparent-pixe +l._V192234675_.gif" ref="ox_pay_page_cc_add" type="image" border="0"> + <img class="loading-small" src="https://images.com/im +ages/G/01/x-locale/common/loading/loading-small._V192239831_.gif" alt +=""> </td> </tr>

Have tried

@addcardsplit1 = split(/add-instrument-container/i, $pagesource);

@addcardsplit2 = split(/https:\/\//i, @addcardsplit11);

@addcardsplit3 = split(/gif/i, @addcardsplit21);

$addcardlink=@addcardsplit3[0];

#print "Addcardlink:$addcardlink \n";$addcardlink= "http" . $addcardlink . "gif";

$addcardlink= $addcardlink . "gif";

print "Addcardlink:$addcardlink \n";

#$sel->click("link=$addcardlink");

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

#$sel->click("css=inputsrc=$addcardlink");

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

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

#$sel->click("css=inputsrc=$addcardlink");

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

#$sel->click("dom=document.images21");

#$sel->click("dom=document.images22");

#$sel->click("dom=document.images23");

#$sel->click("dom=document.images24");


In reply to 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.