XLS data + Drop Down

Hello Team,

@Palaniyappan @lakshman
…Please mentor as I am a new bee to the Ui Path Pool.Thanks in advance

Need ur advise my scenario is similar to the below link

In my case select item is not supported (control doesnt support selected item…)
Scenario:-
Click drop down on web , xls column has some values mentioned which match the drop down
when match is found perform click

As read we do have Find children activity so should I read and write data in a file
Then compare the value with xls and if found perform a click?

I performed clicking on drop down, used row.Item(“ContactType”).ToString but how to pass that first value ,perform match with drop down and click

Thanks VS

Hello @Palaniyappan @Pablito Team can anyone please advise

I did try the below
Assign activity
Cnctdrpdwn=row.item(“ContactType”).ToString // column assigned
Clicked on drop down the variable was passed as below //as seen in debug
//tried to pass to the element
But not working…
I did debug do see the value from column , but the value is not passed to the variable
Not sure what I am doing wrong.

Thanks

Hello @VSharma ,

Here you have to use the dynamic selector. As you mentioned you are getting the data from the excel and you need to click on the same element in the dropdown.

So using the UIexplorer inspect on an element in the dropdown and check whether some attribute is matching the value from excel. for eg: aaname,title etc…

if its matching then you need to replace the attribute value as below.

aaname=+row.item(“ContactType”).ToString+

Hello @Rahul_Unnikrishnan appreciate for timing.

It is aaname which holds different values.
I did as u recommended

webctrl aaname=‘+row.item(“ContactType”).ToString+’ tag=‘BUTTON’ "

But selector validation fails.
I created a variable and assigned as below
dropdown=“‘+row.item(“ContactType”).ToString+’”

It says 'current selector is invalid…

Thanks VS

Hello @VSharma

Can tou try to print row.item(“ContactType”).ToString in a message box and check whether correct values are generating

Also you can assign the above expression to a string variable in assign activity.

Then in the selector, aaname aatribute right click and select the variable

Hello @Rahul_Unnikrishnan Thank You for inputs

I did print the value it picks the 1st row value as expected
I am already sending that in a variable as below
dropdown=row.Item(“ContactType”).ToString //assign activity
Value is printed as expected in message box

Then passed to tag as below
webctrl aaname=’ “+dropdown+” ’ tag=‘BUTTON’ id=‘combobox-button-279’ />"

What should we the default value for the variable
Blank or None (1st value in drop down) or row.Item(“ContactType”).ToString

…Not getting why that value is not being passed .

Thanks
VS

@VSharma

Can you please confirm whether the id id=‘combobox-button-279’ is always static.

Hello @Rahul_Unnikrishnan

webctrl aaname=‘Walk-In’ tag=‘BUTTON’ id=‘combobox-button-241’
webctrl aaname=‘SMS’ tag=‘BUTTON’ id=‘combobox-button-241’
webctrl aaname=‘Phone’ tag=‘BUTTON’ id=‘combobox-button-241’

Thanks VS

@VSharma

can you remove the id from the selector and validate it once.