List Box / Drop Down List - Unable to Automate

Dear UiPath Gurus.

I was doing a trial on an internal web application. when I tried to use the “Multiple Select” and “Select Item” I am getting the error showed below.

6

Basically all i need to do is read the Colum Date from excel and select the appropriate date based on the excel data.

I managed to read the date but I don’t know how to compare the date in the List Box / Dropdown box and select the date. No mater what I chose and also do the manual changes via Ui Explorer i can get the results.

Below is the Web Application UI

2

This is my test sequence below. As you can see the image is also different.

10

When ever i use “Multiple Select” and “Select Item” the below error will be displayed,

11

i only have 5% more to complete the project. Could someone please help give ideas how can I compare the Dates in the drop down List with the data taken of excel? Please note that the Date Drop Down List is Dynamic.

Thank you
Regards
Subas

Hi - @subasc

Try this : select the drop down manual and type the date. If the dropdown reflects desired value then try directly setting the drop down value as your excel date.

Or

record the screen and after clicking on drop down click pause F2 , hover on the value you want to select and once the recording resumes , click on the value. Now check the selectors for your selection

Also check if Get attributes helps you to identify any element to avoid the error.

Hope this helps you!

Greeshma

1 Like

Can you click inspect element on the drop down arrow?
I think you have issue with the selector .
if you want online help let me know.

Hi,
If the selector will still not work, you could:

  1. Read values of the drop-down to e.g. varible dropDownValues

  2. Split them and assign to a array of strings
    dropDownArray = dropDownValues.Split(Environment.NewLine.TocharArray)

  3. Find index of the needed date in your array
    index = Array.IndexOf (dropDownArray, varDate)

  4. Send hotkey “down” to the drop-down as many times, as your index indicates. After that send hotkey “enter” to select the date

If you need a better explanation, please let me know

dear @gsripada.

Thank you for coming to me. i am not able to type in the date but only able to click and use the UP and DOWN keys. I have done the recording and these are the screen shots below.

1

Is there a way to extract the Drop Down List and move each date there into a variable so i can then compare the date read off the excel sheet with the dates that are in the variables taken from the drop down list.

Regards
Subas

Dear @JuvRPA.

Thank you for coming back to me. below are the extracted images of the elements. The list is dynamic and i can only use the mouse to click or the UP and DOWN key to move to the date.

My issue is how to extract those Dates from the Drop down List and move each to a variable and the using those variables compare to the the variable that is read of the excel sheet?

Below are the screen shot of the elements.

i would be very glade if you can show me online how to do this last bit.

Regards
Subas

Dear @alisa.kliuchnikava.

Thank you for the suggestion and also coming back tome so quickly. Really appreciate all of you for helping.

To answer your suggestion on No 1, i can’t read the value of the drop down as every activity i try it gives me the error show on my initial post. Based on that i am not able to do item 2 to 4. If you have any other methods that you can share please?

Regards
Subas

Hello,

Could you please use UiExplorer and click on the drop-down?
Please check in the properties window if the text is displayed there.
E.g. I used some random drop-down to choose gender, and attributes “outertext” and “innertext” contained all the text from the drop-down:

Hello @alisa.kliuchnikava.

Please see the below screen shot. The innertext and outertext show “Please Select”

image

Thank you for the assisteance

Regards
Subas

Okay,

In this case could you please use activity “Set Web Attribute”
As attribute please choose “innerhtml” or “innertext” if it gets displayed
As value please write the date
Not sure if it will work, but it’s worth a try :slight_smile:

Dear @alisa.kliuchnikava.

I am working with the "Set Web Attribute. I think this is going to help as with Static Date it work perfectly. Now i am converting the static date to reading of an excel sheet.

I am having a Date format problem. Below screen shot is from the excel sheet

3

As you can see that the format on the “O” Column is “dd-mmm-yyyy” but when i display the read data in a Message Box i get this below.

1

I need to get the above format to “dd-mmm-yyyy” to match the Drop Down List shown below.

2

What i plan to do is to use your suggestion of using the “Set Web Attribute” and place the date variable into the “Set Web Attribute” under innerhtml with the Date Variable below the “innerhtml” attribute as per the below screen shot.

4

My only issue now is to change the Date Formatting to “dd-mmm-yyyy” in the Variable.

Could you please help?

Regards
Subas

dear @alisa.kliuchnikava.

Also i am not sure why am i getting this error when i try to implement the examples from the forums. Any idea how to solve it

6

Thanks & Regards
Subas

@subasc

This works for me, give “MMM” instead of “mmm”

Cheers !
Greeshma

Hello Subas,

Exactly like mentioned by @gsripada:
Please replace “mmm” with “MMM”

Also in the window for variables indicate varNewDateFormat as String instead of GenericValue

If you need more help, please let me know

1 Like

dear @alisa.kliuchnikava and @gsripada.

Thank you for all the help that you have provided me. i managed to now convert the Date from reading excel in this format below “Start Date”

3

1a

to the below format

2b

which meets the drop down list below which is perfect.

2

Now, i built a different work flow to test out the “Set Web Attribute”. This work flow has Static Date in a variable and using the “Set Web Attribute” i managed to place the Date into the Attribute and the Date was updated on the drop down List. This was the perfect solution.
Below is the work flow

image

image

image

Since it was working perfectly I decided to implement this work flow into the original file. the only difference is that the data now will not be static as it will be read of the “Start Date” column in excel. below is the work flow for that.

image

image

image

This where things get strange. I have message box in 2 places in the flow just to verify that the Date can be converted and that works perfect.

The issue is when i place the Date in the “Set Web Attribute”, the Drop down List will not update.

This is strange as the flow is a duplicate of the Static Variable where the only difference is now the Date is Taken off Excel into a variable.
I don’t understand why this is happening. i may have been using the “Set Web Attribute” wrongly but it work on my other Static Flow.

Please help as this is my last 2% which is still outstanding.

Thank You

Regards
Subas

@subasc

Hello,

If the static data is being read and passed to the element successfully but dynamic doesn’t work, I guess this must be a format issue. Have you checked the value which the variable or operation is holding.

I’m unsure if I got your recent post well, but I guess some minor tweak is missing to complete your task.

Dear @gsripada and the rest.

When I tried the static data on the original work flow it also does not work. So i assume its not the format. What i did then is i re-did my entire flow again on a new sheet and now I managed to get the date in.

what i also found out is when the date goes in, it does not commit the date as i can’t send a hot key to enter or click on it as its like a floating date. The application still requires a Click from the mouse and only then it will commit.

i new issue is the List Box of Date can’t be compared or entered manually as its a selection as such i have tried to Scrap the Data of the Dates and then place it on a Data Table. Once on a Data Table i will do a count. Based on the count i will Loop the flow and read of the Data Table and if the Data Table matched the Date from the excel sheet then the row number is obtain and based on that will send a Hot key “Down” based on the row number.

i just stumbled on a new problem where my IF statement is NOT working :worried: because my comparison between 2 variable are having issues. i have also posted that up to the group for some advice on how to Compare 2 Variables.

i would like to thank :heart: :heart: everyone that took time to help me when i was stuck. i will consider this problem close as once I have the comparison solution i will be able to close my project.

Regards
Subas

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.