Method: Capybara::Node::Matchers#has_no_text?
- Defined in:
- lib/capybara/node/matchers.rb
#has_no_text?(type, text, **options) ⇒ Boolean #has_no_text?(text, **options) ⇒ Boolean Also known as: has_no_content?
Checks if the page or current node does not have the given text content, ignoring any HTML tags and normalizing whitespace.
Overloads:
-
#has_no_text?(type, text, **options) ⇒ Boolean
Options Hash (**options):
-
:count
(Integer)
— default:
nil
—
Number of times the text is expected to occur
-
:minimum
(Integer)
— default:
nil
—
Minimum number of times the text is expected to occur
-
:maximum
(Integer)
— default:
nil
—
Maximum number of times the text is expected to occur
-
:between
(Range)
— default:
nil
—
Range of times that is expected to contain number of times text occurs
-
:wait
(Numeric)
—
Maximum time that Capybara will wait for text to eq/match given string/regexp argument. Defaults to default_max_wait_time.
-
:exact
(Boolean)
—
Whether text must be an exact match or just substring. Defaults to exact_text.
-
:normalize_ws
(Boolean)
— default:
false
—
When
truereplace all whitespace with standard spaces and collapse consecutive whitespace to a single space
-
:count
(Integer)
— default:
nil
—
-
#has_no_text?(text, **options) ⇒ Boolean
Options Hash (**options):
-
:count
(Integer)
— default:
nil
—
Number of times the text is expected to occur
-
:minimum
(Integer)
— default:
nil
—
Minimum number of times the text is expected to occur
-
:maximum
(Integer)
— default:
nil
—
Maximum number of times the text is expected to occur
-
:between
(Range)
— default:
nil
—
Range of times that is expected to contain number of times text occurs
-
:wait
(Numeric)
—
Maximum time that Capybara will wait for text to eq/match given string/regexp argument. Defaults to default_max_wait_time.
-
:exact
(Boolean)
—
Whether text must be an exact match or just substring. Defaults to exact_text.
-
:normalize_ws
(Boolean)
— default:
false
—
When
truereplace all whitespace with standard spaces and collapse consecutive whitespace to a single space
-
:count
(Integer)
— default:
nil
—
750 751 752 |
# File 'lib/capybara/node/matchers.rb', line 750 def has_no_text?(*args, **options) make_predicate(options) { assert_no_text(*args, **options) } end |