Inquiry for If Statement and Datatable.

Inquiry for If Statement and Datatable.

Home Forums Ask Expert Inquiry for If Statement and Datatable.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #32186
    Sasha ZAP
    Moderator

      Hello reishinmarak,

      Basically yes, all tests in ZAPTEST work with multiple iterations as long as you enable it in the Test Settings.
      The if statement is not a loop, th.ere are other commands for loop (such as While, and For) but these commands are available only in ZAPTEST Enterprise Edition.
      You can use some small looping (Only 3 iterations in the Free Edition and Unlimited iterations in ZAPTEST Enterprise Edition) with the If…Then statement in the ZAPTEST Free Edition.

      Here is an example of such script (You can set the “A” column’s data in the Datatable with any data you wish, such as, Browsers’ types, numbers, strings, etc):

      x = Datatable.Value(“A”)
      If x <> 3 Then
      MsgBox Datatable.Value(“A”)
      End If

      To enable the small loop in the above script you need to select the “Run All Rows” in the Test Settings.

      Hope this helps.

      Thanks,
      ZAPTEST Team

    Viewing 1 post (of 1 total)
    • You must be logged in to reply to this topic.

    Virtual Expert

    ZAPTEST

    ZAPTEST Logo