Module: Thoran::Selenium::WebDriver::SearchContext::ElementsPresentQ

Included in:
Selenium::WebDriver::Driver
Defined in:
lib/Thoran/Selenium/WebDriver/SearchContext/ElementsPresentQ/elements_presentQ.rb

Instance Method Summary collapse

Instance Method Details

#elements_present?(selector_type, selector) ⇒ Boolean

Returns:

  • (Boolean)


20
21
22
23
24
25
# File 'lib/Thoran/Selenium/WebDriver/SearchContext/ElementsPresentQ/elements_presentQ.rb', line 20

def elements_present?(selector_type, selector)
  bridge.find_elements_by(selector_type, selector)
  true
rescue ::Selenium::WebDriver::Error::NoSuchElementError
  false
end