Method: Capybara::Node::Matchers#has_no_link?

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

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

Checks if the page or current node has no link with the given text or id.

Parameters:

  • locator (String) (defaults to: nil)

    The text or id of a link to check for

  • options (Hash)

    a customizable set of options

Returns:

  • (Boolean)

    Whether it doesn't exist



371
372
373
# File 'lib/capybara/node/matchers.rb', line 371

def has_no_link?(locator = nil, **options, &optional_filter_block)
  has_no_selector?(:link, locator, **options, &optional_filter_block)
end