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
title: UI automation actions fail after Block Input action
3
-
description: Resolves an issue where UI or web automation actions that involve mouse or keyboard input don't work as expected after a Block Input action in Power Automate for desktop.
4
-
ms.reviewer: nimoutzo, jspantouris
5
-
ms.author: iomimtso
2
+
title: Troubleshoot UI Automation Action Failures After a Block Input Action
3
+
description: Learn how to resolve issues with UI or web automation actions failing after a Block Input action in Power Automate for desktop. Explore solutions and alternatives.
ms.custom: sap:Desktop flows\UI or browser automation
8
7
---
9
8
# UI automation actions fail after Block Input action
10
9
11
-
This article provides resolutions for an issue where UI or web automation actions that involve mouse or keyboard input don't work as expected after you use a Block Input action in Power Automate for desktop.
10
+
This article provides solutions for an issue where UI or web automation actions that involve mouse or keyboard input don't work as expected after you use a _Block Input_ action in Power Automate for desktop.
12
11
13
12
## Symptoms
14
13
@@ -33,46 +32,47 @@ The following actions might not work correctly after a Block Input action:
33
32
The Block Input action requires elevated rights to run because of its critical functionality. When Block Input is active with **Block It** set to **True**, it can interfere with subsequent UI or web automation actions that require physical mouse or keyboard input.
34
33
35
34
> [!NOTE]
36
-
> The Block Input action is functional only when you run a desktop flow through the console or debug it through the designer, and only if Power Automate for desktop runs with elevated rights. For more information, see [Run Power Automate with elevated rights](/power-automate/desktop-flows/how-to/run-power-automate-elevated-rights).
35
+
> The Block Input action works only when you:
36
+
>
37
+
> - Run a desktop flow through the console or debug it through the designer.
38
+
> - Run Power Automate for desktop runs with elevated rights.
39
+
>
40
+
> For more information, see [Run Power Automate with elevated rights](/power-automate/desktop-flows/how-to/run-power-automate-elevated-rights).
37
41
38
-
## Resolution
39
-
40
-
Use one of the following methods to resolve this issue.
41
-
42
-
### Method 1: Avoid using the Block Input action
42
+
## Solution 1: Don't use the Block Input action
43
43
44
44
If possible, design your flow without the Block Input action to prevent this issue.
45
45
46
-
### Method 2: Use alternative mouse and keyboard actions
46
+
##Solution 2: Use alternative mouse and keyboard actions
47
47
48
-
If you need to use Block Input and perform mouse actions, use the following actions from the **Mouse and keyboard** category instead of UI automation actions. For more information, see [Mouse and keyboard actions reference](/power-automate/desktop-flows/actions-reference/mouseandkeyboard).
48
+
If you need to use Block Input and perform mouse actions, use one of the following actions from the **Mouse and keyboard** category instead of UI automation actions. For more information, see [Mouse and keyboard actions reference](/power-automate/desktop-flows/actions-reference/mouseandkeyboard).
49
49
50
-
#### Option A: Use Move mouse and Send mouse click actions
50
+
###Alternative A: Use Move mouse and Send mouse click actions
51
51
52
52
1. Use the **Move mouse** action to move the mouse pointer to a specific position.
53
-
2. Use the **Send mouse click** action to perform the click.
53
+
1. Use the **Send mouse click** action to perform the click.
54
54
55
-
The **Move mouse** action requires you to specify coordinates. You can use the **Relative to** parameter to specify whether the new mouse position is relative to:
55
+
The **Move mouse** action requires you to specify coordinates. Use the **Relative to** parameter to specify whether the new mouse position is relative to:
56
56
57
57
-**Current Mouse Position**
58
58
-**Active Window** (the foremost window)
59
59
-**Screen** (relative to the upper-left corner of the screen)
60
60
61
-
#### Option B: Use Move mouse to Image action
61
+
###Alternative B: Use Move mouse to Image action
62
62
63
63
Use the **Move mouse to Image** action with the **Send Click after moving mouse** option enabled. This action moves the mouse to the position of a specified image on the screen and then sends a click.
64
64
65
-
#### Option C: Use Move mouse to Text on Screen (OCR) action
65
+
###Alternative C: Use Move mouse to Text on Screen (OCR) action
66
66
67
67
Use the **Move mouse to Text on Screen (OCR)** action with the **Send a click after moving mouse** option enabled. This action uses optical character recognition (OCR) to locate text on the screen, moves the mouse to that position, and then sends a click.
68
68
69
-
### Method 3: Temporarily disable Block Input
69
+
### Solution 3: Temporarily disable Block Input
70
70
71
71
If you need to use Block Input but also need to perform actions that require physical input, use this approach:
72
72
73
73
1. Use the **Block Input** action with **Block It** set to **True** when you need input blocked.
74
-
2. Before executing a UI or web automation action that requires mouse or keyboard input, add a **Block Input** action with **Block It** set to **False**.
75
-
3. Execute the UI or web automation action.
76
-
4. If you still need to block input after the action, add another **Block Input** action with **Block It** set to **True**.
74
+
1. Before executing a UI or web automation action that requires mouse or keyboard input, add a **Block Input** action with **Block It** set to **False**.
75
+
1. Execute the UI or web automation action.
76
+
1. If you still need to block input after the action, add another **Block Input** action with **Block It** set to **True**.
77
77
78
78
This method allows you to temporarily enable physical input for specific actions while maintaining input blocking for the rest of the flow.
0 commit comments