Testing jQuery autocomplete with Capybara

  page.execute_script %Q{ $('"#{location}"').val('"#{text}"').keydown(); }
  sleep(3)
  page.execute_script %Q{ $('.ui-menu-item a:contains("#{target}")').trigger('mouseenter').click(); }
  page.should have_field(localtion, :with => completed_text)
Wiseman Over 12 years ago