Expectation

Expectation

Expectations created based on WaitCondition DSL methods.

Constructor

new Expectation()

Source:

Methods

(static) attributeCondition(selector, attrName, condition)

Source:

Checks that attribute of element meets a certain condition.

Parameters:
Name Type Description
selector
attrName
condition

(static) attributeContainsValue(selector, attrName, value)

Source:

Checks that attribute value contains an expected text.

Parameters:
Name Type Description
selector
attrName
value

(static) attributeDoesntContainValue(selector, attrName, value)

Source:

Checks that attribute does not contain a specified value in a certain text.

Parameters:
Name Type Description
selector
attrName
value

(static) attributeEquals(selector, attribute, text)

Source:

Checks if attribute has expected text.

Parameters:
Name Type Description
selector
attribute
text

(static) attributeNotEqual(selector, attribute, text)

Source:

Checks that attribute doesn't have specified text.

Parameters:
Name Type Description
selector
attribute
text

(static) attributeValueNotLessThan(selector, attrName, minValue)

Source:

Checks that attribute value is not less than a specified value.

Parameters:
Name Type Description
selector
attrName
minValue

(static) attributeValueNotMoreThan(selector, attrName, maxValue)

Source:

Checks that attribute value is not more than a specified value.

Parameters:
Name Type Description
selector
attrName
maxValue

(static) checkboxChecked(selector, checked)

Source:

Checks that checkbox will be selected/unselected.

Parameters:
Name Type Description
selector
checked

(static) clickable(selector)

Source:

Checks if element is clickable.

Parameters:
Name Type Description
selector

(static) condition(conditionFunction, message)

Source:

Checks that provided condition is met. You can use it when no other expectation doesn't fit your current needs.

Parameters:
Name Type Description
conditionFunction
message

(async, static) count(selector, expectedCount)

Source:

Checks that number of elements are present.

Parameters:
Name Type Description
selector
expectedCount

(async, static) countAtLeast(selector, expectedCount)

Source:

Checks not less than certain number of elements are present.

Parameters:
Name Type Description
selector
expectedCount

(async, static) dateValue(selector, dateValue, defaultDateFormat)

Source:

Checks that date component has an expected value

Parameters:
Name Type Description
selector
dateValue
defaultDateFormat

(async, static) disabled(selector)

Source:

Checks that element is disabled.

Parameters:
Name Type Description
selector

(async, static) displayed(selector)

Source:

Checks that element is in DOM and visible to the user.

Parameters:
Name Type Description
selector

(async, static) emptyText(selector)

Source:

Checks that it is an empty text for a certain element.

Parameters:
Name Type Description
selector

(static) enabled(selector)

Source:

Checks that element is enabled (opposite to disabled), you can use it to check that element is not disabled anymore and you can perform some actions.

Parameters:
Name Type Description
selector

(static) hasAttribute(selector, attrName)

Source:

Checks if element has a certain attribute name.

Parameters:
Name Type Description
selector
attrName

(static) hasNoAttribute(selector, attrName)

Source:

Checks that element doesn't have a certain attribute name.

Parameters:
Name Type Description
selector
attrName

(static) hasNoScroll(selector)

Source:

Checks that element doesn't have a scrolling.

Parameters:
Name Type Description
selector

(static) hasScroll(selector)

Source:

Checks that element has a scrolling.

Parameters:
Name Type Description
selector

(static) notDisplayed(selector)

Source:

Checks that element is not visible to user but can be present in DOM.

Parameters:
Name Type Description
selector

(static) notPresent(selector)

Source:

Checks that element is not visible to user and not present in DOM.

Parameters:
Name Type Description
selector

(static) present(selector)

Source:

Checks that element might be not visible to the user but present in DOM.

Parameters:
Name Type Description
selector

(static) presentWithText(selector)

Source:

Checks that element containing a specified text is present.

Parameters:
Name Type Description
selector

(static) readOnly(selector)

Source:

Checks that element has readonly attribute.

Parameters:
Name Type Description
selector

(static) textContains(selector, text)

Source:

Checks that element contains a certain text.

Parameters:
Name Type Description
selector
text

(static) textEquals(selector, text)

Source:

Checks that element has a certain text.

Parameters:
Name Type Description
selector
text

(static) textMatches(selector, regex)

Source:

Checks that element doesn't have a certain text.

Parameters:
Name Type Description
selector
regex

(static) textNotEqual(selector, text)

Source:

Checks that element doesn't have a certain text.

Parameters:
Name Type Description
selector
text

(static) withLocaleDate(expectationFunction, defaultDateFormat)

Source:

This function is used with a combination in other function to check a date in a local date format.

Parameters:
Name Type Default Description
expectationFunction
defaultDateFormat MMM D, YYYY