[Windmill-dev] Testing an autocomplete widget
Adam Christian
adam at osafoundation.org
Tue Dec 11 17:06:01 PST 2007
Alright, what your library wanted was the keyDown and keyUp events to
be triggered properly, so now I am doing that. The normal type method
should now work for what you want.
I tested this in Safari 3, Firefox 2 and IE 7.
Heres a small test I recorded that worked for me:
{"params": {"id": "ysearchinput"}, "method": "click"}
{"params": {"text": "asdf", "id": "ysearchinput"}, "method": "type"}
{"params": {"milliseconds": 4000}, "method": "waits.sleep"}
{"params": {"xpath": "\/html\/body\/form\/div\/div\/div[1]\/div[2]\/ul
\/li[2]"}, "method": "click"}
{"params": {"milliseconds": 1000}, "method": "waits.sleep"}
{"params": {"id": "ysearchsubmit"}, "method": "click"}
Looking forward to your feedback,
Adam
On Dec 11, 2007, at 11:47 AM, Robert Leftwich wrote:
> On Tue, 11 Dec 2007 11:34:30 -0800, "Adam Christian"
> <adam at osafoundation.org> said:
>> Greetings,
>
> Hi!
>
>>
>> So at a first glance it looks like your JavaScript is being triggered
>> by onkeypress,
>
> I believe that's the case.
>
>>
>> I am going to attempt writing an addition to our controller api that
>> you can use instead of type, that will take a string and simulate
>> pressing those keys with 1/3 second delays between to see if I can
>> trigger your auto complete functionality.
>
> Sounds great!
>
>> After that, selecting your target entry from the list should work out
>> of the box as long as it is a standard HTML drop down, if not we can
>> deal with that accordingly.
>
> If I manually type some text, wait for a response so that the dropdown
> list (which iirc is a <ul> list, at least in the earlier version of
> YUI
> I'm using) is pre-populated, then the standard Windmill click works as
> expected.
>
>>
>> I will send out another response once I get a chance to work on this
>> hopefully this afternoon/evening.
>
> Thanks a lot - I look forward to it!
>
>> Thanks for checking out the project, and your patience.
>
> It's great that the project is available to all - kudos to OSAF and
> the
> team!
>
> Robert
More information about the Windmill-dev
mailing list