I’m trying to select a value in a dropdown in a Windows Application.
In UiPath Studio, after indicating the correct element on screen, it shows me all the selectable values.
However, when running this, it selects the UI element (not clicking) and don’t select the correct value.
As the values in this dropdown can change I don’t want to use the Activities Click and Hotkey to select a certain item.
@P_S such Tasks can be solved with the find children Activity and looking for selectitems. After calculating the right entry it can be selected in the dropdown
@P_S - You can create a reliable selector for the particular value you need try to look into the dom you will find something like inner text or tag anything related to the element you want .
Can you explain this? I can see the selectable items in a dropdown in my SelectItem Activity, however the value is not selected in the dropdown when running the process.
@P_S in such cases with the find children Activity the selectitems we’re fetched and are for further Processing available.
Drag an drop find children Activity
Configured the selector to the selectbox
Assign a Filter selector to selectitems, make the selector General to all selectitems EG with a Wildcard to the text
If properly configured you can EG in a for each Loop Log Out the selectitems Text EG with the Help of get attribute.
Tried this with FindChildren, but can’t get it to find the items in the checkbox.
I tried to set Filter to "<ctrl />" and "<wnd />" and set the scope to “FIND_DESCENDANTS” as well.
I also tried with UI Explorer, but wasn’t able to find all the items.
@P_S third Screenshot helped für the combobox, but we do need a Screenshot in the same manner for the select Item. Use uiexplorer, indicate Item, Pause with f2 expand the combobox and select after one selectitem
Nothing more useful that I found when scrolling down.
However, the SelectItem Acitivy was able to find the values in the dropdown:
However, for some reason it’s not selecting this item when running the process.
Key down etc can be sent (I have done it like this now), however, as the values in this dropdown can be changed I wanted to select a specific item per name.
@P_S I would not give up so far. I had a lot of challenges to solve and finally there was allways found a particular solution. As mentioned the curios thing is that the selector to the list items is not grabbable.
I would rerun the test:
find children - selector to
filter to: "<ctrl />" maybe with some wildcards like aaname=‘*’
scope FIND_DESCENDANTS
the mission of this action is just to if children are returned and hopefully we find the selectitems
Unfortunately not that much luck in that as I get the following error:
Source: Find Children 'WindowsForms10.Window.8...'
Message: Cannot find the UI element corresponding to this selector: <wnd app='tekis.applicationcontainer.main.exe' ctrlname='SearchGenerell' /><wnd ctrlname='searchArendePanel' /><wnd ctrlname='groupBoxArendeHandelse' /><wnd ctrlname='_arendeHandelseTypComboBox' /><wnd cls='WindowsForms10.Window.*' idx='1' />
Exception Type: UiPath.Core.SelectorNotFoundException
An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
UiPath.Core.SelectorNotFoundException: Cannot find the UI element corresponding to this selector: <wnd app='tekis.applicationcontainer.main.exe' ctrlname='SearchGenerell' /><wnd ctrlname='searchArendePanel' /><wnd ctrlname='groupBoxArendeHandelse' /><wnd ctrlname='_arendeHandelseTypComboBox' /><wnd cls='WindowsForms10.Window.*' idx='1' /> ----> System.Runtime.InteropServices.COMException: Cannot find the UI element corresponding to this selector: <wnd app='tekis.applicationcontainer.main.exe' ctrlname='SearchGenerell' /><wnd ctrlname='searchArendePanel' /><wnd ctrlname='groupBoxArendeHandelse' /><wnd ctrlname='_arendeHandelseTypComboBox' /><wnd cls='WindowsForms10.Window.*' idx='1' />
at UiPath.UiNodeClass.FindFirst(UiFindScope scope, String nodeID)
at UiPath.Core.UiElement.FindFirst(FindScope scope, Selector selector, IVariableResolver resolver)
--- End of inner ExceptionDetail stack trace ---
at UiPath.Core.Activities.ScopeActivity.OnFaulted(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.Invoke(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.FaultWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)