Sha256: 235e30ac55606d6c91483f88f6e405bfcf7a9972ef7c3a28ac566110d7a73610
Contents?: true
Size: 529 Bytes
Versions: 27
Compression:
Stored size: 529 Bytes
Contents
module AutocompleteHelpers def fill_autocomplete(form, field, options = {}) fill_in field, with: options[:with] page.execute_script " $('#{form}').find('[name=#{field}]').trigger('focus') " page.execute_script " $('#{form}').find('[name=#{field}]').trigger('keydown') " selector = %Q{ul.ui-autocomplete li.ui-menu-item:contains("#{options[:select]}")} expect(page).to have_selector("ul.ui-autocomplete li.ui-menu-item") page.execute_script " $('#{selector}').trigger('mouseenter').click() " end end
Version data entries
27 entries across 27 versions & 1 rubygems