Sha256: af073ed7b85dbf1045b4ea44de309fb09554d98f76667e59f3d1668624fc8f7a

Contents?: true

Size: 317 Bytes

Versions: 25

Compression:

Stored size: 317 Bytes

Contents

module CapybaraSelect2
  def select2(selector, query, label = query)
    selector = "##{selector}" if selector.is_a?(Symbol)
    find("#{selector} + .select2-container").click
    find(".select2-search__field").set(query.to_s)
    find(".select2-results li", text: label.to_s).click
  end
end

World(CapybaraSelect2)

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
agilibox-1.0.13 features/support/select2.rb
agilibox-1.0.12 features/support/select2.rb
agilibox-1.0.11 features/support/select2.rb
agilibox-1.0.10 features/support/select2.rb
agilibox-1.0.9 features/support/select2.rb