No, that does not answer my question.

I am looking to test updates to the page from the Ajax engine. In the case
of instant search, I need to be able to test that when I type "ruby" into
the form field, the browser is updated and shows the link for "Ruby Home
Page" without clicking the button and submitting the form. (try typing that
manually in the browser and you will see what I mean)

I do not think that Watir can "see" this type of change...(?)

-sean

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jeff Wood
Sent: Monday, September 26, 2005 4:33 PM
To: [email protected]
Subject: Re: [Wtr-general] Watir and Ajax

What specifically are you looking for?

I was able to use WATiR to load the page ... enter a criteria...
validate the result ... follow the link ... and on from there ...

ie = IE.new
ie.goto "instant.search.yahoo.com"
ie.text_field( :name, "p" ).set "boston weather"
ie.link( :text, /Extended/ ).click if ie.contains_text "Currently"

... hope that's enough.

Realize that all you are doing with WATiR is directing IE and looking
at the page it has loaded and the current content of that page...

So, if the underlying system is changing the content ... it doesn't care.

That's what is so nice about WATiR vs other tools like HTTPUnit that
would have to emulate all of the functionality that IE takes care of
for us...

... I hope that helps answer your question.

j.


On 9/26/05, Sean Gallagher <[EMAIL PROTECTED]> wrote:
> Has anyone tried using Watir to test a website that uses Ajax?
>
> As a test, I am looking at the new Yahoo Instant Search.
>
> http://instant.search.yahoo.com/
>
> Here is the form HTML:
>
> <form name=w
>
action="http://rds.yahoo.com/;_ylt=AsI0.1halgK5ggoEYqqRJtOSA8oF;_ylu=X3oDMTB
>
hNjRqazhxBHNlYwNzZWFyY2g-/SIG=11ia1q7e9/EXP=1127856681/*-http%3A//search.yah
> oo.com/search"><input type=hidden name=ei value="UTF-8"><input type=hidden
> name=fr value="sfp-inst"><fieldset>
> <legend><label for=yschsp><i>Instant Search</i></label></legend>
> <div id=yschinput>
> <input name=p id=yschsp size=54 maxlength=100 value="" autocomplete=off
> onkeydown="instant_key(event);return true;">
> <input class=ygbt type=submit name="y" value="Search the Web">
> <input name=iscqry id=iscqry type=hidden>
> </div>
> </fieldset></div></form>
>
> I don't know how to handle the input that includes the onkeydown event
using
> Watir.
>
> Does anyone have any suggestions and/or advice?
>
> Thanks.
>
> -sean
> _______________________________________________
> Wtr-general mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/wtr-general
>


--
"http://ruby-lang.org -- do you ruby?"

Jeff Wood

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to