How to use "Select Item "Activity?

activities
studio

#1

Hi,

I have used “select item” activity to get the all the element from dropdown.
my question is how do you select those individual element from “Item” editor. This activity doesn’t have output variable so i can pass this selected item in other field.

Does "Select Item " activity only grab all the item from the dropdown panel because what is the use of this activity when it can’t updated the new selected item in the dropdown.

Alternative solution used : use click event and pass hotkey/type into to choose the particular item inside the dropdown.


How to select a value from drop down of web page
How to choose an item in a list
#2

Select Item works in background (Simulate Type/API) … but it works only in applications that support this type of automation. If it does not work you should use click/type as alternatives.


#3

thanks for the response .But could you please tell me how useful this "Select Item "Activity ,means where exactly i can use this activity.All it does is get the item from the dropdown nothing more.:stuck_out_tongue_winking_eye:


#4

The “Select Item” Activity is common used when you need to select an item in a dropdown list to do a specific task.
You can pass a variable in the “Item” property to select dynamic items according to your variable.

For me, It’s very useful and a have a lot of robots that do that :smiley:

Regards,


#5

thank . yes i’m doing the same giving a new value from the “item” dropdown but its not replacing the earlier item in the dropdown .


#6

Does it change when you manually do it (enter the 1st Alphabet of your 2nd item) ?


#7

yes.


#8

Can you try with other dropdowns? if its working , nothing wrong with your code and something to do with that specific drop down.


#9

hurrey… :raised_hands: its working now . It must be something wrong with that earlier dropdown.
I used same workflow on different dropdown application and able see the changes in the dropdown value.
simply had this big conversion hahaha .

Thanks anyways …:+1:


#10

@ddpadil and @vvaidya

I’m also trying to select country name dynamically from a drop-down list using Select Item activity.
The set of countries on which I need to perform a search on is in an array (Named country), and Cntry_Number is an integer variable which is used to traverse the array as shown in Image below.

Whenever I’m running my Bot, I’m getting this Error:

image

Any Idea why the select item is taking CountryString as it is and not the value stored inside it? Please guide me and let me know where I’m going wrong . Alternate approach to achieve the same result is also welcome. Thank you.

Update: I have also tried changing CountryString data type to string from generic. The bot returned the same error.


#11

Did you tried apply the TIP below the error message there is a TIP.
Just add a click activity on the dropdown before seleting the value.
That will help the dropdown to load before you select the value.


#12

you have to convert it into string to use. Try to writeline your selector and validate it might be some uppercase issue can be there. so better to validate it if still will not work then try with simulate with click as your last resort.

Regards…!!
Aksh


#13

I followed the steps you suggested but facing the same issue. First i clicked the dropdown and then trying to set the item to it. But i am facing same issue.


#14

@alhad_alsi
Can you please check using hightlight activity that click is on the correct place.
Just copy the selector of click operation in to the highlight activity and run the workflow.
the dropdown should get highlighted.


#15

Well before select item , i am performing click operation on drop down box. It opens the drop down. After this activity when I tried to select the item , it is giving me the above error.


#16

There is no need of clicking first and then performing select item.
You can directly use Select item activity.

if still doesn’t work then workaround would be

  • using find children+get attribute activity.(reference)
  • or if item are constant you can try with sendhotkey activity(down+enter)
  • or you can just use TypeInto Activity if dropdown allows you to enter text.