Generative AI-Based Testing Certification
Generative AI-Based Testing Certification
Validations
Validations are typically about something visible on the page. There are many different types of validations you can use with the “check” command. Alternatively, you can use verify/assert/validate/assess – they are all supported and equal to check.
- contains/doesn’t contain (text)
check that "my_div" contains "error"
- is blank/is not blank
- matches regex/doesn’t match regex
- has value/doesn’t have value (for inputs/text areas)
- is checked/is not checked
check that checkbox "<label>" is not checked
- is disabled/is enabled
- is visible/is invisible
- color is
- is clickable/is not clickable
- cursor is
- has CSS class
- background color is
- has property
check that property "background-color" of "my-div" is equal to "black"
- has options selected (for selects)
check that "mySelect" has option selected "hello"
Use the word itself to perform validation on a stored value:
call api "https://testrigor.com" and save it as "variableName"
check that stored value "variableName" itself contains "James"
The key to the testing API results is to save it to stored value and then perform validation on stored value itself (with keyword itself) as shown above.
Both element and stored value validations support:
- is equal as a number to/is not equal as a number to
- is greater than
- is greater or equal than
- is less than
- is less or equal than
You can also enjoy validations that apply to the whole screen/page:
- page contains/page doesn’t contain
check that page contains "error message"
- page has regex/page doesn’t have regex
- page’s return code is
- title is
- title contains
- url is/url is not
- url contains/url doesn’t contain
- url starts with/url doesn’t start with
- url ends with/url doesn’t end with
- url matches regex/url doesn’t match regex
For example, you can combine stored values for validation:
check that url matches regex from the string with parameters "${homePrefix}/product/${type}/[0-9A-Za-z\-]+"