Method: Selenium::WebDriver::SearchContext#find_elements

Defined in:
lib/selenium/webdriver/common/search_context.rb

#find_elements(*args) ⇒ Object

Find all elements matching the given arguments

See Also:


75
76
77
78
79
80
81
82
83
84
85
# File 'lib/selenium/webdriver/common/search_context.rb', line 75

def find_elements(*args)
  how, what = extract_args(args)

  by = FINDERS[how.to_sym]
  raise ArgumentError, "cannot find elements by #{how.inspect}" unless by

  bridge.find_elements_by by, what, ref
rescue Selenium::WebDriver::Error::TimeoutError
  # Implicit Wait times out in Edge
  []
end