Runner Diagnostics: Automatic Failure Screenshot Capture

Estimated reading: 3 minutes

The Automatic Failure Screenshot Capture feature helps diagnose automation failures by capturing the application state when an activity fails during workflow execution.
When a failure occurs, the Runner automatically captures a screenshot of the application and, when possible, identifies and highlights the associated UI element. The captured diagnostics provide visual context, making it easier to identify and resolve automation issues.

Prerequisites

Before using this feature, ensure that:
a. The Troubleshoot option is enabled in the Runner Configuration.
b. The Runner has permission to create and store diagnostic files in the local troubleshooting directory.

Limitations

This feature is available only for the supported automation packages.

Configuration

To enable automatic failure screenshot capture:

1. Open the Runner Configuration window.
2. Enable the Troubleshoot option. When enabled, the Runner creates the following local directory:
    C:\Users\(Username)\AppData\Local\RobilityRunner\
This directory contains the Troubleshoot.config file, which controls failure screenshot capture and UI element highlighting.
When a failure is detected, the Runner automatically stores failure screenshots and diagnostic artifacts in workflow-specific folders under the Exceptions directory.

Note: Each workflow has its own folder within the Exceptions directory.

Supported Automation Packages

This feature supports activities from the following automation packages:

1. Desktop Automation
2. Desktop Automation UIA3
3. Modern Desktop Automation
4. Image Automation
5. Web Automation

How It Works

During workflow execution, the Runner enters the To Check Status stage, where it monitors the outcome of each supported activity.
If an activity fails and the configured trigger conditions are met, the Runner automatically:
1. Records diagnostic information.
2. Captures the application state.
3. Identifies and highlights the associated UI element, when available.
4. Stores the collected diagnostics in the workflow-specific Exceptions folder.

Failure Capture Behavior

Capture Screenshot

When a supported activity fails, the Runner captures the current application state.
Each screenshot:
a. Reflects the application state at the time of failure.
b. Is stored in the corresponding workflow folder.
c. Uses a unique filename to prevent overwriting existing screenshots.
Example filename: ActivityName_Timestamp.png

Highlight Failed UI Element

After capturing the screenshot, the Runner attempts to identify the UI element associated with the failed activity.
If the UI element is identified:
a. The element is highlighted in the screenshot.
b. An automation snapshot of the element is included, when available.
If the UI element cannot be identified, the Runner still captures the screenshot to preserve the application state at the time of failure.

Failure Screenshot Trigger Conditions

Failure screenshots are captured only when the Troubleshoot option is enabled. The capture behavior depends on the Skip on Error setting.

Skip on Error Behavior
True Workflow execution continues after the error is logged. A failure screenshot is captured only if the activity contains a Result property and its value is False.
False Workflow execution stops when the activity throws an exception, and the Runner immediately captures a failure screenshot and diagnostic information.

Note: Failure screenshot capture applies only to activities from the supported automation packages.

Troubleshooting Benefits

Automatic failure screenshot capture helps users:

1. Identify the failed activity and associated UI element.
2. Preserve the application state at the time of failure.
3. Reduce troubleshooting time.
4. Accelerate root cause analysis.

Share this Doc

Runner Diagnostics: Automatic Failure Screenshot Capture

Or copy link

CONTENTS
Robility Chatbot
Robility Assistant
Online