<input type="image" not being picked up as a button

11 views
Skip to first unread message

Matt D

unread,
Feb 7, 2011, 5:41:58 AM2/7/11
to cubictest-users
I have a webapp which sometimes uses an image as a submit button, like
this:

<input type="image" name="" src="images/discount.gif" border="0">

When I record the script, it picks up this tag as a button. However
when I try to reply the script, it can't find it.

In the run window I can see it checking as follows:
click(xpath=//input[@type='button' or @type='submit' or
@type='image' ...

I'm using the cubictest plugin for eclipse.

Any thoughts?

Teg Ryan

unread,
Feb 11, 2011, 1:29:13 PM2/11/11
to cubicte...@googlegroups.com
I don't know why, but I had a devil of a time with this too.  It was also inconsistent.  I started using Alt tags to identify buttons that are images when I needed to click them.

click(xpath=//img[@alt='Alt Text'])

Works for me.

Teg
Reply all
Reply to author
Forward
0 new messages