Assert field's value

Prev Next

The Assert field’s value assertion can be used to check the content of an <input> or <textarea> element against a variety of different match types, such as “equals”, “contains” and “matches regex”.

Creating an Assert field’s value assertion

When making an Assert field’s value assertion, you must specify the following items:

Item

Explanation

Target

The element to be asserted.

Match type

Defines how the element’s value will be compared with an expected value.

Text

The expected value for the target based on the selected match type.

The Assert field’s value assertion is case-sensitive and does not remove whitespace from the target or the specified value.

Match types

The following are all the match types available for the Assert field’s value assertion in Autify Nexus.

Equals

Asserts that the target and the specified value are exactly the same.

  • autify equals autify: Test passes

  • autify equals Autify: Test fails

Not equals

Asserts that the target and the specified value are not the same.

  • autifynexus not equals autify nexus: Test passes

  • autify not equals autify: Test fails

Matches regex

Asserts that the target matches the specified regular expression pattern. Unlike regular expressions used in some programming languages, do not enclose it in backslashes / when using it in Autify Nexus.

  • Hello Autify matches regex Hello .+: Test passes

  • Hello Autify matches regex \d+: Test fails

Contains

Asserts that the target contains a complete subsequence of the characters in the specified value.

  • autify contains aut: Test passes

  • autify contains ay: Test fails

Does not contain

Asserts that the target does not contain the specified value.

  • autify does not contain z: Test passes

  • autify does not contain ti: Test fails

Starts with

Asserts that the target begins with the specified value.

  • autify starts with au: Test passes

  • autify starts with fy: Test fails