Array Example

The following example demonstrates how to create and pass array parameters in a single script that tests the Notepad application.

The script contains:
Public Module Main
 Dim _desktop As Desktop = Agent.Desktop

  Public Sub Main(args As IDictionary(Of String, Object))
    Dim A1() As Integer = CType(args("Arr1"), Integer())
      With _desktop.Window("@caption='Untitled - Notepad'")
      .TextField().TypeKeys("Array Numbers<Enter>")
      For Each num As Integer In A1

      End With
  End Sub

  Public Sub Main()
    Dim args As New Dictionary(Of String, Object)
    args("Arr1") = New Integer() {1,2,3,4,5}
  End Sub
End Module