How to select item from a dynamically populated dropdown on webpage

We’ve got a webpage which has a dropdown populated/shown only when clicking an input box with mouse. I tried to record it but somehow the individual item is not selectable when it is dropped down. In addition, th e input box is not editable. Can anybody advise how to similate this operation?

Use Click activity and delay after about 1000 milliseconds, then again use Clict activity to select the item, take care of selectors properly use UiPath Explorer instead to get accurate selectors

Thanks for the prompt feedback.
Seems the second click is the key to this problem but I still have no idea how to choose the preferred item with click actitity. I tried below but the flow paused after the second click. I had to click it manually again but still did not get the preferred item I chosen.

I can say it is completely problem with the selector, be more specific to the selector, if the menu is dynamic then remove your index (idx) attribute if any.

It does have idx but it behaved more weird after the removal of the idx ( complaining: the item selected is not in the list )

Let’s move one step back, in general, how can I use UI explorer to get the accurate selector for the dropdown in such cases? I found out the selector by luck when I tried to record this operation by pressing F2(pause) but cannot redo it anymore.The dropdown is shown only when I click on the input but it will disppear as soon as I move focus away to UI explorer.

BTW, below are the original selector I used:

Hi @Wenhui_NL

First a question and then a possible workaround. Do the loaded items “stay” after the menu is closed?

If yes, you could try this

  1. Click the menu so it drops down and loads the items
  2. Click again to close the menu
  3. Keep sending “down” hotkey with Send Hotkey activity until the item you want appears in the box. This can be achieved by Get Text activity pointed at the main box.

I used this method to deal with Java navigation boxes, but the principle might help here too.

No. The whole dropdown menu will disappear.

Maybe I phrased myself poorly.

What happens when you navigate the menu with down arrow?

The down arrow displays the menu again and the item does not display in the mainbox unless I presss Enter.

How about a TAB key?

If anything else fails, you can point to the main box after it has been opened and use Find Children activity to get a list of UIElements that should hopefully include all menu options and their selectors.

TAB also does not move within the menu. I will take a look at the Finad Children activity then.

Have you tried using the Select item activity? It is made especially for drop down menus but unfortunately not all drop down menus are seen by UiPath as such so you will have to try and see if it works for you.

Another way to automate this, which I used when other things failed is this one. Get the selector of two or three of the items. When you start the UiExplorer use the F2 key to pause the selection and open your drop down menu. When the time expires click one of the items. After you have two or three selectors compare them. See if there is the aaname attribute or other attribute that contains the text of the item. If it does and the rest of the selector (or at least the needed attributes) is the same then you can pass the text as variable. Then have it click on element with this dynamic selector.

If it doesn’t work, you can try using a double click or two clicks instead of the single one in any of the solutions you tried or others suggested. In some applications an extra click is needed for the robot compared to what is needed for a human.

Thanks @barbora.m, your informative feedback is much appreciated. Now I have more confidence to tackle this tricky issue.

latest update to everybody who helped,
One solution has been figured out by only focusing on the main box, click, type into the desired test, click, send hotkey tab.

Thanks again!

can you please explain.