Hi all,
I've been using PA to make (mostly excel) flows just fine. Today while editing a flow, I started getting an error. Restarted, worked one more time, and now errors every time. All UI manipulation fails. I've tried reinstall with no success.
Failed to press button (failed to get window)
Failed to press button (failed to get window): Robin.Core.ActionException: Failed to press button (failed to get window) ---> Robin.Shared.Runtime.ActionException: Failed to press button (failed to get window)
at Robin.Modules.UIAutomation.Actions.UIUtils.TryFuncThrowExceptionIfNull[T](Func`1 func, ActionException ae)
--- End of inner exception stack trace ---
at Robin.Modules.UIAutomation.Actions.PressWindowButton.Execute(ActionContext context)
at Robin.Runtime.Engine.ActionRunner.RunAction(String action, Dictionary`2 inputArguments, Dictionary`2 outputArguments, IActionStatement statement)
Solved! Go to Solution.
Hi @slappydooda ,
Majority of the cases, issue will be the name attribute.
1. Go to the UI elements sections from the right panel.
2. Double click on the parent UI element
3. Click on edit selector/or double click on the element again
4. You should see selector builder
5. Now compare the selector builder with old Ui element selector
6. Compare the Ui element
7. If parent element looks fine and exactly same. Then compare with each child element.
8. Two things to consider here: 1. Ordinal 2.Name
Hope this helps 🙂
Update: I discovered that if I recreate my UI Element references, my flows work again. That means I need to go through and redo all UI steps, though...
So at some random point yesterday, all my UI element references broke (even in the flows I wasn't currently editing). For context, I use two monitors.
Is there a way to log this bug? It's pretty debilitating to have all of your flows just randomly break and require rework.
Contact support 🙂
Hi @slappydooda ,
Majority of the cases, issue will be the name attribute.
1. Go to the UI elements sections from the right panel.
2. Double click on the parent UI element
3. Click on edit selector/or double click on the element again
4. You should see selector builder
5. Now compare the selector builder with old Ui element selector
6. Compare the Ui element
7. If parent element looks fine and exactly same. Then compare with each child element.
8. Two things to consider here: 1. Ordinal 2.Name
Hope this helps 🙂
Hi, I don't understand how this solution helps. My flow is completely corrupted. If I have to rebuild the 45 "Click UI element in window" so be it but how do I ensure that the corruption doesn't occur again? What is causing this behavior? Thx!
There is nothing corrupted, applications change, so does their UI. You just need to make the window selectors as robust as possible e.g. using regex and/or multiple checks on the window title/content.
https://docs.microsoft.com/en-us/power-automate/desktop-flows/ui-elements
Hi,
Thanks for the feedback! I'm new to using Power Automate Desktop and when I started creating my first flow it concerned me about what would happen to the UI elements I grabbed if the desktop application (Crystal Reports Developer) I used changed. With the current issue I'm facing though nothing has changed. At this company we have to manually install/update Crystal Reports Developer (developed this flow last week - nothing has been updated). This leads me to a couple more questions...
1) As I'm new perhaps I'm missing a step. I first open Crystal Reports. I then start Power Automate. The first step in my flow is to click a UI element in Crystal Reports. Do I have to have a preceding flow step that says "Activate the Crystal Reports" window (I looked for a control like that in the flow editor but didn't see it although I didn't have anything like that in place when doing the initial development of this flow)?
2) I looked at the link you sent. I did use the Control/Click method to capture UI elements. And I see the section about "Element Properties" and editing the Selector. And I see your comment about using regex/multiple checks. Do you know if there is a page anywhere that gives more info on manually editing selectors (I've been searching but I haven't found anything)?
Thanks!
1) PAD can start your application: https://docs.microsoft.com/en-us/power-automate/desktop-flows/actions-reference/system#runapplicatio...
Then you can e.g. get the window: https://docs.microsoft.com/en-us/power-automate/desktop-flows/actions-reference/uiautomation#getwind...
2) This article was about editing selectors: https://docs.microsoft.com/en-us/power-automate/desktop-flows/ui-elements
Or browse through the old WinAutomation documentation:
https://docs.winautomation.com/V9_0/en/building-ui-selectors.html#building-ui-selectors
https://docs.winautomation.com/V9_0/en/manage-ui-selectors.html
Thanks for the info!
HI @fraenK could you please provide a sample using regex, the window class changes the last number here is an example ClaWin073350000H_4 I can not get. to focus window to continue automation
If only the last number changes, then you can use "starts with" with "ClaWin073350000H_"
did you ever manage to work out how to change the path of the UI Element , as i am experiencing a similar issue. Each time a reference a UI element with a different window title (for the same application) i need to rebuild my flows. Not ideal . I could not work out from the documentation how to edit the selectors and parameterise the window name/title.
User | Count |
---|---|
13 | |
8 | |
6 | |
6 | |
5 |
User | Count |
---|---|
20 | |
17 | |
17 | |
12 | |
11 |