Select items from list, Select multiple items activity


Hi , i need to select multiple items from the disallowed list. There are 143 items in the list, nearly 100 items i need to select. What activity i can use here??
I tried ‘select multiple items’ activity , while indicating the list it throws a error.

@Palaniyappan

1 Like

Hello,

What about iterating through the UiElements?

Use a ‘Find Children’ activity, ideally on the parent element of the ‘Disallowed Values’ “list” of items.

So, ideally, you’re using a Find Children activity with the default property of FIND CHILDREN (not descendants or anything else) and each “child” element would correspond to one of the “disallowed” values I’ll just refer to them as states/acronyms for now.

Use a for each activity to iterate through the IEnumberable< UiElement > that the Find Children activity yields and for each element, implement your logic.

For example, use a “Get Attribute”, set the property Element equal to the current element in the For Each (your iterator) and the attribute could be text. Conditional based off of the text value, if it’s the value you’re looking for you could just click it (if the web application innately supports multi-value selecting) and you’ll likely want to enable the SimulateClick property.


You could also try using a different framework for the ‘Select Multiple Items’ activity and see if any of them work for what you’re working with.

2 Likes

Hi

I would like to suggest the same as @garett mentioned

If select item didn’t work then we can go for find children activity

The steps invoked will be like

  1. Use a find children activity and get the descendants with FIND DESCENDANTS option enabled and get the output as out_children

  2. Now use a FOR EACH activity and pass the above out_children activity as input and change the type argument as UiElement

  3. Inside the loop use a GET ATTRIBUTE activity and pass the input element as item, the variable from for each activity
    And mention the attribute as aaname or text or innertext depending on which the attribute that shows the value you see in the list
    And save that output as a string variable

  4. Inside the same loop after get attribute use a IF activity and check whether you want that to be included
    If yes it goes to THEN block where use a click activity without indicating any element and just pass the ELEMENT Property as item

  5. Then use another click to get that to left side list
    I hope the arrow in the middle can help you in that

  6. Same step will be used for al 100 values you want from that list

Hope this would help you resolve this

Cheers @Praveen_Vs

1 Like

Hi @Palaniyappan I’m stuck at selecting the attribute type, the values (that i want to select) are in the type of innertext & outertext attribute.
But these innertext & outertext attributes are not appearing in the select attribute dropdown. I’ve attached the screenshots.Screenshot 2021-11-23 065317

I’m stuck at selecting the attribute type, the values that i need are in the type of innertext & outertext, But it doesn’t appear on the select attribute dropdown.

Are you sure you need the inner/outertext to get the state text/abbreviation in each of the elements?

While I suggested find children and using Get Attribute to get the “text” attribute, finding the descendants would essentially “creep” through each and every element that is a descendent of the parent element. In my experience, you can change the FILTER property of the Find Children to then, INSTEAD, just find like "<webctrl tag='SPAN' />" would do the following:

Find Children, set property of the method to DESCENDENTS
With the above filter applied the only elements that would be “iterated” through would be span elements.

So then, when you use get attribute to get the text of the element it would get the “raw” innertext of the element, the span which is the state string.

So in your case, use Chrome Developer Tools/a browser developer tool to look at the HTML and see what element is the parent of the state abbreviation.

I.e. CA

If you haven’t tried already, when you iterate through the UiElements try logging the get attribute value / or text of each uielement and that can be incredibly helpful in finding any flaws in the current workflow.

If possible, you can send me your workflow by attaching it to your post and I can take a look at it if you think the culprit is there. Otherwise, I can likely find an exemplar website to whip up an example workflow if that would help more.

1 Like