Generative AI-Based Testing Certification
Cycles & Loops
click "Next" until page contains stored value "previously generated id"
click "Next" up to 12 times until page contains strictly button "Place order"
Note:Â The maximum amount of loops set by testRigor is 42.
Loops with scrolls
scroll down until page contains "something"
scroll down on "element1" up to 10 times until page contains "element2" // scrolls on the position on the screen, not the element itself
scroll up/down on a "container"
scroll down until "I agree" is visible using OCR
scroll down until "I agree" is visible using OCR only
Loops with dynamic waits
A dynamic wait repeatedly waits for a set amount of time until a specified condition is met. This can be useful when an element or text may take longer than the default timeout to appear.
Best practice: Use dynamic waits as little as possible and only when a step may take longer than the default timeout.
wait 5 sec until page contains "text"
wait 5 sec up to 12 times until page contains "text"
In this case, testRigor will check for the element to appear every 5 seconds (up to a minute total, 5 sec x 12 times = 60 seconds), and move to the next step once this criteria is satisfied. If the full 60 seconds pass, the test will fail.
Loops with reusable rules
Next button in a Google search until the page contains the result you’re looking for. You can create a reusable rule that we’ll call scroll and wait for this example using the following steps:scroll down
wait 2 sec
scroll and wait until page contains "Social and Cultural Anthropology"
testRigor executes all commands in the rule before checking the until condition. If the condition is not satisfied, the entire rule runs again. Remember that until executes up to 10 times by default.



