Thank Q for the response charley..

Autocompleting is what i meant autoextender. The example which you have given 
is working to the extent of
entering the words "AL" in the text field and showing the list containing names 
starting with "AL". Further it is not working and throwing a exception.

Here is the script you have passed to me for which i added few messeges to know 
where it is throwing exception

require 'watir'
include Watir

ie = IE.start('http://demo.script.aculo.us/ajax/autocompleter')
ie.maximize()
puts "Entering Words AL in the field "
ie.text_field(:id, 'contact_name').set('al')

puts "Event Firing"
ie.text_field(:id, 'contact_name').fire_event('onkeypress') 
# need to fire a key press event after setting the text since the js is 
handling keypress events

puts "Checking the length"           ------> *bold*  Passing through this and 
stopping 
puts ie.div(:id, 'contact_name_auto_complete').lis.length
puts ie.div(:id, 'contact_name_auto_complete').li(:index, 5).text

Puts "Clicking Alan Jochen"
ie.div(:id, 'contact_name_auto_complete').li(:text, 'Alan Jochen').click
-------------------------------------------------

Entering AL in the field   ----> passed thru this
Event Firing                  ----> passed thru this
Checking the length     ----> passed thru this and stopped
0

-------------------------------------
Unable to locate object, using index and 5    ---> This is the exception thrown.

did i missed anything

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

Reply via email to