Skip to content

Commit 7d468bf

Browse files
authored
Update troubleshoot-unattended-runs-with-screenshots.md
1 parent e48f2bd commit 7d468bf

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

support/power-platform/power-automate/desktop-flows/troubleshoot-unattended-runs-with-screenshots.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
title: Troubleshoot failed unattended runs using screenshots
2+
title: Troubleshoot Failed Unattended Runs Using Screenshots
33
description: Provides troubleshooting steps to identify and resolve issues causing unattended runs to fail in Microsoft Power Automate.
44
ms.reviewer: alarnaud
5-
ms.date: 05/07/2025
5+
ms.date: 05/14/2025
66
ms.custom: sap:Desktop flows\Unattended flow runtime errors
77
---
88
# Troubleshoot failed unattended runs using screenshots
@@ -14,30 +14,30 @@ _Original KB number:_   5007976
1414

1515
## Symptoms
1616

17-
A script that runs successfully in attended mode fails to execute properly in unattended mode. It might also fail with an error message like:
17+
A script that runs successfully in attended mode fails to execute properly in unattended mode. It might also fail with an error message like the following:
1818

1919
> There was a problem running the action 'Click'. The link could not be clicked on the web page.
2020
2121
## Cause
2222

2323
Unattended run failures might occur due to the following reasons:
2424

25-
- The script might not have been thoroughly tested in attended mode before being deployed in unattended mode.
26-
- The unattended session might use a different configuration compared to the attended session, such as a different Windows account, screen resolution, or browser settings (for example, user profile, popup blocker settings, or missing/disabled extensions.)
25+
- The script might be thoroughly tested in attended mode before being deployed in unattended mode.
26+
- The unattended session might use a different configuration compared to the attended session, such as a different Windows account, screen resolution, or browser settings (for example, user profile, popup blocker settings, missing extensions, or disabled extensions.)
2727
- Screens might not completely load due to insufficient delays or timing issues in the script.
2828
- A User Account Control (UAC) prompt might block UI automation when the session begins.
2929

3030
## Resolution
3131

32-
As there could be different causes for this issue, the following solution describes a method of adding screenshots before and after a failing action to get some visual feedback. Analyzing the screenshots taken before and after the failure in unattended mode can help identify the root cause from the issues listed previously. The solution also describes how to compare display resolution and scale settings between attended and unattended run executions.
32+
As there might be different causes of this issue, the following solution describes a method of adding screenshots before and after a failing action to get some visual feedback. Analyzing the screenshots taken before and after the failure in unattended mode can help identify the root cause from the issues listed previously. The solution also describes how to compare display resolution and scale settings between attended and unattended run executions.
3333

34-
If you've added screenshots in your flow and they fail to execute, you might have a UAC dialog interfering with automation of your flow. Sign in to the machine where the issue occurs using the same Windows account configured for the unattended flow execution, and check for any blocking dialogs. If you have such dialogs, adjust your startup configuration to prevent this issue.
34+
If you add screenshots in your flow and they fail to execute, you might have a UAC dialog interfering with automation of your flow. Sign in to the machine where the issue occurs using the same Windows account configured for the unattended flow execution, and check for any blocking dialogs. If you have such dialogs, adjust your startup configuration to prevent this issue.
3535

3636
### Add screenshots to troubleshoot
3737

38-
You can capture screenshots immediately before and after a failing step in unattended mode using the [Take screenshot](/power-automate/desktop-flows/actions-reference/workstation#takescreenshotbase) action. The screenshots can provide visual feedback to help diagnose the issue. You can configure the failing step to continue on after the failure by modifying its "On error" behavior, allowing a screenshot to be captured after the failure occurs. Once the issue is resolved, revert the "On error" behavior of your flow to its original setting.
38+
You can capture screenshots immediately before and after a failing step in unattended mode using the [Take screenshot](/power-automate/desktop-flows/actions-reference/workstation#takescreenshotbase) action. The screenshots can provide visual feedback to help diagnose the issue. You can configure the failing step to continue after the failure by modifying its "On error" behavior, allowing a screenshot to be captured after the failure occurs. Once the issue is resolved, revert the "On error" behavior of your flow to its original setting.
3939

40-
1. Sign in to the computer that reproduces the problem with the account you're using in your connection. Verify that no UAC prompt is blocking UI automation.
40+
1. Sign in to the computer that reproduces the problem with the account you use in your connection. Verify that no UAC prompt blocks UI automation.
4141

4242
1. Locate the **Take screenshot** action.
4343

@@ -57,7 +57,7 @@ You can capture screenshots immediately before and after a failing step in unatt
5757

5858
In this example, the **Launch new Microsoft Edge** action is the failing action and is surrounded by the screenshot actions.
5959

60-
:::image type="content" source="media/troubleshoot-unattended-runs-with-screenshots/failed-action-surrounded-by-screenshot-actions.png" alt-text="An example of a failed action surrounded by the screenshot actions.":::
60+
:::image type="content" source="media/troubleshoot-unattended-runs-with-screenshots/failed-action-surrounded-by-screenshot-actions.png" alt-text="Screenshot that shows an example of a failed action surrounded by the screenshot actions." lightbox="media/troubleshoot-unattended-runs-with-screenshots/failed-action-surrounded-by-screenshot-actions.png":::
6161

6262
1. Change the "On error" behavior of the failing action:
6363

@@ -77,7 +77,7 @@ You can capture screenshots immediately before and after a failing step in unatt
7777

7878
Many UI automation issues arise due to screen resolution differences between the machines running the attended and unattended sessions. Compare the resolution settings between attended and unattended run executions to ensure they match in both modes.
7979

80-
In some cases, such as when using a virtual machine (VM) or Hyper-V, the display resolution settings might be unavailable or grayed out. As a workaround in such situations, you can add the following actions in your script before running in both modes.
80+
In some cases (for example, when using a virtual machine (VM) or Hyper-V), the display resolution settings might be unavailable or grayed out. As a workaround in such situations, you can add the following actions in your script before running in both modes.
8181

8282
1. Copy and paste the following code snippet into the [Power Automate desktop flow designer](/power-automate/desktop-flows/flow-designer).
8383

@@ -116,4 +116,4 @@ In some cases, such as when using a virtual machine (VM) or Hyper-V, the display
116116

117117
1. Review the output file path from the last action, check that local execution is successful, and select **Save**.
118118

119-
1. Run the script in both attended and unattended modes, then compare the resolution and scale output to ensure they match in both modes.
119+
1. Run the script in both attended and unattended modes, and then compare the resolution and scale output to ensure they match in both modes.

0 commit comments

Comments
 (0)