Top Rounds
|

While loops ·

If the while loop condition is page dependent use
while (_condition(booleanExpression)){...}

Eg

while (document.loginForm.userName != "karthik"){ // some statements }

should be written as

while (_condition(document.loginForm.userName != "karthik")){ // some statements }

You do not need to add _condition if the condition is not dependent an the page 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