Sha256: ce6753af28d953d612c75c3044b3a945a37ed5ef1f30a18fcd7f8c13756e7cea
Contents?: true
Size: 499 Bytes
Versions: 38
Compression:
Stored size: 499 Bytes
Contents
# frozen_string_literal: true module Select2SpecHelper def select2(value, opts) scope = opts[:from] select2_container = first("#{scope} + .select2-container") select2_container.first(".select2-selection").click first("input.select2-search__field").set(value) page.execute_script(%|$("#{scope} ~ input.select2-search__field:visible").keyup();|) body = find(:xpath, "//body") matches = body.find_all(".select2-results li", text: value) matches.last.click end end
Version data entries
38 entries across 38 versions & 1 rubygems