Hi Experts,
I'm getting following error while running in Unattended mode.. In attended mode its working fine.
error : Problem while executing action 'SendKeys'. Failed to send keystrokes.
I have tried Send text as hardware keys On & Off > Any suggestions ??
Hi @Shashankpuli, were you able to find a solution to that? I am facing the same problem as well when running in the unattended mode.
Hi @ychen , I did not and raised ticket to Microsoft support team few days back and they are investigating on this issue. Ill post the solution once I get update from them.
@ychen solution provided from Microsoft, I did not tried yet. Hope this is helpful for you.
Solution: In some scenarios, Power Automate Desktop may run unattended flows in a lower resolution than the one used to develop the flows. As a result, some UI elements could be hidden from the screen and cause flows to fail.
To change the resolution in which unattended flows are run:
Navigate to C:\Program Files (x86)\Power Automate Desktop and open the UIFlowService.exe.config file.
Set the value of the Microsoft.Flow.RPA.UIFlowService.ScreenDefaultResolutionEnabled key to true.
The appropriate keys in the UIFlowService.exe.config file.
Change the values of the following keys to the proper screen resolution width, height, and scale, respectively:
Microsoft.Flow.RPA.UIFlowService.ScreenDefaultResolutionWidth
Microsoft.Flow.RPA.UIFlowService.ScreenDefaultResolutionHeight
Microsoft.Flow.RPA.UIFlowService.ScreenDefaultResolutionScale
Restart Power Automate Desktop.
Did we get the right solution from MS support team? because I don't think the issue is related to lower resolution. I am not getting any error like "Failed to send keystrokes" but my keys are not passing to the element.
@Anonymous
Did you use Focus Window to activate the window prior to sending keys?
Before sending keystrokes to an open application, use the Focus window action to activate the respective window.
Automate applications using keyboard shortcuts - Power Automate | Microsoft Docs
Thanks @yasunm02
Tried to bring the window to the front by using "Focus Window", but still my keys are not passing to the system.
Please refer the screenshot
@Shashankpuli or @Anonymous did you find a resolution for this? I'm wondering if I'm have the same issues as you are.
Thanks
If it can be solved using ui automation or image automation, please avoid using sendkey because it is hard to trace/debug.
Sendkey will drop on any windows which got focused when the sendkey action executed.
Thanks @yoko2020, but I was unware of these kind of issue in "Send Keys" with unattended mode. Already spent more than a week to develop this solution and I can't go back and change all the Send Keys actions.
@Anonymous
You must change, or it will haunting you forever. Trust me.
at year 2022, still has this issue.
keystroke sends perfectly fine in the attended mode but in unattended mode, it usually mis-send a key or 2 (not always), and sets the whole thing off.
Correct. It is such a shame, the same PAD flow works fine in attended mode. Considering there is so much licensing fees involved in unattended bots, Microsoft should be looking at these issues carefully and rectify them urgently. I have spent 2 days trying to fix one small problem. Its is extremely frustrating.
Hi all, did anyone find a solution to this issue please? Send keys works perfectly in attended mode in my flow but switching to unattended fails. Thank you.