You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
e2e-istanbul/node_modules/selenium-webdriver/docs/class_webdriver_testing_Neg...

26 lines
20 KiB

<!DOCTYPE html><meta charset="UTF-8"><meta http-equiv="Content-Language" content="en" /><title>webdriver.testing.NegatedAssertion</title><link href="dossier.css" rel="stylesheet" type="text/css"><div id="main-wrapper"><input type="checkbox" id="sidenav-toggle" /><main><header><h1>Class webdriver.testing.NegatedAssertion</h1><a class="source" href="source/lib/webdriver/testing/asserts.js.src.html#l375">code &raquo;</a><pre><code><a href="class_webdriver_testing_Assertion.html">webdriver.testing.Assertion</a>
&#x2514; webdriver.testing.NegatedAssertion</code></pre></header><section><p>An assertion that negates any applied matchers.<h2>Constructor</h2><div class="ctor wrap-details public"><div><div class="ctor"><span class="member">webdriver.testing.NegatedAssertion <span class="args">( value )</span></span></div><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>value: <code class="type">*</code><dd>The value to perform assertions on.</dl></table></div></div></div></section><div id="visibility-controls"><b>Show:</b><label for="show-public"><span><input type="checkbox" id="show-public" checked/></span>Public</label><label for="show-protected"><span><input type="checkbox" id="show-protected"/></span>Protected</label><label for="show-private"><span><input type="checkbox" id="show-private"/></span>Private</label></div><section id="instance-methods"><h2>Instance Methods</h2><h3>Defined in <code class="type">webdriver.testing.NegatedAssertion</code></h3><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/testing/asserts.js.src.html#l384">code &raquo;</a><span class="member"><a name="apply">apply</a> <span class="args">( matcher, opt_message )</span> &rArr; <code class="type">(null|webdriver.promise.Promise)</code></span></div></summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>matcher<dt>opt_message</dl></table></div></details></div></div><h3>Defined in <code class="type"><a href="class_webdriver_testing_Assertion.html">webdriver.testing.Assertion</a></code></h3><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/testing/asserts.js.src.html#l228">code &raquo;</a><span class="member"><a name="closeTo">closeTo</a> <span class="args">( value, range, opt_message )</span> &rArr; <code class="type"><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Asserts that the wrapped value is a number within a given distance of an
expected value.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>value: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code><dd>The expected value.<dt>range: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code><dd>The maximum amount the actual value is permitted to
differ from the expected value.<dt>opt_message: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>=</code><dd>A message to include if the matcher does not
accept the value wrapped by this assertion.</dl><tr><th>Returns<tr><td><dl>The assertion result.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/testing/asserts.js.src.html#l291">code &raquo;</a><span class="member"><a name="contains">contains</a> <span class="args">( value, opt_message )</span> &rArr; <code class="type"><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Asserts that the wrapped value is a string or array-like structure
containing the given value.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>value: <code class="type">*</code><dd>The expected value.<dt>opt_message: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>=</code><dd>A message to include if the matcher does not
accept the value wrapped by this assertion.</dl><tr><th>Returns<tr><td><dl>The assertion result.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/testing/asserts.js.src.html#l304">code &raquo;</a><span class="member"><a name="endsWith">endsWith</a> <span class="args">( suffix, opt_message )</span> &rArr; <code class="type"><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Asserts that the wrapped value is a string ending with the given suffix.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>suffix: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The expected suffix.<dt>opt_message: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>=</code><dd>A message to include if the matcher does not
accept the value wrapped by this assertion.</dl><tr><th>Returns<tr><td><dl>The assertion result.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/testing/asserts.js.src.html#l345">code &raquo;</a><span class="member"><a name="equalTo">equalTo</a> <span class="args">( value, opt_message )</span> &rArr; <code class="type"><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Asserts that the value managed by this assertion is strictly equal to the
given <code >value</code>.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>value: <code class="type">*</code><dd>The expected value.<dt>opt_message: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>=</code><dd>A message to include if the matcher does not
accept the value wrapped by this assertion.</dl><tr><th>Returns<tr><td><dl>The assertion result.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/testing/asserts.js.src.html#l167">code &raquo;</a><span class="member"><a name="greaterThan">greaterThan</a> <span class="args">( value, opt_message )</span> &rArr; <code class="type"><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Asserts that the value managed by this assertion is a number strictly
greater than <code >value</code>.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>value: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code><dd>The minimum value.<dt>opt_message: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>=</code><dd>A message to include if the matcher does not
accept the value wrapped by this assertion.</dl><tr><th>Returns<tr><td><dl>The assertion result.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/testing/asserts.js.src.html#l182">code &raquo;</a><span class="member"><a name="greaterThanEqualTo">greaterThanEqualTo</a> <span class="args">( value, opt_message )</span> &rArr; <code class="type"><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Asserts that the value managed by this assertion is a number >= the given
value.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>value: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code><dd>The minimum value.<dt>opt_message: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>=</code><dd>A message to include if the matcher does not
accept the value wrapped by this assertion.</dl><tr><th>Returns<tr><td><dl>The assertion result.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/testing/asserts.js.src.html#l242">code &raquo;</a><span class="member"><a name="instanceOf">instanceOf</a> <span class="args">( ctor, opt_message )</span> &rArr; <code class="type"><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Asserts that the wrapped value is an instance of the given class.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>ctor: <code class="type">!<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a></code><dd>The expected class constructor.<dt>opt_message: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>=</code><dd>A message to include if the matcher does not
accept the value wrapped by this assertion.</dl><tr><th>Returns<tr><td><dl>The assertion result.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/testing/asserts.js.src.html#l363">code &raquo;</a><span class="member"><a name="isFalse">isFalse</a> <span class="args">( )</span> &rArr; <code class="type"><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Asserts that the value managed by this assertion is strictly false.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>The assertion result.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/testing/asserts.js.src.html#l254">code &raquo;</a><span class="member"><a name="isNull">isNull</a> <span class="args">( opt_message )</span> &rArr; <code class="type"><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Asserts that the wrapped value is null.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>opt_message: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>=</code><dd>A message to include if the matcher does not
accept the value wrapped by this assertion.</dl><tr><th>Returns<tr><td><dl>The assertion result.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/testing/asserts.js.src.html#l276">code &raquo;</a><span class="member"><a name="isNullOrUndefined">isNullOrUndefined</a> <span class="args">( opt_message )</span> &rArr; <code class="type"><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Asserts that the wrapped value is null or undefined.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>opt_message: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>=</code><dd>A message to include if the matcher does not
accept the value wrapped by this assertion.</dl><tr><th>Returns<tr><td><dl>The assertion result.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/testing/asserts.js.src.html#l354">code &raquo;</a><span class="member"><a name="isTrue">isTrue</a> <span class="args">( )</span> &rArr; <code class="type"><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Asserts that the value managed by this assertion is strictly true.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>The assertion result.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/testing/asserts.js.src.html#l265">code &raquo;</a><span class="member"><a name="isUndefined">isUndefined</a> <span class="args">( opt_message )</span> &rArr; <code class="type"><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Asserts that the wrapped value is undefined.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>opt_message: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>=</code><dd>A message to include if the matcher does not
accept the value wrapped by this assertion.</dl><tr><th>Returns<tr><td><dl>The assertion result.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/testing/asserts.js.src.html#l197">code &raquo;</a><span class="member"><a name="lessThan">lessThan</a> <span class="args">( value, opt_message )</span> &rArr; <code class="type"><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Asserts that the value managed by this assertion is a number strictly less
than the given value.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>value: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code><dd>The maximum value.<dt>opt_message: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>=</code><dd>A message to include if the matcher does not
accept the value wrapped by this assertion.</dl><tr><th>Returns<tr><td><dl>The assertion result.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/testing/asserts.js.src.html#l211">code &raquo;</a><span class="member"><a name="lessThanEqualTo">lessThanEqualTo</a> <span class="args">( value, opt_message )</span> &rArr; <code class="type"><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Asserts that the value managed by this assertion is a number <= the given
value.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>value: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code><dd>The maximum value.<dt>opt_message: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>=</code><dd>A message to include if the matcher does not
accept the value wrapped by this assertion.</dl><tr><th>Returns<tr><td><dl>The assertion result.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/testing/asserts.js.src.html#l332">code &raquo;</a><span class="member"><a name="matches">matches</a> <span class="args">( regex, opt_message )</span> &rArr; <code class="type"><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Asserts that the wrapped value is a string that matches the given RegExp.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>regex: <code class="type">!<a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/RegExp">RegExp</a></code><dd>The regex to test.<dt>opt_message: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>=</code><dd>A message to include if the matcher does not
accept the value wrapped by this assertion.</dl><tr><th>Returns<tr><td><dl>The assertion result.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/webdriver/testing/asserts.js.src.html#l318">code &raquo;</a><span class="member"><a name="startsWith">startsWith</a> <span class="args">( prefix, opt_message )</span> &rArr; <code class="type"><a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Asserts that the wrapped value is a string starting with the given prefix.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>prefix: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The expected prefix.<dt>opt_message: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>=</code><dd>A message to include if the matcher does not
accept the value wrapped by this assertion.</dl><tr><th>Returns<tr><td><dl>The assertion result.</dl></table></div></details></div></div></section><section id="instance-properties"><h2>Instance Properties</h2><h3>Defined in <code class="type">webdriver.testing.NegatedAssertion</code></h3><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/webdriver/testing/asserts.js.src.html#l377">code &raquo;</a><span class="member"><a name="value">value</a> : <code class="type">*</code></span></div></summary></details></div></div><h3>Defined in <code class="type"><a href="class_webdriver_testing_Assertion.html">webdriver.testing.Assertion</a></code></h3><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/webdriver/testing/asserts.js.src.html#l98">code &raquo;</a><span class="member"><a name="is">is</a> : <code class="type">!<a href="class_webdriver_testing_Assertion.html">webdriver.testing.Assertion</a></code></span></div><p>A self reference provided for writing fluent assertions:
webdriver.testing.assert(x).is.equalTo(y);</summary></details></div></div><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/webdriver/testing/asserts.js.src.html#l105">code &raquo;</a><span class="member"><a name="not">not</a> : <code class="type">!<a href="class_webdriver_testing_NegatedAssertion.html">webdriver.testing.NegatedAssertion</a></code></span></div><p>Negates any matchers applied to this instance's value:
webdriver.testing.assert(x).not.equalTo(y);</summary></details></div></div><div class="wrap-details private"><div><details><summary><div><a class="source" href="source/lib/webdriver/testing/asserts.js.src.html#l90">code &raquo;</a><span class="member"><a name="value_">value_</a> : <code class="type">*</code></span></div></summary></details></div></div></section><section id="static-properties"><h2>Static Properties</h2><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/webdriver/testing/asserts.js.src.html#l375">code &raquo;</a><span class="member"><a name="webdriver.testing.NegatedAssertion.superClass_">webdriver.testing.NegatedAssertion.superClass_</a> : <code class="type"><a href="class_webdriver_testing_Assertion.html">webdriver.testing.Assertion.prototype</a></code></span></div></summary></details></div></div></section></main><nav id="topnav"><div><div id="menubutton"><label for="sidenav-toggle">Menu</label></div><form id="searchbox"><div><input type="search" placeholder="Search" tabindex="1"></div></form></div></nav><nav id="sidenav"><input type="checkbox" id="sidenav-types-ctrl" /><input type="checkbox" id="sidenav-files-ctrl" /><input type="checkbox" id="sidenav-modules-ctrl" /><a id="sidenav-overview"><div><h4>Overview</h4></div></a><div id="sidenav-types"><label for="sidenav-types-ctrl"><h4>Types</h4></label><i>No data</i></div><div id="sidenav-modules"><label for="sidenav-modules-ctrl"><h4>Modules</h4></label><i>No data</i></div><div id="sidenav-files"><label for="sidenav-files-ctrl"><h4>Files</h4></label><i>No data</i></div><a href="license.html"><div><h4>License</h4></div></a></nav><div id="push-footer"></div></div><footer><a href="https://github.com/jleyba/js-dossier">Generated by dossier</a></footer><script src="types.js"></script><script src="dossier.js"></script>