Select item containing specific string from Html Drop down list

Ho to select specific item dynamically within a select drop down list? for example:
In the given list items, only the last part of Item name can either be - Public be - Private.
Screenshot:

I am sure the item is always unique in list & I do not want to rely on the last part of string?

How do i get this done?

Just use click activity on the drop down and use select item activity and provide the value you want to select @RajeshSwarnkar, as you mentioned above the value is constant

No, the last part of the string in {GBI_IndiaOnBoarding_Integrity - Public | GBI_IndiaOnBoarding_Integrity - Private} is variable.

Let me rephrase the question:
I am storing the list of GBI specific Item names in array. Dynamically I am iterating through this array. The last part of item name can be random, so I want to select item which has substring say, GBI_IndiaOnBoarding_Integrity - * want to select

You have to pass the full string to select as far as I know. @RajeshSwarnkar

Random in the sense, it will be public or private right? Is there any chance of getting other also?

No, Currently I am hard-coding item names in an string array to be specific.
Just wanted to check if there is more robust way to match items (other than default equals)

@RajeshSwarnkar
In such cases I am using find children Activity and filter for the listitems
the retrieved listitems I processed afterwards (e.g. find string patterns …)
Once I found the item of choice then I used this (as an uielementvariable) for click or used the text for select item

Sometimes it was working as well using wildcard in select item activity like `GBI_IndiaOnBoarding_Integrity - *, sometimes it was not working. Give a try

You can use as array(1).tostring = “string” but better to go with equals operator @RajeshSwarnkar

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.