Functional testing autocomplete widget with Watin / Watir
I'm trying to write a functional test using watin to test the autocomplete field in an application I am working on. So far, I can enter some characters, and the autocomplete menu pops up. What I am having trouble with is selecting an autocomplete menu item. What html event / events need to occur on which page element in order to select an item? I've tried having my watin test click on the autocomplete item link but that doesn't seem to work.
For example:
browser.Link(Find.ByText("some menu item")).Click();
I suspect another event needs to fire to activate and select the autocomplete menu item. I've looked through the autocomplete javascript source but I can't figure out what I'm missing.
Any help would be really appreciated.
Thanks.