Selecting an item in a dropdown list by name, not position

Hi all,

I’ve created a macro that selects an item from a dropdown list, but I noticed it is doing so by position rather than name.

“Command”: “click”,
“Target”: “xpath=//*[@id=“repoststore”]/div/ul/li[9]”,
“Value”: “”,

I am creating the dropdown list, so when items in the list changes, the click is no longer occurring on the appropriate item. How can I modify the code so that “Target” is looking for the name of the item?

Context: The dropdown list includes clothing items, so I may want it to click on the item that says “Black Shorts,” for example. Also, there is no text search function, and it is required to scroll through the dropdown list in order to see all items.

Thank you!

Thank you very much

AYM

You should be able to do this with select | target | label=Black Shorts