HTML doesn't have buttons; it has inputs with types of
"image" or "button" or "submit". I've never understood why WATIR doesn't
track (at least via aliases) HTML's conventions:
input(:img, "blah").click
input(:button, "foo").click
input(:submit, "bar").click
---Michael B.
From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Bret Pettichord
Sent: February 25, 2006 3:35 PM
To: [email protected]
Subject: Re: [Wtr-general] Script hangs and does nothing
On 2/25/06, saud aziz <[EMAIL PROTECTED]> wrote:
Sent: February 25, 2006 3:35 PM
To: [email protected]
Subject: Re: [Wtr-general] Script hangs and does nothing
Thanks Bret. That did work and just by changing image to button i was able to go all the way..
One thing i don't understand is that if you view source, it renders it as <input type="image"> but using it as button works? Why would that be the case?
There are two different things in HTML.
One is an image tag. It is represented as <img blah blah blah>
The other is an image input. It is represented as <input type="image" blah blah>. Text fields, file files, buttons, check boxes, etc are all examples of different kinds of input types.
It would be easy to extend Watir to support these input images with, say, ie.image_button(blah) or ie.image_input(blah) in addition to the existing support in ie.button(blah). I'm thinking making this a separate type would key users that there were two types of images and that they had to use the right type with Water. Even better would be to make Watir's ie.image(blah) work with either kind, but that would more work and may lead to other complications.
I also see that we don't have any unit tests for this kind of image. We should.
Bret
<input name="template:ib_GetStarted" id= "template_ib_GetStarted" src="../../../../_img/button/subs/getstarted.gif" alt= "Get Started" border="0" type="image">
_______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
