Method: Capybara::Node::Matchers#has_no_button?

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

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

Checks if the page or current node has no button with the given text, value or id.

Parameters:

  • locator (String) (defaults to: nil)

    The text, value or id of a button to check for

Returns:

  • (Boolean)

    Whether it doesn't exist



395
396
397
# File 'lib/capybara/node/matchers.rb', line 395

def has_no_button?(locator = nil, **options, &optional_filter_block)
  has_no_selector?(:button, locator, **options, &optional_filter_block)
end