You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
18
18
19
19
> There was a problem running the action 'Click'. The link could not be clicked on the web page.
20
20
21
21
## Cause
22
22
23
23
Unattended run failures might occur due to the following reasons:
24
24
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.)
27
27
- Screens might not completely load due to insufficient delays or timing issues in the script.
28
28
- A User Account Control (UAC) prompt might block UI automation when the session begins.
29
29
30
30
## Resolution
31
31
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.
33
33
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.
35
35
36
36
### Add screenshots to troubleshoot
37
37
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.
39
39
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.
41
41
42
42
1. Locate the **Take screenshot** action.
43
43
@@ -57,7 +57,7 @@ You can capture screenshots immediately before and after a failing step in unatt
57
57
58
58
In this example, the **Launch new Microsoft Edge** action is the failing action and is surrounded by the screenshot actions.
59
59
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":::
61
61
62
62
1. Change the "On error" behavior of the failing action:
63
63
@@ -77,7 +77,7 @@ You can capture screenshots immediately before and after a failing step in unatt
77
77
78
78
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.
79
79
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.
81
81
82
82
1. Copy and paste the following code snippet into the [Power Automate desktop flow designer](/power-automate/desktop-flows/flow-designer).
83
83
@@ -116,4 +116,4 @@ In some cases, such as when using a virtual machine (VM) or Hyper-V, the display
0 commit comments