This week, we released if/else logic and the ability to set the time zone your cases run in.
Conditionals
We have released the ability to use the if/else logic for complex scenarios with more than one possible outcome. The "if-else block" which allows multiple conditions and multiple commands per condition.
Here are the scenarios it can be used in:
Single "if" condition:
if page contains "some text"
click "some text"
click "some button"
end
Single "if" condition with "else":
if page contains "some text"
click "some text"
else
click "some other text"
end
Multiple "if" conditions with "else":
if page contains "some text"
click "some text"
click "some button"
else if page contains button "unfollow"
click "unfollow"
else if page contains button "follow"
click "follow"
else
click "some other text"
end
All the previous examples can also be mixed with rules:
if page contains "some text"
click "some button"
else
wait 10 sec
clean up
end
For a full explanation and plenty of examples check the documentation at: https://testrigor.com/docs/language/#conditional
Time Zone
We created a new setting for timezone in Settings
-> Advanced
. The default value is PST
. This new setting changes the timezone in which test cases will run. It also determines the times that will be generated for built-in variables. It works on all browsers/OS's and mobile.
We also added 3 new built-in variables:
nowHourAmPm
(2)
nowHourTwoDigitsAmPm
(02)
nowAmPm
(pm)
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article