Dynamic click item on a long drop down list

I want to dynamically choose an item in a long drop down list (scroll down). I am using Chrome. I tried Select Item but does not work with error ​"Indicated Target Not Valid UI Element for SelectItem". I tried using click activity and variable CompName to make item dynamic but I can’t validate it with the error “Variable CompName is not defined in the current scope”. I don’t know what else to do to choose item dynamically.


@thao.dinh

That is just a warning…during runtime the value would be populated

Just make sure the value you are replacing is the exact value that it is there in the list and no spaces etc

Cheers

Hi @thao.dinh

If the Select item activity not works.
→ Use the click activity and indicate on drop-down button to show the list of options.
→ Then use the for each UI element activity and indicate on first element after you indicated on first element it automatically extracts all the options in the drop-down. The output of For each UI element is CurrentElement.
→ open the filter option of For each UI element activity and pass the variable which contains the value to be selected.
→ Inside for each UI element activity insert the Click activity and Pass the CurrentElement in the Input Element field which is in properties of click activity.

This process was totally dynamic. For each UI element store all the options in drop-down then filter then it will send which Ui element to select in the drop-down.

Hope it helps!!