web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Click fails in random ...
Power Automate
Unanswered

Click fails in random points in RPA with UI Automation

(0) ShareShare
ReportReport
Posted on by 10

Hello,

 

I am new here and would like to see if anyone could help me.

 

I am trying to make my first RPA.  The goal of the RPA is to select several different categories from a combo box one at a time.  The program I am trying to automate is the system we use at our glass fabrication plant.  What I need to do is go into a window called "inventory cycle count", click the "Add" button and then select a glass thickness from a dropdown/combo box and save the list it generates so I can then print all of the generated files. 

 

I have got Power Automate Desktop to launch the app, move to the Inventory tab, push the cycle counts button, push the "add button and select the glass type. It will then save the generated file. 

 

I simply copied and pasted the current working code and changed the glass type it is to select.  This worked for a few of the selected types but then would say "click failed" on one of the choices.  For example, it may select and generate 2.5 mm glass, 3.2 mm glass, and then fail on 4 mm glass.  The next time I test it may fail on 5mm glass instead.  The error would say click failed (failed to get UI element) or click failed (click failed). 

 

I thought this may be because I had all of them just in the main flow so I divided each glass type into its own flow and then called the subflows.  The result was the same.

 

When looking online I found things saying that it may be caused by the window moving, but the window stays in place and it just repeatedly selects the dropdown list and selects the list item, and then clicks ok.  

 

Does this make sense?  Why does it work for some and not select others?  The other issue since I divided it into subflows is that once it fails it will sometimes generate the lists for all the possible items in the dropdown.  Even ones that I did not write directions for.

 

Any help would be greatly appreciated.

 

Thanks,

Vrishchik

I have the same question (0)
  • XRQ57 Profile Picture
    206 on at

    Hi,

    You have to set the value of the drop-down list in the window. This is an option in PAD (fill out the web form)

     

  • Vrishchik Profile Picture
    10 on at

    @XRQ57 ,  Thank you for your assistance.  Now it will scroll down to the correct line in the combobox, but will not select it.  I used both the name and the index and got the same result.  It scrolls down to whichever item I choose, but then it just sits there and does not bring up the items associated with the choice or push the "OK" button.  Can you help me with this?  I have to stop the flow and then I get the following error: "Failed to perform the requested operation on the drop down list (error while accessing the drop down list)".

     

    Here are the error details: Microsoft.Flow.RPA.Desktop.Robin.SDK.ActionException: Failed to perform the requested operation on the drop down list (error while accessing the drop down list) ---> System.Exception: Select list does not contain option index: 14.
    at Microsoft.Flow.RPA.Desktop.UIAutomation.Plugin.UI.UIControlElements.UIComboBoxElement.Select(Int32 index)
    at Microsoft.Flow.RPA.Desktop.Modules.UIAutomation.Actions.AutomationRuntimes.UIAutomationRuntimeBase.SetDropDownListValueInWindow(IntPtr windowHandle, String selector, WindowDropDownListOperationEnum operation, ListVariantBase optionsToSelect)
    at Microsoft.Flow.RPA.Desktop.Modules.UIAutomation.Actions.UIAutomationActionsDispatcher.SetDropDownListValueInWindow(Variant windowSelector, Variant dropDownListSelector, Variant optionsNames, Variant optionsIndeces, Guid windowId, Int32 dropDownListOperation, Int32 automationImpl)
    at Microsoft.Flow.RPA.Desktop.Modules.UIAutomation.Actions.SetDropDownListValueInWindow.Execute(ActionContext context)
    --- End of inner exception stack trace ---
    at Microsoft.Flow.RPA.Desktop.Modules.UIAutomation.Actions.SetDropDownListValueInWindow.Execute(ActionContext context)
    at Microsoft.Flow.RPA.Desktop.Robin.Engine.ActionRunner.RunAction(String action, Dictionary`2 inputArguments, Dictionary`2 outputArguments, IActionStatement statement)

     

    It says it doesn't have the item index or the name even though it scrolls down to that item.

    Thanks for any help you can provide.

  • Henrik_M Profile Picture
    2,021 Super User 2024 Season 1 on at

    Can you print the source code of the page? It's hard to help without knowing the element types, structure, etc.

  • Vrishchik Profile Picture
    10 on at

    @Henrik_M Thanks for offering your assistance, but this is a commercial program that is used in the glass fabrication industry so I am not able to do that. 

     

    I was using the list item UI element instead of set the value of the drop-down list.  However, when I used that I was getting random "click failed" errors.  By that I mean it may be on one item one time the flow was run and the next time it would be on a different item.  So I tried the set value of drop-down list and it scrolls to the proper item, but then just sits there and does nothing.

  • Verified answer
    Henrik_M Profile Picture
    2,021 Super User 2024 Season 1 on at

    Elements of HTML type "input" are the ones most likely to work with the Set drop-down list value action. If your UI element is not of that type, it is very likely that you will have to activate it so the options pop out, extract the options (maybe from a different, appearing element) then perform an activation on the desired option element, either by clicking the element as a link, or through Send keys down x amount of times (determined by looping through the extracted data). Makes sense? 🙂

  • Vrishchik Profile Picture
    10 on at

    I just want to make sure I understand.  So I could use UI element to click on the arrow down box that opens/activates the combo box and then arrow down with send key and then enter to select it? 

  • Henrik_M Profile Picture
    2,021 Super User 2024 Season 1 on at

    Yes, that's a way to do it.

  • XRQ57 Profile Picture
    206 on at

    You can share your flow if you want.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard