Method: Capybara::Session#has_xpath?
- Defined in:
- lib/capybara/session.rb
#has_xpath?(path, options = {}) ⇒ Boolean
139 140 141 142 143 144 145 146 147 148 149 150 151 |
# File 'lib/capybara/session.rb', line 139 def has_xpath?(path, ={}) wait_conditionally_until do results = all(:xpath, path, ) if [:count] results.size == [:count] else results.size > 0 end end rescue Capybara::TimeoutError return false end |