Issues with counting from a drop-down list

Hello,
While trying to select all the dropdown items from Model series header of portal: MANN-FILTER Online Catalog Europe - Vehicles OFF-HIGHWAY APPLICATIONS Agricultural machinery AG-CHEM (AGCO) one after another I’ve used send hotkeys and find children activity. But it’s giving result of one less than the actual dropdown number using modelseriesdropdown.Count.ToString expression. Appreciate your suggestion regarding this. Thanks in advance.

Hi again @rayabhijit2017,

I am assuming this is similar to the issue posted in this thread: How to initialize UiPath.Core.UiElement - Build / Studio - UiPath Community Forum

Approach:

  1. Get all the Dropdown items and save them in a List
  2. Use the List to iterate through
  3. Modify a Dynamic Selector for Model Series (Category and Manufacturer will have its own)
  4. Send Hotkey and Click activities (use Dynamic selector from 3).

As you pointed out in the other post. That drop down does not allow Select Item so I use the Hotkey as you did and combine it with Dynamic Selectors to click on each dropdown option.

The trick here is the selector. To make the workflow even more robust you can add an element exists and check if the value is similar to the ListOfDropdowns(Index)

You can also use the same method to the other two dropdowns. Here is a way to get what you want (I use Edge browser, change it to Chrome): IEnumerableUiElement.xaml (22.8 KB)

Hope this helps!

1 Like

Hello jeevithJeevith Hegde, Ph.D.
Thanks a lot for your response. Yeah right. I’ve followed the above approach but facing validation issues while trying to pass a Listofdropdown variable for the click activity using chrome browser. Am I missing anything.

Ok, I found out what the issue was.

image

This is really weird:

  • In Chrome the correct selector is the lower selector (which has a Div and within it 4 Divs)

  • In Edge the correct selector is the one above Span.

Anyways, I have modified it now and this will work on both Edge or Chrome. The choice is yours :slight_smile:

IEnumerableUiElement.xaml (43.5 KB)

Ok. Thanks for your response. It’s working fine now. Thank you.