For quite a while I struggeled with testing autocomplete fields (like the one from the script.aculo.us library) using Selenium tests.
As you may already know – the “type” command does not trigger the autocomplete to look for suggestions. You rather have to use the keyUp/keyDown/keyPress command. Unfortunately their behaviour with autocomplete varies between different browsers. All this makes it a real mess (and complicated looking tests) to test a simple autocomplete field.
The solution I found out about recently is to use the “typeKeys” command which seems to be a new comfort feature of Selenium. It triggers all the above key handlers for you.
However – I noticed that sometimes it is helpful / necessary to use “typeKeys” in combination with the “type” command – to get working results. For now – I am using “type” to enter the field value leaving out the last character to be inserted by “typeKeys”.