Write and explain various loop command?
A for loop instructs WinRunner to execute one or more statements a specified number of times. It has the following syntax: for ( [ expression1 ]; [ expression2 ]; [ expression3 ] )statement i. First, expression1 is executed. Next, expression2 is evaluated. If expression2 is true, statement is executed and expression3 is executed. The cycle is repeated as long as expression2 remains true. If expression2 is false, the for statement terminates and execution passes to the first statement immediately following. ii. For example, the for loop below selects the file UI_TEST from the File Name list iii. in the Open window. It selects this file five times and then stops. set_window (“Open”) for (i=0; i<5;> list_select_item(“File_Name:_1″,”UI_TEST”); #Item Number2 b) A while loop executes a block of statements for as long as a specified condition is true. It has the following syntax: while ( expression ) statement ; i. While expression is true, the statement is executed. The loop ends when the ex