Wednesday, October 13, 2010

Working with Reporter Object

Reporter Object is used to send information to test results.

ReportEvent Method: Reports an event to the test results
Syntax
Reporter.ReportEvent EventStatus, ReportStepName, Details [, Reporter]
EventStatus: 0 or micPass, 1 or micFail, 2 or micDone, 3 or micWarning
Example:
If(Window("text:=Untitled - Notepad").Wineditor("Class Name:=WinEditor").Exist)Then
Window("text:=Untitled - Notepad").Wineditor("Class Name:=WinEditor").Type("hello")
Reporter.ReportEvent 0, "Notepad exists", "Editor exists for the notepad"
else
Reporter.ReportEvent 1, "Notepad exists", "Editor exists for the notepad"
End if

No comments:

Post a Comment