[Wtr-general] How To Click On The Image Button...With This html Code?
Angrez Singh
angrez at gmail.com
Fri May 4 08:12:49 EDT 2007
Hi,
The element you are trying to click is not an image element i.e. not of type
<image>. But its <input type="image">
which is different. So you should try using following code.
ie.button(:src, /search_top/i).click
If you use your code 'Watir' is correctly clicking the image which is having
the source you specified and not clicking image button which you should
access using ie.button.
- Angrez
On 5/4/07, san <forum-watir-users at openqa.org> wrote:
>
> Hi People..
>
> Heres The Code:
>
> <tr ><td height="15"></td></tr>
> <tr align="left">
>
> <td align="left" colspan="2" valign=bottom >
> <input border="0" alt="Search" src="../images/search_top.gif"
> name="CTL_SUBMIT" type="image">
> <a href="FilingsSearch.asp"><img border="0" alt="Clear"
> src="../images/clear_search_top.gif"></a>
> <a href="javascript:SaveAlertSearch();"><img
> border="0" alt="Clear" src="../images/save_search_button.gif"></a>
>
> </td>
> </tr>
>
> & I Wanna Click On The image button with url "search_top.gif"
> So I Used [i]ie.image(:src, /search_top/i).click[/i]
> But It Didn't Work Properly As It Always Clicking On The 2nd Occurrence Of
> "search_top", i.e On The Link "clear_search_top" ... I Don't Know Why...
>
> Any Ideas Will Be Helpful... :)
> Thanks....
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070504/4c9a7e14/attachment.html
More information about the Wtr-general
mailing list