Insert a verification to determine if the script result matches the expected result.
Workbench.Verify(expected As Object, actual As Object)
For example, Workbench.Verify("red", "red") passes. While Workbench.Verify("red", "green") fails with the message Actual: [green]; Expected: [red].
Workbench.Verify(expected As Object, actual As Object, comment As String)
For example, Workbench.Verify("red", "green", "checking colors") fails with the message checking colors - Actual: [green]; Expected: [red].
Workbench.Verify(expected As Object, actual As Object, comment As String, verifyFlags As VerifyFlags)
For example, Workbench.Verify("red", "green", "checking colors", verifyFlags.ScreenShotOnFailure) fails with the message checking colors - Actual: [green]; Expected: [red] and adds a screenshot to the result file.
Workbench.Verify(condition As Boolean)
For example, Workbench.Verify(True) passes. While Workbench.Verify(False) fails.
Workbench.Verify(condition As Boolean, comment As String)
For example, Workbench.Verify(True, "Test Passed") passes. While Workbench.Verify(False, "Test Failed") fails.
Workbench.Verify(condition As Boolean, comment As String, verifyFlags As VerifyFlags)
For example, Workbench.Verify(True, "Test Passed", verifyFlags.ScreenShotOnFailure) passes and adds no screenshot. While Workbench.Verify(False, "Test Failed", ScreenShotOnFailure) fails and adds a screenshot to the result file.
Workbench.Verify(expectedEnumerable, actualEnumerable)
Dim selectedItemsList = listBox.SelectedItems ' we assume that a list with the items "red" and "blue" is returned Dim expectedItemsList = New List(Of String)() expectedItemsList.Add("red") expectedItemsList.Add("blue") Workbench.Verify(selectedItemsList, expectedItemsList) ' verification passes Dim expectedItemsArray = New String() { "red", "blue" } Workbench.Verify(selectedItemsList, expectedItemsArray) ' verification passes