Can i get counting items in dropdown list?

K-001

count = 2

K-002

count = 1

in this way… How can i count items?

use get full text???

Hi @dkngit55 ,
You can find the count of items in a dropdown by using UiAutomation.
Either use find children or the easier way would be to do a full text screen scrapping which will return all the items as a string which you can split by environment.newline to get its count.

regards,
LNV

Hey @dkngit55 ,
You can achieve this using Find Children Activity

Drag and drop the Find Children activity → Indicate the dropdown → Store the find children output into an UiElement variable → Your variable.Count will give you the result

Kindly refer below video for more information

Hope it helps you out!

Hi @dkngit55

  1. Use “Find Element” to locate the dropdown element Or
  2. Use “Get Attribute” with the “innerText” attribute to extract the list of items.
  3. Use an Assign activity to split the extracted items and get the count.
    Assign: itemCount = extractedItems.Split(Environment.NewLine.ToCharArray()).Length
  4. Use a Write Line activity to display the item count.