Method: Capybara::Node::Matchers#has_no_field?

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

#has_no_field?(locator = nil, **options, &optional_filter_block) ⇒ Boolean

Checks if the page or current node has no form field with the given label, name or id. See #has_field?.

Parameters:

  • locator (String) (defaults to: nil)

    The label, name or id of a field to check for

  • options (Hash)

    a customizable set of options

Options Hash (**options):

  • :with (String, Regexp)

    The text content of the field or a Regexp to match

  • :type (String)

    The type attribute of the field

Returns:

  • (Boolean)

    Whether it doesn't exist



435
436
437
# File 'lib/capybara/node/matchers.rb', line 435

def has_no_field?(locator = nil, **options, &optional_filter_block)
  has_no_selector?(:field, locator, **options, &optional_filter_block)
end