How To Select From A Drop-Down List In Power Automate

drop down on webpage showing list of values

When it comes to automating web page user actions using Power Automate, sometimes it is quite challenging to select a value from the drop-down list. Depending on the front-end framework and the associated technology used, some drop-down lists look and behave differently when the user interacts with them.

In this post, we will how you can work with Power Automate to automate the getting and selection of a value from a drop-down list on a webpage.

We will also see the different ways you can select a value from a drop-down list. You can then apply what works for you in your web application design.

Drop-down lists selection in Power Automate

Idea # 1: Use Set drop-down list value in Window

Usually, if you have a flow where you need to click on a drop-down list, you typically use this “Set drop-down list value in window” step in your flow.

Drop Down List selection step In Power Automate

If for some reason, you will observe that your flow does not do this drop-down menu selection. If one fails to select a value from the drop-down. If so, you can try other ways to automate this step. Try Idea # 2 as discussed in the following section.

Idea # 2: Use Send Keys to Foreground Window

You can use the send keys step in Power Automate to automate the selection of a drop-down value. This works for some users whose drop-down list has this click thing in the drop-down widget.

Use the Send keys step as shown in the screenshot below. This worked for some Power Automate users.

Power Automate Send Keys for a flow

Try using the Send keys in your Power Automate flow and it should do the trick. Here’s how to do this. In the Send keys “text to send”, use the tab to go to the drop-down list. Now the list is focused. Then, use the down arrow to select the drop-down value that you want to highlight for selection in your Power Automate flow. Now, send the Enter/Return key to make the selection.

Send keys parameters in Power Automate

Idea # 3: Use Send Keys to UI element (Worked for me -Finally!)

When I tried using Send keys, it should have worked because it is a basic keyboard operation and nothing can go wrong here. But when I checked my Send keys parameters there are four options that it can accept.

  1. Foreground window
  2. By UI element
  3. By window instance/handle
  4. By title and/or class

Send keys “Foreground window” did not work for me. If you are in the same situation as I try changing this to “By UI element”. That will work because it really worked for me.

How to Take a Partial Screenshot on Windows

You have to change the parameter to “By UI element” and then select the drop-down list element on the webpage.

Now that will do the down arrow and select the list value that you wanted.

The Text to send in the Send keys will look like this.

{Tab}{Down}{Down}{Down}{Return}

You can repeat the “{Down}” key as many times depending on where your value is located in the drop-down menu.

Conclusion of drop-down list value with Power Automate

Trying out different ways like Send Key are some creative ways you use to create your flows that work for menus whose behavior is very dynamic and complex. No matter what technology is used to create your web application, there is a way in Power Automate to automate that user interaction. It just takes some trial and error and try out the different types of steps and see which works for you.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *