Get Listview sub items in UI Path - winforms

How to get the list view sub items using UI Path RPA.
I tried using data scraping, recording but it output only first sub item data.
I have followed this link regarding same problem but I couldn't understand the xaml file provided in answer.
https://forum.uipath.com/t/data-scraping-listview/118929/10

you could use the "Find children" activity on the parent element, so you could retrieve all the list elements.
You should search for "FIND_DESCENDANTS".
Regards, Gio

If your target client is Windows Forms Ap,you can refer the following:
You must use ui explorer to watch the element attribute
uiexplorer's "UI Frameworks" (from menu options/UI Frameworks) change to "UI Automation".
indicate element to select which subitem you want.
Then you can see down right selector editor display like
"<uia automationid='ListViewSubItem-2' tableCol='2' tableRow='10' />". Watch the left side "visual tree", it show the subitem list. so now what you have to do is to get the item list(it show first subitem) and for each item to get subitem list,finally through get attribute activity to get the subitem value.
the pseudo flow like following:
find_children activity=>for_each activity { find_children activity=> for_each activity { get_attribute activity} }
the first find_children's selector like "<uia automationid='1000' cls='SysListView32' />" and filter is like "<uia automationid='ListViewItem-*'/>".
the second find_children's selector is for_each item and filter is like "<uia automationid='ListViewSubItem-1'/>". the "1" is subitem index.

Related

How can I spy an active accessibility combobox in blue prism? I want to open the combobox and select an element from it

So I have a combobox for the user to select whether he is an old customer or a new customer. With my process I was able to identify the combobox as an AA element so my process is now able to identify the combobox and click on it when it runs. But the problem starts when I need to select the "new customer" option after opening the combobox. I am unable to identify the option either as a HTML element nor an AA element.Because of this,the process is not able to select an option and throws an error.
What I tried:
I tried an alternative where I added a navigate stage for just the dropdown/combobox and in the properties for this stage I added "select item" as the action and entered the name for the option which in this case is "new customer" along with the item position. This does not work either and throws an error saying "select item" cannot be used for AA whose role is "static text".
P.S: I checked the attributes for the combobox and unchecked the role attribute but that did not work.
My ComboBox is standard HTML Combo Box(Element Type) in Application Modeller. But in Navigation step I use Select Item as Action and in Inputs section I use Item Position as a Number.
Where 0 is first position in combobox, blank. 1 is the first position, in your case it would be "new customer" and 2 would be "old customer".
It works fine in my case.
Hope it helps.
you can use the mode html on the combobox to click then send down key in global key event to choose what you want.

Access highlighted item in AngularJS dropdown list

I'm generating a dropdown list like this:
<select ng-model="myModel.someName" ng-options="item.name as item.value for item in dropdownListOptions" ></select>
This works fine but now I'd like to be able to show some more information about each item in the list as the user moves up and down it, before they click on one to select it.
In other words I need to get the value of the currently highlighted option that the mouse is over without it being clicked on.
This is not something you can get with plain Javascript and you won't do better with Angular. There is no mouse over event for option elements of a drop down list.
The only way to achieve this is to have a custom drop down list made of HTML elements to which you will attach event handlers.
You can use Bootstrap CSS for example.

Compatible value's position in an editable ComboBox

I have a ComboBox implemented with an auto-completion system. My ComboBox contains more than 100 items. When users are typing text in, the auto-completion system opens the dropdown list and highlights the most relevant item. Moreover, when the dropdown list is expanded, all items are available (no filters). But the most relevant item is always at the bottom of the dropdown list.
I would like it to be in the middle, if possible. One item can have the same reference but another type than another one, that's why I need to see most of them in my dropdown by placing them in the middle.
Any idea ? It's not really important but kind of useful for them. Thanks !
Update :
Here's my ComboBox with the open dropdown. Sorry about that, I had to blur its elements. As you can see, the user starts writting the reference in the ComboBox. The autocompletion works fine, but the corresponding item is found at the end of the dropdown list (in the red frame), almost out of bounds.
I wish it would be highlighted in the middle of my dropdown list instead of so far below.
Your item search may work well, but your list isn't visually filtered, which means it's size always remains the same.
It's scrolled into view, by the wpf system, but still displaying all other items around the relevant one. The reason why it's at the bottom is because wpf Scrollviewer just finished scrolling the item into view and sees no need to scroll it further into the middle.
You could use the CollectionViewSource class. Why ?
It's simple to use, will keep your viewmodel data as it is, and you would have your relevant completion item at the top. It can be obtained by GetDefaultView(..)
Let's say you have a viewmodel flag "IsHidden", stating that it's content does not match the user input:
ICollectionView cv= CollectionViewSource.GetDefaultView(myComboBox.ItemsSource);
// switch filter on
cv.Filter = obj => (obj as myViewModel).IsHidden == false;
// switch off
cv.Filter = null

Qooxdoo -- How to bind icon to an item of a VirtualTree

I'm using a VirtualTree as a layer selector for a mapping application, and I'm trying to have a "Layer" or "File" show a green icon when a layer is active and a grey icon when it is not.
Can you...
Set the icon of a selection? or
Bind an icon of an item of a VirtualTree to a boolean property of an array?
I see there is a property for: iconOptions that takes a map and this references qx.data.SingleValueBinding, but how to actually implement it is stumping me. My tree is getting created using:
var store = new qx.data.store.Json(url);
store.bind("model", tree, "model");
I tried:
tree.setIconPath("icon");
but that requires that I have an icon property for every element of my JSON file to display the Folder/File and doesn't allow for the multiple (on/off) capabilities.
Any suggestions?
have a look at virtual tree demo. Using the setIconOption you could specify a convertor takeing other data into account when deciding what type of icon to set.

Dynamic menu items in WPF

Is there a way to create a section on a menu for a list of menu items to be populated by something like an ObservableCollection?
I'd like to replicate the Window functionality in Visual Studio, where the open document tabs are listed in a numbered list, limited to the first 10.
See "Merge ContextMenus" from here. You can find more info by searching for CompositeCollection and menu/ContextMenu.
EDIT: Just saw CompositeCollection was already mentioned in a comment, but I'm going to leave this here for reference.
How does your menu get data right now? Is it databound? Check this article for binding your menu with a collection.
Now it is up to you to add logics when to add item to the collection.
For eg: In your scenario, you have to store the open documents in a list. Then you have to filter out the first 10 documents and add it to the children property of the MenuItem class specified in the article.
You can create menu items in code and manually add them to the menu when the form loads. It isn't elegant, but it gets the job done.

Resources