|
2 | 2 | title: Troubleshoot Failed Unattended Runs Using Screenshots |
3 | 3 | description: Provides troubleshooting steps to identify and resolve issues causing unattended runs to fail in Microsoft Power Automate. |
4 | 4 | ms.reviewer: alarnaud |
5 | | -ms.date: 05/14/2025 |
| 5 | +ms.date: 05/15/2025 |
6 | 6 | ms.custom: sap:Desktop flows\Unattended flow runtime errors |
7 | 7 | --- |
8 | 8 | # Troubleshoot failed unattended runs using screenshots |
9 | 9 |
|
10 | | -This article provides guidance on troubleshooting failed unattended runs of scripts, particularly focusing on capturing screenshots to diagnose issues. |
| 10 | +This article provides guidance on troubleshooting failed unattended desktop flow runs, particularly focusing on capturing screenshots to diagnose issues. |
11 | 11 |
|
12 | 12 | _Applies to:_ Power Automate |
13 | 13 | _Original KB number:_ 5007976 |
14 | 14 |
|
15 | 15 | ## Symptoms |
16 | 16 |
|
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: |
| 17 | +A desktop flow 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 be thoroughly tested in attended mode before being deployed in unattended mode. |
| 25 | +- The script might not have been thoroughly tested in attended mode before being deployed in unattended mode. |
26 | 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. |
@@ -75,7 +75,7 @@ You can capture screenshots immediately before and after a failing step in unatt |
75 | 75 |
|
76 | 76 | ### Check screen resolution and scale differences |
77 | 77 |
|
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. |
| 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. For more information on setting screen resolution in unattended mode, see [Set screen resolution on unattended mode](/power-automate/desktop-flows/how-to/set-screen-resolution-unattended-mode). |
79 | 79 |
|
80 | 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 |
|
@@ -110,10 +110,10 @@ In some cases (for example, when using a virtual machine (VM) or Hyper-V), the d |
110 | 110 | File.WriteText File: $'''c:\\test\\resolution_%FormattedDateTime%.txt''' TextToWrite: $'''height: %MonitorHeight% width: %MonitorWidth% frequency: %MonitorFrequency% bitCount: %MonitorBitCount% scale: %MonitorScaleOutput%''' AppendNewLine: True IfFileExists: File.IfFileExists.Overwrite Encoding: File.FileEncoding.Unicode |
111 | 111 | ``` |
112 | 112 |
|
113 | | - The following screenshot illustrates the steps to capture resolution settings and output them in a timestamped file. |
| 113 | + The script will create the following actions to capture resolution settings and output them in a timestamped file. |
114 | 114 |
|
115 | 115 | :::image type="content" source="media/troubleshoot-unattended-runs-with-screenshots/script-action.png" alt-text="Screenshot of the created steps."::: |
116 | 116 |
|
117 | 117 | 1. Review the output file path from the last action, check that local execution is successful, and select **Save**. |
118 | 118 |
|
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. |
| 119 | +1. Run the script in both attended and unattended modes, then compare the resolution and scale output of both modes, and update, if necessary, to ensure they match in both modes. |
0 commit comments