I am trying to create a watir test that fills the inn text field by writing feks
"lon" and until a drop-down list appears, then click on the first item in the list.
The spelling of "lon" should evoke many variations, such as "London, England, Storbritania", London, Kentucky, USA, etc. How is this possible with this? thnx in advance.
This is what my code looks like so far; these odes do not work, although I wonder where I missed something.
def test_scriptflight_autocomplete @ site.navigate_to (: travel ,: flight) from_field = @ site.ie.text_field (: id, "locOriginName") to_field = @ site.ie.text_field (: id, 'locDestinationName') from_field.set (' Oslo')
from_field.fire_event('onkeydown')
@site.ie.wait_until{@site.ie.div(:id, 'onlinesearch').lis.length > 0}
puts @site.ie.div(:id, 'locOriginName ').lis.length
puts @site.ie.div(:id, 'locOriginName').li(:index, 5).text
@site.ie.div(:id, 'from-field').li(:text, 'Oslo, Oslo, Norge').click
end