Class webdriver.testing.Assertion
code »Utility for performing assertions against a given value. If the
value is a webdriver.promise.Promise, this assertion will wait
for it to resolve before applying any matchers.
Constructor
| Parameters |
|---|
|
Classes
|
Instance Methods
code »apply ( matcher, opt_message ) ⇒ webdriver.promise.PromiseAsserts that the given matcher accepts the value wrapped by this
instance. If the wrapped value is a promise, this function will defer
applying the assertion until the value has been resolved. Otherwise, it
will be applied immediately.
webdriver.promise.Promisematcher accepts the value wrapped by this
instance. If the wrapped value is a promise, this function will defer
applying the assertion until the value has been resolved. Otherwise, it
will be applied immediately.| Parameters |
|---|
|
| Returns |
null if the assertion was immediately applied. |
code »closeTo ( value, range, opt_message ) ⇒ webdriver.promise.PromiseAsserts that the wrapped value is a number within a given distance of an
expected value.
webdriver.promise.Promisecode »contains ( value, opt_message ) ⇒ webdriver.promise.PromiseAsserts that the wrapped value is a string or array-like structure
containing the given value.
webdriver.promise.Promise| Parameters |
|---|
|
| Returns |
|
code »endsWith ( suffix, opt_message ) ⇒ webdriver.promise.PromiseAsserts that the wrapped value is a string ending with the given suffix.
webdriver.promise.Promisecode »equalTo ( value, opt_message ) ⇒ webdriver.promise.PromiseAsserts that the value managed by this assertion is strictly equal to the
given value.
webdriver.promise.Promisevalue.| Parameters |
|---|
|
| Returns |
|
code »greaterThan ( value, opt_message ) ⇒ webdriver.promise.PromiseAsserts that the value managed by this assertion is a number strictly
greater than value.
webdriver.promise.Promisevalue.code »greaterThanEqualTo ( value, opt_message ) ⇒ webdriver.promise.PromiseAsserts that the value managed by this assertion is a number >= the given
value.
webdriver.promise.Promisecode »instanceOf ( ctor, opt_message ) ⇒ webdriver.promise.PromiseAsserts that the wrapped value is an instance of the given class.
webdriver.promise.PromiseAsserts that the value managed by this assertion is strictly false.
| Returns |
|---|
|
code »isNull ( opt_message ) ⇒ webdriver.promise.PromiseAsserts that the wrapped value is null.
webdriver.promise.Promise| Parameters |
|---|
|
| Returns |
|
code »isNullOrUndefined ( opt_message ) ⇒ webdriver.promise.PromiseAsserts that the wrapped value is null or undefined.
webdriver.promise.Promise| Parameters |
|---|
|
| Returns |
|
Asserts that the value managed by this assertion is strictly true.
| Returns |
|---|
|
code »isUndefined ( opt_message ) ⇒ webdriver.promise.PromiseAsserts that the wrapped value is undefined.
webdriver.promise.Promise| Parameters |
|---|
|
| Returns |
|
code »lessThan ( value, opt_message ) ⇒ webdriver.promise.PromiseAsserts that the value managed by this assertion is a number strictly less
than the given value.
webdriver.promise.Promisecode »lessThanEqualTo ( value, opt_message ) ⇒ webdriver.promise.PromiseAsserts that the value managed by this assertion is a number <= the given
value.
webdriver.promise.Promisecode »matches ( regex, opt_message ) ⇒ webdriver.promise.PromiseAsserts that the wrapped value is a string that matches the given RegExp.
webdriver.promise.Promisecode »startsWith ( prefix, opt_message ) ⇒ webdriver.promise.PromiseAsserts that the wrapped value is a string starting with the given prefix.
webdriver.promise.Promise