Method: Capybara::Node::Matchers#has_no_selector?

Defined in:
lib/capybara/node/matchers.rb

#has_no_selector?(*args, **options, &optional_filter_block) ⇒ Boolean

Checks if a given selector is not on the page or a descendant of the current node. Usage is identical to #has_selector?.

Parameters:

  • kind (Symbol)

    Optional selector type (:css, :xpath, :field, etc.). Defaults to default_selector.

  • locator (String)

    The locator for the specified selector

  • options (Hash)

    a customizable set of options

Returns:

  • (Boolean)


50
51
52
# File 'lib/capybara/node/matchers.rb', line 50

def has_no_selector?(*args, **options, &optional_filter_block)
  make_predicate(options) { assert_no_selector(*args, options, &optional_filter_block) }
end