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.
autifyequalsautify: Test passesautifyequalsAutify: Test fails
Not equals
Asserts that the target and the specified value are not the same.
autifynexusnot equalsautify nexus: Test passesautifynot equalsautify: 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 Autifymatches regexHello .+: Test passesHello Autifymatches regex\d+: Test fails
Contains
Asserts that the target contains a complete subsequence of the characters in the specified value.
autifycontainsaut: Test passesautifycontainsay: Test fails
Does not contain
Asserts that the target does not contain the specified value.
autifydoes not containz: Test passesautifydoes not containti: Test fails
Starts with
Asserts that the target begins with the specified value.
autifystarts withau: Test passesautifystarts withfy: Test fails