Skip to content

Commit 52d6a98

Browse files
authored
Merge pull request #8677 from MicrosoftDocs/main
Auto push to live 2025-04-09 02:00:02
2 parents b35b191 + 988729f commit 52d6a98

File tree

10 files changed

+420
-49
lines changed

10 files changed

+420
-49
lines changed

support/power-platform/power-automate/desktop-flows/browser-automation/failed-to-assume-control-of-edge-chrome-firefox-error.md

Lines changed: 100 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,106 +2,171 @@
22
title: Failed to assume control of Edge or Chrome or Firefox error
33
description: Provides a resolution to the error that occurs when running a desktop flow that has a "Launch browser" action in Power Automate.
44
ms.reviewer: nimoutzo, jefernn
5-
ms.date: 05/24/2023
5+
ms.date: 04/09/2025
66
ms.custom: sap:Desktop flows\UI or browser automation
77
---
88
# "Failed to assume control of Microsoft Edge/Chrome/Firefox" error
99

10-
This article provides a resolution for the error that may occur when you run a desktop flow that contains a "Launch browser" action in Microsoft Power Automate. If the error occurs right after a browser update and has the same symptoms, see [Browser automation actions stop working after a browser update](browser-automation-error-after-chromium-update.md).
10+
This article provides a resolution for the error that might occur when you run a desktop flow that contains a Launch Browser action in Microsoft Power Automate. If the error occurs right after a browser update and has the same symptoms, see [Browser automation actions stop working after a browser update](browser-automation-error-after-chromium-update.md).
1111

1212
_Applies to:_   Power Automate
1313
_Original KB number:_   5001691
1414

1515
## Symptoms
1616

17-
When you run a desktop flow that has a "Launch Edge", "Launch Chrome", or "Launch Firefox" action in Microsoft Power Automate, the execution fails with one of the following error messages:
17+
### Scenario 1
1818

19-
> Failed to assume control of Microsoft Edge (Internal error or communication failure).
19+
When you run a desktop flow that has a [Launch new Microsoft Edge](/power-automate/desktop-flows/actions-reference/webautomation#launch-new-microsoft-edge), [Launch new Chrome](/power-automate/desktop-flows/actions-reference/webautomation#launchchromebase), or [Launch new Firefox](/power-automate/desktop-flows/actions-reference/webautomation#launchfirefoxbase) action in Microsoft Power Automate, the execution fails with one of the following error messages:
2020

21-
> Failed to assume control of Chrome (Internal error or communication failure).
21+
- > Failed to assume control of Microsoft Edge (Internal error or communication failure).
22+
- > Failed to assume control of Chrome (Internal error or communication failure).
23+
- > Failed to assume control of Firefox (Internal error or communication failure)
2224
23-
> Failed to assume control of Firefox (Internal error or communication failure)
25+
> [!IMPORTANT]
26+
> To resolve the error:
27+
>
28+
> 1. First run the **Troubleshoot UI/Web automation issues** diagnostic using the [Power Automate for desktop troubleshooter](/power-automate/desktop-flows/troubleshooter).
29+
> 2. When the diagnostic runs, a report is generated that identifies issues. These issues can be resolved by pressing the **Fix** button that appears after the diagnostics check completes.
30+
> 3. If the troubleshooter doesn't resolve the error, proceed to the potential causes and resolutions provided in this article.
31+
32+
### Scenario 2
33+
34+
The error also occurs when you run a Launch Browser action, and the browser is launched using a different system user than the one used to run Power Automate for desktop. For the recommended workaround, see [Cause 3](#cause-3-the-browser-is-launched-using-a-different-system-user-than-the-one-used-to-run-power-automate-for-desktop-version-238-or-higher) in this article.
2435

2536
## Cause 1: Web extension isn't installed properly or enabled
2637

2738
The Microsoft Edge, Google Chrome, or Firefox web extension isn't installed properly or enabled.
2839

29-
## Verifying issue for cause 1
40+
### Verifying issue for cause 1
3041

3142
- Execution of a desktop flow with one of the respective actions fails with the error message.
32-
- Web Recorder initiation for the specific browser shows the below message:
43+
- Web Recorder initiation for the specific browser shows the following message:
3344

34-
:::image type="content" source="media/failed-to-assume-control-of-edge-chrome-firefox-error/you-need-power-automate-desktop-extension.png" alt-text="A message that contains a Get Extension button to install the web extension.":::
45+
:::image type="content" source="media/failed-to-assume-control-of-edge-chrome-firefox-error/you-need-power-automate-desktop-extension.png" alt-text="Screenshot that shows a message containing a Get Extension button to install the web extension.":::
3546

36-
- Note that the web extension might seem to be installed and enabled in the extension repository of the specific browser but the execution to be unsuccessful.
47+
- The web extension might seem to be installed and enabled in the extension repository of the specific browser, but it fails to execute.
3748

3849
### Resolution
3950

4051
1. Install the respective web extension from the Power Automate for desktop designer.
4152

42-
:::image type="content" source="media/failed-to-assume-control-of-edge-chrome-firefox-error/browser-extensions.png" alt-text="Select to install the web extension from the list.":::
53+
:::image type="content" source="media/failed-to-assume-control-of-edge-chrome-firefox-error/browser-extensions.png" alt-text="Screenshot that shows how to install the web extension from the list.":::
4354

4455
2. Even if the extension seems installed and enabled, you need to remove it and reinstall it.
4556
3. Restart the browser.
4657

47-
## Cause 2: Launch browser action takes longer than the default timeout
58+
## Cause 2: Launch Browser action takes longer than the default timeout
4859

49-
Launch of the browser takes longer than the default timeout (30 seconds) of the action. The automation tries to assume control of the browser before opening and as a result the "Launch browser" action fails.
60+
Launch of the browser takes longer than the default timeout (**30** seconds) of the action. The automation tries to assume control of the browser before opening and as a result the Launch Browser action fails.
5061

51-
## Verifying issue for cause 2
62+
### Verifying issue for cause 2
5263

5364
Execution of a desktop flow with one of the respective actions fails with the error message. This behavior might not be consistent (some executions could be successful).
5465

55-
### Resolution
66+
### Resolution 1
67+
68+
In the **Launch new Edge**, **Launch new Chrome**, or **Launch new Firefox** action, increase the values of **Timeout on webpage load** and **Timeout** parameters located in the **Advanced** section. For example, set these values to **120** seconds.
69+
70+
If this adjustment doesn't resolve the issue, follow the steps outlined in [Resolution 2](#resolution-2) or [Resolution 3](#resolution-3).
5671

57-
1. Insert a new "Launch new browser" action as:
58-
- Launch new Edge
59-
- Launch new Chrome
60-
- Launch new Firefox
61-
- Launch new Internet Explorer
72+
### Resolution 2
73+
74+
Use the Launch Browser action to start the process of the corresponding browser. Then a combination of an additional Launch Browser action with mode set to **Attach to running instance** and a [Go to web page](/power-automate/desktop-flows/actions-reference/webautomation#gotowebpagebase) action afterwards can be used to resolve the issue.
75+
76+
1. Insert a new Launch Browser action as:
77+
- **Launch new Microsoft Edge**
78+
- **Launch new Chrome**
79+
- **Launch new Firefox**
80+
- **Launch new Internet Explorer**
6281

6382
2. Set up the parameters of the action:
6483
- Launch mode: Launch new Instance
6584
- Initial URL: A default URL
66-
- Rest parameters can be set as desired.
85+
- The remaining parameters can be set as desired.
6786

68-
:::image type="content" source="media/failed-to-assume-control-of-edge-chrome-firefox-error/parameters-of-launch-new-browser-action.png" alt-text="Set up the parameters of the Launch new browser action.":::
87+
:::image type="content" source="media/failed-to-assume-control-of-edge-chrome-firefox-error/parameters-of-launch-new-browser-action.png" alt-text="Screenshot that shows how to set up the parameters of the Launch new browser action.":::
6988

70-
3. Insert an error handling policy by:
89+
3. Insert an error handling policy:
7190
- Select the **On error** option in the action window:
7291

73-
:::image type="content" source="media/failed-to-assume-control-of-edge-chrome-firefox-error/insert-error-handling-policy-for-action.png" alt-text="Insert an error handling policy by using the On error option.":::
92+
:::image type="content" source="media/failed-to-assume-control-of-edge-chrome-firefox-error/insert-error-handling-policy-for-action.png" alt-text="Screenshot that shows how to insert an error handling policy by using the On error option.":::
7493

7594
- Select **Continue flow run** > **Go to next action** in the dropdown list, and then select **Save**.
7695

77-
:::image type="content" source="media/failed-to-assume-control-of-edge-chrome-firefox-error/save-settings-on-error.png" alt-text="Select the Continue flow run and Go to next action options and then save the settings.":::
96+
:::image type="content" source="media/failed-to-assume-control-of-edge-chrome-firefox-error/save-settings-on-error.png" alt-text="Screenshot that shows how to select the Continue flow run and Go to next action options and then save the settings.":::
7897

79-
4. Insert a new "Launch new browser" action of the same browser as step 1 and set up the parameters of the action:
98+
4. Insert a new Launch Browser action of the same browser as step 1 and set up the parameters of the action:
8099
- Launch mode: Attach to running instance
81100
- Attach to browser tab: By URL
82101
- Tab URL: The URL inserted in step 1.
83-
- Variables produced: Replace the new Browser to variable to the name of the variable produced by step 1.
102+
- Variables produced: Replace the new browser variable with the name of the variable produced in step 1.
84103

85-
:::image type="content" source="media/failed-to-assume-control-of-edge-chrome-firefox-error/replace-variables-produced-browser.png" alt-text="Replace the new Browser to variable to the name of the variable produced by step 1.":::
104+
:::image type="content" source="media/failed-to-assume-control-of-edge-chrome-firefox-error/replace-variables-produced-browser.png" alt-text="Screenshot that shows how to replace the new browser variable with the name of the variable produced in step 1.":::
86105

87106
5. Select the **On error** option and take the following steps:
88107
1. Enable the **Retry action if an error occurs** option.
89108

90-
:::image type="content" source="media/failed-to-assume-control-of-edge-chrome-firefox-error/enable-retry-action-if-an-error-occurs.png" alt-text="Enable the Retry action if an error occurs option.":::
109+
:::image type="content" source="media/failed-to-assume-control-of-edge-chrome-firefox-error/enable-retry-action-if-an-error-occurs.png" alt-text="Screenshot that shows how to enable the Retry action if an error occurs option.":::
91110

92111
2. Set the number of times to **20** by selecting the number of times.
93112
3. Set the interval in seconds to **5** by selecting the number of seconds.
94113
4. Select **Save**.
95114

96-
6. Insert a "Go to Web page" action and set up the parameters of the action:
97-
- Web browser instance: The variable produced by the "Launch new browser" action.
115+
6. Insert a **Go to web page** action and set up the parameters of the action:
116+
- Web browser instance: The variable produced by the Launch Browser action.
98117
- Navigate: To URL
99118
- URL: The URL you would like to navigate to.
100119

101-
:::image type="content" source="media/failed-to-assume-control-of-edge-chrome-firefox-error/select-parameters-in-go-to-web-page.png" alt-text="Configure the parameters of the Go to Web page action.":::
120+
:::image type="content" source="media/failed-to-assume-control-of-edge-chrome-firefox-error/select-parameters-in-go-to-web-page.png" alt-text="Screenshot that shows how to configure the parameters of the Go to web page action.":::
121+
122+
### Resolution 3
123+
124+
Use the Launch Browser action to start the process of the corresponding browser. Then a combination of an additional Launch Browser action with mode set to **Attach to running instance** and a **Wait** action set to a duration afterwards can be used to resolve the issue.
125+
126+
1. Insert a new Launch Browser action as:
127+
- **Launch new Microsoft Edge**
128+
- **Launch new Chrome**
129+
- **Launch new Firefox**
130+
- **Launch new Internet Explorer**
131+
132+
2. Set up the parameters of the action:
133+
- Launch mode: Launch new Instance
134+
- Initial URL: A default URL
135+
- Rest parameters can be set as desired.
136+
137+
:::image type="content" source="media/failed-to-assume-control-of-edge-chrome-firefox-error/parameters-of-launch-new-browser-action.png" alt-text="Screenshot that shows how to set up the parameters of the Launch new browser action.":::
138+
139+
3. Insert an error handling policy:
140+
- Select the **On error** option in the action window:
141+
142+
:::image type="content" source="media/failed-to-assume-control-of-edge-chrome-firefox-error/insert-error-handling-policy-for-action.png" alt-text="Screenshot that shows how to insert an error handling policy by using the On error option.":::
143+
144+
- Select **Continue flow run** > **Go to next action** in the dropdown list, and then select **Save**.
145+
146+
:::image type="content" source="media/failed-to-assume-control-of-edge-chrome-firefox-error/save-settings-on-error.png" alt-text="Screenshot that shows how to select the Continue flow run and Go to next action options and then save the settings.":::
147+
148+
4. Insert a **Wait** action and set its duration to **90** seconds (adjust duration as needed).
149+
150+
:::image type="content" source="media/failed-to-assume-control-of-edge-chrome-firefox-error/wait-action.png" alt-text="Screenshot that shows how to insert a Wait action with value set to 90.":::
151+
152+
5. Insert another Launch Browser action for the same browser used in step 1, and configure the parameters:
153+
- Launch mode: Attach to running instance
154+
- Attach to browser tab: By URL
155+
- Tab URL: The URL inserted in step 1.
156+
- Variables produced: Replace the new browser variable with the name of the variable produced in step 1.
157+
158+
:::image type="content" source="media/failed-to-assume-control-of-edge-chrome-firefox-error/replace-variables-produced-browser.png" alt-text="Screenshot that shows how to replace the new browser variable with the name of the variable produced in step 1.":::
159+
160+
## Cause 3: The browser is launched using a different system user than the one used to run Power Automate for desktop (version 2.38 or higher)
161+
162+
This issue can occur in attended and unattended desktop flow modes.
163+
164+
To resolve the issue, ensure that the browser is launched using the same system user account that's being used to run Power Automate for desktop.
165+
166+
## General checks
102167

103-
Finally, find some general checks that you may apply in case the above actions don't fix the issue:
168+
If the preceding actions don't resolve the issue, ensure the following:
104169

105170
- Make sure that the environmental variable `ComSpec` with value `C:\WINDOWS\system32\cmd.exe` exists on the machine.
106-
- Only for Chrome: Check and set the `exit_type` parameter to `normal` at _%localappdata%\Google\Chrome\User Data\Default\Preferences_.
107-
- Clear the cache and cookies from the browser manually and restart the browser.
171+
- (Chrome only) Check and set the `exit_type` parameter to `normal` at _%localappdata%\Google\Chrome\User Data\Default\Preferences_.
172+
- Clear the browser cache and cookies manually, and then restart the browser.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
title: Press Button or Click Link on Web Page Doesn't Work with File Uploader
3+
description: Solves issues related to interactive file uploaders in web automation.
4+
ms.custom: sap:Desktop flows\UI or browser automation
5+
ms.reviewer: amitrou
6+
ms.author: amitrou
7+
author: andreas-mitrou
8+
ms.date: 04/09/2025
9+
---
10+
# Press button or click link on web page doesn't work with a file uploader
11+
12+
This article provides workarounds for scenarios where interacting with a file uploader on a web page using automation actions fails.
13+
14+
## Symptoms
15+
16+
When you use the [Press button on web page](/power-automate/desktop-flows/actions-reference/webautomation#pressbuttonbase) or [Click link on web page](/power-automate/desktop-flows/actions-reference/webautomation#clickbase) action in web automation, the action doesn't work as expected if the button or link on the web page is part of a file uploader. The following HTML element is an example of a file uploader:
17+
18+
```html
19+
<SPAN style="font-size: 14px;font-style: normal;font-weight: 400"><input type="file" /></SPAN>
20+
```
21+
22+
## Cause
23+
24+
[Web automation actions](/power-automate/desktop-flows/actions-reference/webautomation) create or modify events through scripts, which inform the browser whether the event is trusted. For more information, see [Event: isTrusted property](https://developer.mozilla.org/en-US/docs/Web/API/Event/isTrusted).
25+
26+
For security reasons, browsers might restrict the simulation of events that trigger file upload operations. This restriction ensures that file upload actions are initiated by the user directly rather than through programmatic JavaScript events.
27+
28+
As a result, the **Press button on web page** and **Click link on web page** actions might not work when interacting with file uploaders.
29+
30+
## Workaround
31+
32+
Try one of the following workarounds:
33+
34+
- Use the [Press button in window](/power-automate/desktop-flows/actions-reference/uiautomation#pressbutton) action to simulate user input, bypassing the browser's event validation.
35+
36+
Instead of using a web element captured from a web automation action or a web browser recorder, capture the element using the **Press button in window** action or through a desktop recorder.
37+
38+
- Use the **Click link on web page** action with the [Send physical click](/power-automate/desktop-flows/how-to/send-physical-clicks-web-element) option enabled.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
title: Run JavaScript Function on Web Page Action Fails to Execute
3+
description: Solves an issue where the Run JavaScript function on web page action isn't executed and returns no error.
4+
ms.custom: sap:Desktop flows\UI or browser automation
5+
ms.reviewer: amitrou
6+
ms.author: amitrou
7+
author: andreas-mitrou
8+
ms.date: 04/09/2025
9+
---
10+
# The "Run JavaScript function on web page" action doesn't execute but no error is reported
11+
12+
This article provides a resolution for an issue where the [Run JavaScript function on web page](/power-automate/desktop-flows/how-to/populate-text-fields-click-links-javascript) action fails to execute the JavaScript code and doesn't indicate any error.
13+
14+
## Symptoms
15+
16+
The JavaScript code provided in the **Run JavaScript function on web page** action isn't executed, but no error or exception is reported.
17+
18+
## Cause
19+
20+
This issue can occur when a third-party web extension installed and enabled in the browser blocks the JavaScript code execution initiated by Power Automate for desktop.
21+
22+
## Resolution
23+
24+
To solve this issue:
25+
26+
1. Temporarily disable all third-party web extensions in the browser, except the Power Automate extension, to determine if the issue persists.
27+
28+
- [Turn off an extension in Microsoft Edge](https://support.microsoft.com/en-us/microsoft-edge/add-turn-off-or-remove-extensions-in-microsoft-edge-9c0ec68c-2fbc-2f2c-9ff0-bdc76f46b026)
29+
- [Turn off an extension in Google Chrome](https://support.google.com/chrome_webstore/answer/2664769)
30+
- [Disabling extensions in Mozilla Firefox](https://support.mozilla.org/en-US/kb/disable-or-remove-add-ons#w_disabling-extensions)
31+
32+
1. If disabling third-party web extensions isn't feasible, you can replace the JavaScript code with a specific web automation action that involves physical interaction. For example:
33+
34+
If the JavaScript code is designed to click an element using the `document.getElementById('elementID').click();` code, this code can be replaced by the **Click link on web page** action with the **Send physical click** option enabled.
35+
36+
[!INCLUDE [Third-party disclaimer](../../../../includes/third-party-disclaimer.md)]
Loading

0 commit comments

Comments
 (0)