Sha256: a93b01de19707b51167f140b68c1dcb1405566968d42d6f6a724438bec618663
Contents?: true
Size: 535 Bytes
Versions: 8
Compression:
Stored size: 535 Bytes
Contents
module AutocompleteHelpers def fill_autocomplete(form, field, options = {}) fill_in field, with: options[:with] page.execute_script %Q{ $('#{form}').find('[name=#{field}]').trigger('focus') } page.execute_script %Q{ $('#{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 %Q{ $('#{selector}').trigger('mouseenter').click() } end end
Version data entries
8 entries across 8 versions & 1 rubygems