Professional Documents
Culture Documents
Nightwatch - Functions
Nightwatch - Functions
functions
Assertions
Expect
.a(type)
Checks if the type (i.e. tag name) of a specified element is of an expected value.
.css(property)
Checks a given css property of an element exists and optionally if it has the
expected value.
.present
Property that checks if an element is present.
.selected
Property that checks if an OPTION element, or an INPUT element of type
checkbox or radio button is currently selected.
.text
Property that retrieves the text contained by an element. Can be chained to check if
contains/equals/matches the specified text.
.value
Property that retrieves the value (i.e. the value attributed) of an element. Can be
chained to check if contains/equals/matches the specified text.
.visible
Property that asserts the visibility of a specified element.