Automation selecting option in dropdown based on user input

Hello everyone, I need help on this project

I am trying to create an automation that downloads files from a site according to their month/year. However, the only hard part I am facing is the dropdown option as I want to save the inputted month and year and use it for other sites

So far for month dropdown, I have only constructed a “Click” activity on the dropdown and a multiple choice “Input Dialog” to save user input for month.

Same goes for dropdown for year, the only difference is that I added a “Get Text Year” activity between “Click” and “Input Dialog” as it may be used in other future years.

Also a few things:

  • The dropdown option is not typeable and must use clicks to change the month/year
  • My “Get Text Year”, I saved as availableYears outputs in my “Input Dialog” as 202320242025, instead of separate, does that mean I should use multiple choice for year too?

@Justin_Tan_Jun_Song_EE

Try with select Item Activity, in item to select option pass your month/year variable

It does not work; it did not even select an option to begin with

Sorry i am not able to understand exact your problem,

what you want exactly to do, do yo need to get the data from drop down? or
you need to create one dropdown by using input dialogue box?

Can you explain little bit more and some screen shots with input and output

Basically, I just want the automation to select the option (that the user writes in “Input Dialog”) when the dropdown list is shown

Hi @Justin_Tan_Jun_Song_EE

I can see that you are extracting the options using GetText and then passing it as the Multiple choice in Input Dialog.

You need to make sure that the multiple choice is correctly formatted
As you can see below, the options must be separated by “;”.

It will work:
image

You can then pass this in the Select Item Activity.

If this solves your query, Do mark it as a Solution.
Happy Automation :star_struck:

1st point you are able get all the data by usign get tex?
if yes, get text activity outout will be in string format, here if you want give those values in input dialogues box each item should be separate with semicolon ;
Then only you can see drop down.

If you are not abel to get all dropdown values by using get text use get attribute by using items you are able see all drop down values and that will be in the form of list you need to convert that to string by semicolon separation(;)

Ah yes that is what I am trying to do, but the main problem is that currently the automation is unable to find and interact with the option when I key in the year/ month I want. Furthermore, since the automation is going to be used in the future, it needs to be able to detect options that are not listed in the dropdown list (which is the 2nd main problem bugging me currently)

I have no idea what is causing the first problem to happen, dunno whether it is due to the dropdown closing immediately when I try to indicate its options on the screen

Hi @Justin_Tan_Jun_Song_EE

Why cant you try below approach

Step 1: Request the user to enter the year which they want to select. If multiple years are an option - Request them to separate using Comma

Step 2: Check the value enters is in the right format. Split using comma and make sure the values contain only 4 digits which are between a range of years

Step 3: If input validation failed - Display a message box highlighting the error and stop the process

Step 4: If validation is success - loop through the years and start selecting the year

Step 5: Save the input values to a variable and store it to asset. use the asset for future reference from other process

1 Like

Hello, thanks for the step-by-step process, I can now picture how the process should go. However, I hope you dont mind me asking a dumb question

How should I construct step 4, use a “While” loop with “Find Element”? Sorry its the only part confusing me as I cannot picture it

Like this

@Justin_Tan_Jun_Song_EE

In the above screnshot - lets say the first variable part is the output from your dialogue input activity

1 Like

Hello, sorry it took long for me to respond. I will only have access to my automation tomorrow, I will update you then if I have any more questions! Thanks a lot!

1 Like

Sure @Justin_Tan_Jun_Song_EE

Oh thanks for the advice, I did a bit of tinkering and it works now (with a problem different from this question), but thanks

1 Like

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