It is possible to Control what types of steps are written to the test results using the following statements.
Reporter.Filter=<Filter value>
The <Filter value> must use one of the following QTP built-in variables. 1-rfEnableAll- Report all steps.This is the default setting
2-rfEnableErrorsAndWarnings- Only report error(failed)and warning steps.
3-rfEnableerrorsOnly- Only report error steps.
4-rfDisableAll- Does not report any steps.
|
The following code shows how to suppress a single checkpoint’s Pass/Fail status:
‘Store the Old filter value’
OldFilter=Reporter.Filter ‘Disable reporting of all events’
Reporter.Filter=rfDisableAll
Set op=Browser(“Browser”).Page(“page”)
chkStatus=op.WebEdit(“Username”).Check(Checkpoint(“username”)) if chkStatus Then
Msgbox “Passed” Else Msgbox “Failed” End if. |