The following example demonstrates how to create and pass enum parameters between a parent and child script that test the Notepad application.
Public Module Main Dim _desktop As Desktop = Agent.Desktop Public Sub Main() Dim args As New Dictionary(Of String, Object) args("Day") = DayOfWeek.Friday Workbench.RunScript("ChildDayScript", args) End Sub End Module
Public Module Main Dim _desktop As Desktop = Agent.Desktop Public Sub Main(args As IDictionary(Of String, Object)) Dim day As DayOfWeek = args("Day") With _desktop.Window("/Window[@caption='Untitled - Notepad']") .TextField().TypeKeys("The day of the week is " + day.ToString() + ".") End With End Sub End Module