Hi Parv, You should be able to click on it with something like this:
$ie.button(:src, /\/images/prep/new/submit.jpg/).click * $ie.image(:src, 'http://myDomain.com/images
/prep/new/submit.jpg').flash()
This control is a button in Watir not an image, the full url isn't listed in the src attribute of the image, so it needs to refer to whatever is there in the html. * $ie.image(:src, /submit/).flash() It's a button, this might work depending on what else is in your html if you use $ie.button(....) * $ie.button(:src => /submit./, :index => 2).click() Aha, you've now caught the fact that input elements in the latest version of Watir don't support multiple attributes. If you'd like you can vote for this issue in Jira as there is a ticket: http://jira.openqa.org/browse/WTR-74 Hope that helps, Charley On 3/22/07, Parv <[EMAIL PROTECTED]> wrote:
Hi, Please Help, as i'm trying to click on on image (button) that fires an onClick() event. Here's html: <input type="image" src="/images/prep/new/submit.jpg" onClick="sub()"> I have tried the following, but none has worked so far: * $ie.image(:src, 'http://myDomain.com/images/prep/new/submit.jpg').flash( ) * $ie.image(:src, /submit/).flash() * $ie.button(:src => /submit./, :index => 2).click() Your help is highly appreciated. Thanks!!! Parv _______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general