More

    Reporting Modes in UFT

    Reporter object in UFT has different reporting modes. This post discusses about various mode available in reporter object.

    Available reporting modes in UFT are

    Report ModeDescription
    0 or rfEnableAllAll events are displayed in the Run Results.
    This is the Default report mode
    1 or rfEnableErrorsAndWarningsOnly events with a warning or fail status are displayed in the Run Results.
    2 or rfEnableErrorsOnlyOnly events with a fail status are displayed in the Run Results.
    3 or rfDisableAllNo events are displayed in the Run Results.

    You can use the Report.Filter method to determine which steps or types of steps are included in the Run Results. You can completely disable or enable reporting of steps following the statement, or you can indicate that you only want subsequent failed or failed and warning steps to be included in the report. You can also use the Report.Filter method to retrieve the current report mode.

    CodeDescription
    Reporter.Filter = rfDisableAllDisables reporting of subsequent steps.
    Reporter.Filter = rfEnableAllEnables reporting of subsequent steps.
    Reporter.Filter = rfEnableErrorsOnlyInstructs UFT to include only subsequent failed steps in the Run Results.
    Reporter.Filter = rfEnableErrorsAndWarningsInstructs UFT to include only subsequent Failed or Warning steps in the Run Results
    myReportMode = Reporter.FilterReturns current Report Mode.

    Sample Code

    Dim myReportMode
    reporter.Filter = rfDisableAll
    PrintReportMode("rfDisableAll")
    reporter.Filter = rfEnableAll
    PrintReportMode("rfEnableAll")
    reporter.Filter = rfEnableErrorsOnly
    PrintReportMode("rfEnableErrorsOnly")
    reporter.Filter = rfEnableErrorsAndWarnings
    PrintReportMode("rfEnableErrorsAndWarnings")
    
    Sub PrintReportMode(ByVal reportModeName)
     myReportMode = reporter.Filter
     print myReportMode & " - " & reportModeName
    End Sub

    The output of the above sample code would be

    3 - rfDisableAll
    0 - rfEnableAll
    2 - rfEnableErrorsOnly
    1 - rfEnableErrorsAndWarnings

    Related Articles

    Recent Articles

    How to fix Date Time data type issue in Blue Prism?

    Know more about the date time issue while using the code stage in Blue Prism and understand how to fix it by dealing with the UTC offset.

    How to deserialize JSON in UiPath?

    Tutorial on how to properly deserialize JSON with UiPath Web Activities. Explains the concept of JSON Array and JSON Object.

    Dynamic or Variable Selectors in UiPath

    Tutorial on how to use dynamic selectors in UiPath. Explains how to use variables in UiPath selectors.

    Change Case Excel Add-In

    Change Case Excel Add-In is a powerful Excel Add-In that can change the case of selected cells. With easy to use Keyboard shortcuts, perform case conversion in style.

    Blue Prism Video Tutorial

    A well-structured video tutorial on Blue Prism, which is the right starting point for your RPA career. #rpa #blueprism

    Leave a Reply

    This site uses Akismet to reduce spam. Learn how your comment data is processed.

    Stay on top - Get latest articles in your inbox