Dropdown Item Selection from a Collection

Hi Gurus,

I’m attempting to select dynamic items from a drop down menu bar. Since I’m not working directly with the actual drop down text values, I’m extracting the children dynamic ‘value’ properties and placing those in a collection.I got a couple issues:

  1. How to add these to the collection properly - apparently the items are failing to loop within the collection. I’m only able to retrieve a single item
  2. How to read through the collection to be able to select the items based off the value attribute.

Please advise. I’d really appreciate it. Thank you!

Martin

Hi @martsantos

Here you can use two click activities one is click that drop down and second click activity click what value you want.If you want dynamic values please change the selectors in second click activity there you can pass variable.

Regards,
Kommi Jeevan.

@martsantos
Retrieving the selectitems can be done with the find children Activity
From this a collection/enumerable of uielements will be returned

In a next step with a for each can the children bei processed. Another Option would be eg a linq Statement

With get Attribute Activity or uielementvar.Get(“attributename”).tostring the particular information from an uielement can be retrieved.

A so found uielement can be assigned to a click Activity by setting IT to the target element option

Let US know your Open questions

1 Like

Thanks @kommijeevan, @ppr.

I’m already able to retrieve the children ‘value’ using the get attribute. I was also able to add these items to the collection. What I’m struggling at this point is how to be able to select the drop down items using the stored values.
For each item in List (collection)
‘how to select the item?’
Getting this error: ‘Cannot select item. It was not found among existing items.’

Thanks again!

Hi
welcome to UiPath community
kindly have a view on this thread

Cheers @martsantos

@martsantos
the links provided by @Palaniyappan are usefully and to recommend

However regarding to your question

Select item activity and using the text value (have a look via uiexplorer on the properties: text, aaname or others )

or assign the uielement to a click activity on terget element option:
grafik

Thanks @Palaniyappan, @ppr.

i got it working. I ended up not adding the retrieve items from a collection, but instead select the items directly using the attribute ‘aaname’. Worked like a charm!

Thanks again for all your help!

Martin

1 Like

@martsantos thanks for Sharing the good News with us @Palaniyappan cool teamwork

1 Like

Cheers @martsantos @ppr