How to select a value from dropdown (combobox) of web page

excel
activities
studio
web

#1

Hello everyone!

There are many questions about selection of special item from dropdown, but I couldn’t find the solution.

I’ll try to describe my problem (and must apologize for my English/ not native speaker)

well, I’ve got excel file with names of companies and I should check them on the next website:
http://cbonds.com/ratings/history/

okay, Studio allows me to get value from excel and write it on window “Company:”, but I can’t draft the algorithm which lets me choose right name of company (from dropdown).
The name from the excel must match the name from the drop-down list. The main difficulty for me is that the value from the drop-down list can be in a different position. As a result I have no ability to use standard Click Activity (or not?)
ps; also, I tried Select Item, Element Exists, Web/Citrix recording and faced with messages like “This control does not support select Item”

I’ll be glad to any help and ideas of solving this problem


#2

@polina.cherepanova, I observed that entering the complete name of the company in that text box and doing a tab out just once after result appears, automatically reflects the associated results on the right. Will not that work? Just wanted to confirm before we move to implement it in a complex way when it could just be solved easily or Do you have the special cases where there would be multiple company results with text you entered?.

Thanks,
Rammohan B.


#3

@Rammohan91 Yeah, sometimes the one name appears and the easiest way is to use click activity, but sometimes a company has several names, they appear after writing name, the company I need to select is not always located at the first position in the drop-down list, for example
Excel Value - VTB
List on web page (8th position): image


#4

Check this,

SearchAndSelect_DropDown.xaml (6.0 KB)

Just added a delay of few seconds and a click activity that includes the aaname as the value.

You can try by passing the text as a variable for aaname attribute value for the selector of Click activity.

Let me know if it works for you.

Thanks,
Rammohan B.


#5

@Rammohan91 I think I’m doing something wrong somewhere :confused:
so, it doesn’t work correctly, name from excel was written but not chosen
as I understand we need to edit the selector (aaname = ‘vtb’ into click activity), I tried to replace ‘vtb’ with * but there was no success (I’m not good at programming)
I’ll show you test files I hope it would help

random name.xlsx (7.9 KB)
test.xaml (20.1 KB)


#6

No. You should not pass ‘*’. You have to pass the variable where the text value of the company is stored.

Your selector should be like this,
"<html app='chrome.exe' title='Credit ratings history' /><webctrl aaname='"+company+"' tag='A' />"
Here company is your string variable under which that value is stored.

image

Let me know if works.

Thanks,
Rammohan B.


How to select an items from a drop down list one at a time and upload a file for each item in the list
#7

it works!
@Rammohan91, a massive thank you for help!


#8

@polina.cherepanova Thats great. Happy to help :slight_smile:

Thanks,
Rammohan B.