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.5.0 lib/agilibox/cucumber_helpers/select2.rb
agilibox-1.4.4 lib/agilibox/cucumber_helpers/select2.rb
agilibox-1.4.3 lib/agilibox/cucumber_helpers/select2.rb
agilibox-1.4.2 lib/agilibox/cucumber_helpers/select2.rb
agilibox-1.4.1 lib/agilibox/cucumber_helpers/select2.rb
agilibox-1.4.0 lib/agilibox/cucumber_helpers/select2.rb
agilibox-1.3.6 lib/agilibox/cucumber_helpers/select2.rb
agilibox-1.3.5 lib/agilibox/cucumber_helpers/select2.rb
agilibox-1.3.4 lib/agilibox/cucumber_helpers/select2.rb
agilibox-1.3.3 lib/agilibox/cucumber_helpers/select2.rb
agilibox-1.3.2 lib/agilibox/cucumber_helpers/select2.rb
agilibox-1.3.1 lib/agilibox/cucumber_helpers/select2.rb
agilibox-1.3.0 lib/agilibox/cucumber_helpers/select2.rb
agilibox-1.2.3 lib/agilibox/cucumber_helpers/select2.rb
agilibox-1.2.2 lib/agilibox/cucumber_helpers/select2.rb
agilibox-1.2.1 lib/agilibox/cucumber_helpers/select2.rb
agilibox-1.2.0 lib/agilibox/cucumber_helpers/select2.rb
agilibox-1.1.0 features/support/select2.rb
agilibox-1.0.15 features/support/select2.rb
agilibox-1.0.14 features/support/select2.rb