System Variables - Loop
- Updated: 2020/05/11
System Variables - Loop
A Loop system variable complements the Loop command and works within the scope of a defined loop. Most loop variables have no value when used outside of loops.
You can manage your Loop command using the variable options in the following table.
Example 1:
Start Loop "Each File In Folder D:\My Desktop\JAVA"
Comment: Please enter your commands to loop. Use $filename$.$extension$ variable for each file name in the Loop.
End Loop
Start Loop "Each row in an Internet Explorer Table of Session: Default"
Comment: Please enter your commands to loop. Use $TableColumn$ variable for each row in Table.
End Loop
Example 2:
- Comment: -------------------------------------- Start XML Session-------------------------------
-
XML : Start XML Session using existing file "D:\My Desktop\XML Files\Bookstore - 1.xml"Session:Session1
- Comment: -------Get Multiple Nodes, I have set Xpath Xpression as Book [1], means only First Occurance -------
- XML : Get Multiple Nodes text value from XPath expression "//book[1]/author". Session:Session1
- Comment: -------------- Use Loop for "Each Node in XML Dataset" -----------------------
- Start Loop "Each Node In a XML Dataset Session: Session1"
- Comment: --------- Pring Node Value to Message box using SYSTEM Variable "XML Data Node (Node Name)" ---------
- Message Box: "$XML Data Node(author)$"
- End Loop
- Comment: ------------ Get Multiple Nodes, I have set Xpath Xpression as "Lang", means only All Occurance --------
- XML : Get Multiple Nodes attributes name "lang" from XPath expression "//book/title ". Session:Session1
- Comment: -------------- Use Loop for "Each Node in XML Dataset" -----------------------
- Start Loop "Each Node In a XML Dataset Session: Session1"
- Comment: ---------Pring Node Value to Message box using SYSTEM Variable "XML Data Node (Node Name)" --------
- Message Box: "$XML Data Node(lang)$"
- End Loop