Collections:
Use "if ..." Command in Selenium IDE for Chrome
How to Use "if ..." Command in Selenium IDE for Chrome?
✍: FYIcenter.com
When using "if ..." Commands in test steps in Selenium IDE for Chrome,
you need to remember the following:
1. Use "if ... end" to form a single branch of test steps.
2. Use "if ... else ... end" to form two branches of test steps.
3. Use "if ... else if ... else ... end" to form multiple branches of test steps.
4. Use JavaScript Boolean expression syntax to specify conditions to "if" and "else if" commands.
5. ${variable} is allowed in condition expressions.
Here is a sample test called "Condition" on how to use variables:
1 execute script | return (new Date()).getDay(); | day
2 echo | ${day}
3 if | ${day} < 1
4 echo | Sunday
5 else if | ${day} > 5
6 echo | Saturday
7 else
8 echo Weekday
9 end
Here is the log output when you execute the above test.
1. executeScript on return (new Date()).getDay(); with value day OK
echo: 0
3. if on ${day} < 1 OK
echo: Sunday
5. elseIf on ${day} > 5 OK
7. else OK
9. end OK
⇒ Use "while ..." Command in Selenium IDE for Chrome
⇐ Use Variable in Selenium IDE for Chrome
2019-05-30, ∼5124🔥, 0💬
Popular Posts:
What are JMeter command line options? You can get see JMeter command line options by running this co...
How to valid IP addresses? In order to help your programming or testing tasks, FYIcenter.com has des...
How to perform UUDecode (Unix-to-Unix Decode)? UUEncode is Unix-to-Unix encoding used on Unix system...
How to see my IP address Host Name? To help you to see your IP Address Host Name, FYIcenter.com has ...
How to valid UUID/GUID strings? In order to help your programming or testing tasks, FYIcenter.com ha...