Sha256: 9fc775749c1439c34c2f3330609a708b75ae4f39c633cbdd54e8d7db5c30becc

Contents?: true

Size: 260 Bytes

Versions: 64

Compression:

Stored size: 260 Bytes

Contents

# frozen_string_literal: true

Capybara.add_selector(:id, locator_type: [String, Symbol, Regexp]) do
  xpath { |id| builder(XPath.descendant).add_attribute_conditions(id: id) }
  locator_filter { |node, id| id.is_a?(Regexp) ? id.match?(node[:id]) : true }
end

Version data entries

64 entries across 51 versions & 5 rubygems

Version Path
capybara-3.32.2 lib/capybara/selector/definition/id.rb
capybara-3.32.1 lib/capybara/selector/definition/id.rb
capybara-3.32.0 lib/capybara/selector/definition/id.rb
tdiary-5.1.1 vendor/bundle/ruby/2.7.0/gems/capybara-3.31.0/lib/capybara/selector/definition/id.rb
tdiary-5.1.1 vendor/bundle/ruby/2.6.0/gems/capybara-3.29.0/lib/capybara/selector/definition/id.rb
capybara-3.31.0 lib/capybara/selector/definition/id.rb
capybara-3.30.0 lib/capybara/selector/definition/id.rb
tdiary-5.1.0 vendor/bundle/gems/capybara-3.29.0/lib/capybara/selector/definition/id.rb
chatops-rpc-0.0.2 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/capybara-3.29.0/lib/capybara/selector/definition/id.rb
chatops-rpc-0.0.1 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/capybara-3.29.0/lib/capybara/selector/definition/id.rb
capybara-3.29.0 lib/capybara/selector/definition/id.rb
capybara-3.28.0 lib/capybara/selector/definition/id.rb
capybara-3.27.0 lib/capybara/selector/definition/id.rb
capybara-3.26.0 lib/capybara/selector/definition/id.rb
capybara-3.25.0 lib/capybara/selector/definition/id.rb
capybara-3.24.0 lib/capybara/selector/definition/id.rb
capybara-3.23.0 lib/capybara/selector/definition/id.rb
capybara-3.22.0 lib/capybara/selector/definition/id.rb
capybara-3.21.0 lib/capybara/selector/definition/id.rb
capybara-3.20.2 lib/capybara/selector/definition/id.rb