[Windmill-dev] Testing an autocomplete widget
Mikeal Rogers
mikeal at osafoundation.org
Tue Dec 11 11:31:56 PST 2007
Do you happen to know what events YUI is hooking in to in order to
pick up the typing events to trigger autocomplete?
If I had to guess the problem it would probably be that browsers
actually trigger more than just the "type" event when a real user
types and the YUI autocomplete stuff is hooking in to those events. We
saw a similiar problem with the way that windmill, and selenium, were
firing click events some time back and improved out code to simulate a
user more efficiently.
This is a good find and we'll definitely start doing some
investigation. One other thing I've been waiting for someone to ask
for as well, which it sounds like you will definitely need, is a way
to get at highlighting text, highlighting text and typeing over,
asserting if text is highlighted, etc. This I think can be
accomplished using the "ranges" stuff in javascript.
http://www.quirksmode.org/dom/range_intro.html
http://www.quirksmode.org/dom/w3c_range.html
-Mikeal
On Dec 11, 2007, at December 11, 200711:08 AM, Robert Leftwich wrote:
> I'm evaluating Windmill for testing a largish web app, but
> unfortunately
> I'm failing at the first hurdle. We use autocomplete from the YUI
> library fairly extensively and I was wanting to test an instance of
> it,
> but it seems that Windmill's 'type' method does not trigger the
> widget.
> To simplify things I tried to test one of the examples on the YUI
> site -
> http://developer.yahoo.com/yui/examples/autocomplete/ac_ysearch_json_clean.html
> - but the autocomplete list of possible search queries never appears.
> Following is the simplest test I recorded:
>
> {"params": {"id": "ysearchinput"}, "method": "click"}
> {"params": {"text": "windmill", "id": "ysearchinput"}, "method":
> "type"}
>
> (I had other methods after the 'type' but they require the search
> query
> list to be populated).
>
> I've tried both the subversion and released versions of Windmill w/o
> success.
>
> Can anyone shed some light on this issue?
>
> Robert
>
> PS IIRC the last time I tried Selenium (which was some months ago) it
> had a similar problem.
> _______________________________________________
> Windmill-dev mailing list
> Windmill-dev at osafoundation.org
> http://lists.osafoundation.org/mailman/listinfo/windmill-dev
More information about the Windmill-dev
mailing list