Boolean Example

The following example demonstrates how to create and pass boolean 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 B1 As Boolean = CType(args("Bool1"), Boolean)
    Dim B2 As Boolean = CType(args("Bool2"), Boolean)

    With _desktop.Window("@caption='Untitled - Notepad'")
      .TextField().TypeKeys("<Enter>" +"Boolean Values" + "<Enter>")
    End With
  End Sub

  Public Sub Main()
  Dim args As New Dictionary(Of String, Object)
    args.Add("Bool1", True) 
    args.Add("Bool2", False) 
  End Sub
End Module