Top Rounds
| We are Hiring! |

If condition ·

If the if condition is page dependent use

if (_condition(booleanExpression))

Eg.

if (document.loginForm.userName == "karthik"){...}

should be written as

if (_condition(document.loginForm.userName == "karthik")){...}

_condition need not be added if the condition does not depend on any page’s DOM.


Related topics

Sahi Scripting Basics - Part 1
Sahi Scripting Basics - Part 2
Sahi Scripting - Calling Java
Scripting Changes in Sahi V2
For loops
While loops
If condition
Functions
Exception handling using try-catch
Recovering without try-catch using _setRecovery




---


Top Rounds