module Capybara::Node::Finders
def first(*args, **options, &optional_filter_block)
-
(Capybara::ElementNotFound)- If element(s) matching the provided options can't be found before time expires
Returns:
-
(Capybara::Node::Element)- The found element or nil
Parameters:
-
options(Hash) -- Additional options; see {#all} -
locator(String) -- The selector -
kind(:css, :xpath) -- The type of selector
Overloads:
-
first([kind], locator, options)
def first(*args, **options, &optional_filter_block) options = { minimum: 1 }.merge(options) unless options_include_minimum?(options) all(*args, **options, &optional_filter_block).first end