cancel
Showing results for 
Search instead for 
Did you mean: 

Application Modeler Dropdown selection

a026833
Level 4

Hello,
I have looked through all of the past posts but still no luck for me. I have a drop down where I can get to the selection, via global send keys, using the first few characters of the input text (in this case "Bot"). I don't like this approach as I may have multiple selections that fit the criteria (as in this case). I  know the value I need to enter as I read the drop down list ahead of time and loop through the collection looking for the exact value. When I use the global send keys with the exact value, I run into issues with special characters. In this case the parentheses. I tried doing a select item using the spied drop down list but nothing is happening. Code at bottom. Can someone help me get this working using either global send keys or select list item?  My list is defined as a "Web list" in the application modeler. I have tried so many different combos that I am losing track of what I have tried!!25843.png

25844.pngThank you ahead for any suggestions you can offer! PS. The item index of 3 was just a test to see if anything happened.



------------------------------
June Siravo
Analyst
FIAM
America/New_York
------------------------------
1 BEST ANSWER

Helpful Answers

Thank you so much, I used the DOWN as I know which position in the dropdown I was looking for and then the enter. Couldnt get it to work any other way:25839.png



------------------------------
June Siravo
Analyst
FIAM
America/New_York
------------------------------

View answer in original post

6 REPLIES 6

Hi @June Siravo 

I'm not sure I quite get what you are meaning so just to clarify do you mean you are using a global send keys value of "{ENTER}" in the Item text to try to select the drop down item?

Usually this is the text value of the item you are trying to select I'm not sure a send keys value will work here which is why you are getting an error with parenthesis. If you are looping through all values to identify the correct one first then you could loop through then add the collection value as the item text value. Screenshots below of an example

25819.png
25820.png



------------------------------
Michael ONeil
Technical Lead developer
NTTData
Europe/London
------------------------------

GopalBhaire
Level 10

Hi June

Michael's solution is accurate. To further add to it if you already know the value of the item to select you can directly pass the value to 'Item Text' for eg. if you have to select 'India' in countries dropdown you can pass the value directly. Item index can be used when you always want to select the item based on position in dropdown, this is mostly useful when you are selecting something from an autocomplete dropdown for eg. when we type an employee id we are expecting only one result so we can just pass item index as 1, but make sure you add proper conditional waits.



------------------------------
Gopal Bhaire
------------------------------

kishorKumar
Level 2

Hi @June Siravo 
1.After clicking on the drop down you can use the down "{Down}" key to select your required item and then use Enter. 
2. Or you can pass the item value as data item in select it can also work.



------------------------------
kishor Kumar
------------------------------
Kishor Kumar Blue prism Developer Infosys Ltd.

diane.sanzone
Level 7

Hi June,

I've run into similar issues and this will continue to haunt you every time you have special characters and use global send keys. I agree with the other suggestions here, but I offer something a bit more generic that can help outside of the drop down selector.

You can try using the Utility - Strings - to escape special characters on your input prior to the navigate/global send keys. That might work for some characters.  Alternatively, my institution has a custom action to "replace shift key characters". It accepts input of text string and returns an escaped output that works with global send keys.  Screenshots below of the action page and the individual stages.

I just used this yesterday to solve the same issue with global send keys and parenthesis. Hopefully it can help you as well.  

Good luck!
25827.png
25828.png

25829.png



------------------------------
Diane Sanzone
------------------------------

a026833
Level 4

Thank you everyone for trying to assist me. Michael, I tried the "select item" approach but could not get it to select. I then tried Diane's approach (global send keys after replacing the special characters). This got me past the special characters message and the box started to "spin" for a brief second but then nothing, the correct selection just sits there (see below). The only way this seems to work if I enter a partial value (like last name) then a value is found. Then I am back to my original issue of potential duplicate values.25832.png



------------------------------
June Siravo
Analyst
FIAM
America/New_York
------------------------------

Thank you so much, I used the DOWN as I know which position in the dropdown I was looking for and then the enter. Couldnt get it to work any other way:25839.png



------------------------------
June Siravo
Analyst
FIAM
America/New_York
------------------------------