How to Loop a Drop-Down List with Power Automate Desktop (Full Tutorial)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
automating a dropdown also known as combo box with power automate desktop is straightforward here we go to amazon.com and in this drop down I want to extract all the elements so I can navigate through them afterward if you don't have an example right now please open up amazon.com and do this exercise with me you will learn much faster I navigate to Powermate desktop here I need to create a new browser instance so I find a launch new I pick Microsoft Edge because that's my browse of choice feel free to pick Chrome and Firefox this will work the same launch mode we don't need to launch a new instance because we already have the web page open so I'll say attach to running instance then I'll say I want to find tab by title I click this drop down and here you will see amazon.com the variable is produced that is a browser instance variable now we can refer to that variable when we want to automate the browser here I click save this was basic basic now we need to create a selector for the drop down and this is done manual so what you want to do is to go back to browser with your drop-down go up here right click inspect that will open up the developer tools this is the code behind the website and if your developer tools look like this over here to the right just click these three buttons and say do to button then you want to be sure you are in elements and to make sure that we are with the dropdown we can click this element picker and I can see I can pick elements here what you want to do is to find your drop down this is a little wider than we thought it's because all the text comes down so when you see this just click it and you can see that it highlighted down here in the code what I want to do now is to create a stable selector that identifi each one of these elements try to go down here to the select here you have it we have all these options we have the element is called option for each one of these we have some attributes with attributes values and then we also have a text and this is the exact text that we want out in the data table so we can iterate through them so what we will do here is to um create a an element for the selector that could be this element here select and then we can use this attribute ID equal search drop down box what we want to do here is to create a unique ele element that only exists here so what we're telling is that go to the select element and find the ID search drop down box that say something about the drop down box click to start open up a notepad it's much easier to do this with notepad so what I want to do I know it will start with select then um to have the attributes I will have a hard bracket and then I will find this attribute down here click two or three times on this that will mark it contrl C to copy it we go back to the notepad contrl V here and now we created the first element of our selector so this is just saying select that was the element and then we find a unique attribute with a value here so ID is fairly unique usually the web developers choose ID as a unique identifier hence the name then I have a space and I have a larger than and a space this is called a child combinator selector and that is how power automate desktop wants the selectors to be written in then I simply just need to say I want the option and that is the one thing that these have in common so I can simply just say option and this is my selector contrl a contrl z to mark it now we can use it in power automate desktop minimize the notepad close down the developer tools sometimes also just refresh the web page so we know we have have a fresh instance that will be when we automate things now we are from a blank start and here I want to find and extract data from web page I simply just click here and here we can see we work in browser and if I want this to work I need to open up the browser sometimes it doesn't show up this live web helper just move your browser a little bit around like this and then you will see the live web helper one I want to do here I don't want to do anything on this website I want to go to advanced settings here I want to click this dropdown I want to choose list and that is because I want a onedimensional list I want each one of these departments as single values I don't want to create a table because that will require me to have two values and I don't want that now so I choose list our base selector we just created that so simply just say contrl V to paste it in then we we need an attribute and that attribute uh is text we want to say to power tomate desktop we want to grab the text inside these elements so here I just say own text now I'm done I can click okay and here you will see all the elements of the dropdown is um typed out that was exactly what we wanted click finish click save and let's try to run it we're still not uh true yet yet but we just want to see that this works this will take very short if I go back here what you want to see is over here to the right and flow variables if this doesn't show up it will look like this simply just click the X in the corner it will say 28 rows and one columns I can open it and here you can see we have a data table called Data from web page and here we have all the results let's try to iterate to them first of all we might need to change this data from web page um because it could say something like data from dropdown just just to uh create a better name that is best practice the functionality will be the same so now I just say data from dropdown and that's just to make easier to maintain these flows so here I want a for each so now I want to iterate through all this data from the dropdown so I find a for each and here the value to iterate that will be the data from the drop down so I can click this x here say data from dropdown then I can store it into something and that will be something that says something about the data and that will be curent Department again this is optional but I will recommend that you do these things Implement them because your flows will get a lot better so keep good naming of your variables and if you want more best practices please click this video up in the right corner that is a 2hour guide taking you to all the best practices in power toate desktop so here I click save now I'm iterating to him let's say that I want to pick these in the dropdown or combo box also known as I go up to actions and then I find a set drop- down list value choose the one on the web form filling drag it in into the for each so now I just want to say I want to work in this browser and then I want to say uh what is the UI element I clicked this drop down I add the UI element go up and find the drop down press control and I don't want to clear all options what I want let me move this a littleit down I want to select the options by name because I'm iterating through each name here and for each and in the curent department the curent name is stored so here I can just say I want the uh curent Department I double click here then I can go in here I can either say zero as an index that will be the column or I can choose results because that was the header so zero or results that's it now I can click save here let's try to test it what I want to see is that um we pick each element in this drop down you can see now we are iterating through we could find put in more things in hour for each now you want to navigate to this toour best practices guide yes it will take you to everything locks Arrow handling creating the best flows so that you can be a better power to make desktop developer
Info
Channel: Anders Jensen
Views: 3,202
Rating: undefined out of 5
Keywords: power automate desktop, drop down, drop-down, combobox, combo box, combo-box, tutorial
Id: 9UgYhgFn0zs
Channel Id: undefined
Length: 8min 39sec (519 seconds)
Published: Fri Dec 01 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.