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
Copy file name to clipboardExpand all lines: support/power-platform/power-automate/desktop-flows/ui-automation/wrong-ui-element-clicked-populated.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,17 +7,17 @@ ms.custom: sap:Desktop flows\UI or browser automation
7
7
---
8
8
# Wrong UI element is clicked or populated in desktop flow
9
9
10
-
This article resolves an issue in which Power Automate for desktop interacts with the wrong UI element instead of the element that you captured during flow design. This issue occurs even though the Test Selector tool detects the right element.
10
+
This article resolves an issue in which Power Automate for desktop interacts with the wrong UI element instead of the element that you captured during flow design. This issue occurs even though the [Test Selector](/power-automate/desktop-flows/test-selectors) tool detects the right element.
11
11
12
12
## Symptoms
13
13
14
-
When you run a desktop flow that includes UI automation actions such as _Click UI element in window_ or _Populate text field in window_, the flow interacts with a different UI element than the one that you originally captured.
14
+
When you run a desktop flow that includes UI automation actions such as [Click UI element in window](/power-automate/desktop-flows/actions-reference/uiautomation#click) or [Populate text field in window](/power-automate/desktop-flows/actions-reference/uiautomation#populatetextfield), the flow interacts with a different UI element than the one that you originally captured.
15
15
16
16
You might observe the following symptoms:
17
17
18
18
- The action runs without errors but targets an unexpected element.
19
19
- The wrong element receives the click or text input during runtime.
20
-
- The _Test Selector_ tool successfully identifies the correct element during design time.
20
+
- The [Test Selector](/power-automate/desktop-flows/test-selectors) tool successfully identifies the correct element during design time.
21
21
22
22
## Cause
23
23
@@ -29,18 +29,18 @@ To resolve this issue, use a combination of UI automation and mouse and keyboard
29
29
30
30
### Click an element by using hover and mouse click
31
31
32
-
Instead of using the **Click UI element in window** action, follow these steps:
32
+
Instead of using the [Click UI element in window](/power-automate/desktop-flows/actions-reference/uiautomation#click) action, follow these steps:
33
33
34
-
1. Add a **Hover mouse over UI element in window** action, and select the target UI element.
35
-
1. Add a **Send mouse click** actionimmediately after to click the element.
34
+
1. Add a [Hover mouse over UI element in window](/power-automate/desktop-flows/actions-reference/uiautomation#hoveronelement) action, and select the target UI element.
35
+
1. Add a [Send mouse click](/power-automate/desktop-flows/actions-reference/mouseandkeyboard#sendmouseclick) action, placed immediately after the hover action, to click the element.
36
36
37
37
To prevent focus-related issues, this approach makes sure that the element receives focus through the hover action before the click is sent.
38
38
39
39
### Populate a text field by using focus and send keys
40
40
41
-
Instead of using the **Populate text field in window** action, follow these steps:
41
+
Instead of using the [Populate text field in window](/power-automate/desktop-flows/actions-reference/uiautomation#populatetextfield) action, follow these steps:
42
42
43
-
1. Add a **Focus text field in window** action, and select the target text field.
44
-
1. Add a **Send keys** action to input the desired text.
43
+
1. Add a [Focus text field in window](/power-automate/desktop-flows/actions-reference/uiautomation#focustextfield) action, and select the target text field.
44
+
1. Add a [Send keys](/power-automate/desktop-flows/actions-reference/mouseandkeyboard#sendkeys) action to input the desired text.
45
45
46
46
To make sure that text is entered in the intended field, this approach explicitly sets the focus to the correct text field before the keystrokes are sent.
0 commit comments