Number Example

The following example demonstrates how to create and pass number 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 N1 As Integer = CType(args("Num1"), Integer)
    Dim N2 As Integer = CType(args("Num2"), Integer)
      With _desktop.Window("@caption='Untitled - Notepad'")
        .TextField().TypeKeys("<Enter>"+ "Numbers" + "<Enter>")
      End With
  End Sub

  Public Sub Main()
    Dim args As New Dictionary(Of String, Object)
      args.Add("Num1", 35)
      args.Add("Num2", 25)
  End Sub
End Module