Dropdown selection

string product = Keyboard; (Collecting product details from an application)
string product = Mouse;
string product = CPU;
string product = MONITOR

Have one drop down in salesforce to select product with same values but in upper case or lower case or in proper case like KEYBOARD, MOUSE, cpu, monitor

select item gives error as the selected product is not exactly same in salesforce dropdown

Type into activity does not work sometimes.

Is there any other suggestion programatically to match with the product values in drop down?


hey Ula,

you should try, select item: which is specially designed for dropdown selection

else you should try send hot key

it is tested, both or either of these will work

let me know if it is not solved


in order to get drop down list items dynamically, you should youse find children activity, so suppose if selct item list will change it will take dynamically


Select item does not work. It throws error cannot select item. It was not found among existing items.

i.e the value i am passing to select item has Switch data but the actual value in the drop down is SWITCH DATA.


Have you tried find children activity?
try to trim the string field before sending as a hot key or select item
if not solved then let me know,


Ulaga, have you tried using the click activity to open the dropdown and to select the option you need?

@siddharth. Thank you. Yes, exactly did the same. Clicked on the drop down and used select item and input is the variable “product” which has value Switch data but the one in drop down has value SWITCH DATA. and another is like Opensystem RCE but the product value is OPENsystem rce

Since your values could be in Capitals as well, before you make the selection (using select item OR click) check if that item exists using element exists, and in the selector, use your variable value(say Switch data). If it doesn’t exist, convert your variable value to upper case and make another check to see if the Uppercase product value exists. If it does, use select item/ click.

Try this and let me know what happens.

Thank you @siddharth. I was thinking the same but just thought if any .net function could help directly to solve this issue.


One more thing I suggest you try. Use find children once on the drop down list, just like @aditya.prakash said. If you can extract all values of the drop down, convert those and your variable values to a specific case (say lowercase) and compare. If the values match, you can select that particular item USING the value of the drop down that you extracted using find children.

@siddharth, that’s what i’m saying,

1st choice would be select item by getting items from find children because it is complete dynamic solution

manly people are facing problem in this approach because they do not process string values for example removing unwanted white space(trim)


@siddharth and @aditya.prakash Thank you. I have started working and update you.

Hi @siddharth. and @aditya.prakash I am able to get the values using find childrenactivity. How to build a datatable by including the dropdown values so that I can use linq to extract. Just want to try this way as I don’t know how to build our own datatable dynamically.

Build data table activity is used to make data table!!

Build data table only accepts the values enter. I want to save the dropdown values received using find children activity to a datatable. I am able to get the values using Generate datatable activity but when i use write range activity to put in excel only last value gets typed in. Not sure what to use in column separator.

DataRow. CopyToDatatable

here is your data array system.data.datarow

or share your xaml file, if it is possible!!

Hi @aditya.prakash and @siddharth. Thank you for your ideas. I am almost achieved what i thought based on your ideas.

I have a doubt could you please clarify

using find children i am getting values of the dropdown and it is like this if i inspect

option value="SWITCHDATA 8771> Switchdata 8771 <option

I am comparing actually using value so final value for selected item comes as “SWITHCDATA 8771” but actually in drop down it is Switchdata 8771. How to get the value of the element saved inside value


could you provide me the schreen shot of inspect element!!

Is this [ option value=“SWITCHDATA 8771”> Switchdata 8771 <option] what you’re able to get from find children?

If yes, then now you compare with the value “SWITCHDATA 8771”. If it matches, you want to click on the value that is between > and <, right?

Now, first tell me, how are you extracting the value “SWITCHDATA 8771” from option value=“SWITCHDATA 8771”> Switchdata 8771 <option ?

  1. Using find children activity
  2. Retrieved all the dropdown values using “value” tag and added to a collection
  3. Compare each value in collection to the value retrieved from some other application
  4. If the value matches passing that to select item.

It is working almost but just found the above two elements did not get select coz i am comparing the value =“SWITCH DATA” but want to get the actual element inside i.e switch data