7 Tips to build better selector in Microsoft Power Automate Desktop

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome rpa champions i am the arcade champion and in today's video i will be showing you how to create awesome selectors what i mean by awesome selectors is i mean selectors that will never fail allowing your processes to go on for infinity so to do this you are going to be learning seven tips that i have prepared in this video so without further ado let's jump right into this video and kick things off we are gonna be starting from tip seven and tip seven is all about selecting the correct element when recording now this means that we have to make sure that we select the right element when we hit the record button different elements are going to be highlighted in red for us to select but it's up to us to choose the right one choosing the right one will enable us to allow for specific features to be enabled so in this example i'm selecting the input and if i select the input i can insert the text automatically via the recording so i can add text and i can type in the text and add it automatically to the process while continuing the recording if i had selected something else i would have not been able to do so here's another example to extract the link from youtube video if i just highlight the mouse on top of it i cannot extract the link i need to select the part ui element and this is a another way of selecting elements that cannot be automatically selected to do this you would right click inside of the element select the parent ui element this will take you a step higher and you will be able to extract the link so always select the right element tip 6 and this step is going to be all about making our processes more resilient by spying the same element multiple times we will be able to make resilient processes what do i mean by that sometimes web applications change and the thing that we have spied is mixed up with different elements and therefore we are not able to spite anymore for example that can happen in a feed of posts on twitter or on linkedin or on youtube uh meaning that the link that we have spied in this example the first one could be the same but the second one could be slightly different and the third one could be slightly different as well however there is only maybe three or four variations of the link that can happen so what we need to do we need to spy all of these variations and by spying all these variations we can analyze the selector find the differences and also just add a new selector to the same ui element this will make that element more resilient to failure meaning that it we will have in one selector we will have multiple options meaning that if the first selector fails it will move automatically to the second if the second one fails it will move on to the turtle so by collecting a few of these exceptions we can build a really resilient process we do this usually during the debugging phase when we see where our process is failing we record that part and we add it as a new selector tip number five and this step is going to be all about debugging our processes and we're going to start by inspecting the element or viewing the source of the page to do that we can just simply press f12 on our keyboard and we will be open with this panel that i have on the bottom side of my screen this will allow us to inspect the different elements so let's say we are having a hard time spying the link from the youtube video we don't know why we are not able to get the link we can spy the element and see what is happening with the code of the page this is both useful for ui selectors and css selectors when we spy we can see that there is something on top of the link that might be blocking the initial link so also we can also see the different parameters that we can also utilize and customize in the bot in the main in the css selector but also in the ui selectors we can also see all of the elements that power automate has inserted inside of the browser that allow us to see these different pieces of the code this will allow us to debug our selectors making them more robust understanding what can change dynamically inside of the uh inside of the code of the template and it will also give us a higher level view and idea of what is happening with the structure of the application so if we are having a hard time debugging it is not behaving like we want it to then we should inspect the element and understand more tip number four and this is going to be a little hack in tip number four it's all about using the desktop recorder to spy elements on the web now we can use the desktop recorder not exclusively to spy desktop applications but we can also use it for image recording and for spying images on the web so let's say in a web applications we are having a hard time clicking or selecting a specific element on the page or maybe we just want something that is going to click in a specific part or move the mouse to specific part of a webpage well we can use the image recorder more precisely we can use the desktop recorder and activate the image recorder and spy the images that are and create images as spy objects now there are a couple of things that you have to make sure that you keep in mind and that is that the browser zoom should always be set to 100 that the resolution you should always check with power automate what is the resolution and you should also set the resolution of what you created your your recording you should also fine-tune the tolerance of the images and other things as well to make sure that image recording works tip number three and this tip might seem simple but it is all about keeping things clean and tidy to save time this is super important and that's why i have placed it in third place it might seem simple to rename all of your elements that you have just created and just as a reminder you can remain all of your elements by clicking the f2 key on your keyboard or you can right click on it and hit the rename element now renaming elements is super important because it will allow you to work faster not make mistakes and understand your process better renaming all different elements you can pick whatever naming convention makes sense to you but the most important thing is that you know what all different elements are now keeping things clean and tidy is not only about renaming elements it's also about having the right elements to use when you need to this will allow you to save time you can also delete all of the elements that are you are not using keeping things even tidier so there are different features and abilities that you can do to keep things clean and tidy just to name that the least things that you see in your page and the cleaner it is the better and faster you will be working and building your processes tip two this step is very important this is about fine-tuning your css selectors when you create a css selector which is much different from a ui selector a ui selector is creating via the web recorder while in this case the ui selector is created by just dragging and dropping an action from the actions pane and then uh adding a ui element to the page and like this we can add the different ui elements that are created now these elements are css selectors a css selector is created for each one of these elements this means that power automate is gonna take the html and css configuration that is inside of the html source code of the web page and try to create an element that it can spy or that it can reference to now this is in dynamic web pages this is can be quite troublesome why because this selectors can be very complex and also they can change a lot so it's up to us to select the right parameters inside of the selector we see a hierarchy of different selectors that have been created now by unchecking and checking the different parameters and attributes inside of the selector we can fine-tune our selector to get it to select exactly what we need in the condition that we need to if we fine-tune and test out our process with the different selections we will sooner or later be able to find the selector that we need we also have the ability to play with the value of the different selectors meaning that we can insert inside of any one of these parameters we can insert a dynamic value or a fixed value and this will make our selectors even more robust flexible and we'll be able to use them in almost any scenario it is also good practice to create the smallest selector possible so that is easier identifiable by power automate tip one now this is a very important tip and you should keep it in mind always you should always know when to use a css selector versus a ui selector so what is the difference when should you use one and when you should use the other one from my experience it is easier to use css selectors when you have to customize a link or when the link is bound to change when it's very hard to capture something i always use the css selectors because it allows me to fine-tune it and go really into the detail of the selector it can be quite complex and time-consuming going through all different elements inspecting the web page matching the the things and seeing why the selector is not working when it should be but usually in the end i always manage to find the right selector also with all the different parameters it really gives me a lot of flexibility on how to manipulate the selector if the process should do so on the other hand ui selectors are easier to build they can be built with simply with the web recorder while performing different actions on the web page by selecting the correct actions while we are doing the web recording we have the ability to almost create the entire process in just a couple of minutes without fine tuning particularly our selectors so when the web page is relatively simple and the selectors are relatively simple i usually like i tend to use usually ui selector via the web browser while on the other hand when there is a hard selector that is bound to change or that is changing quite often in that case i would use the css selector ladies and gentlemen thank you so much for watching and i hope that this seven insight and tips have given you quite a lot of information about power automate and how to create great flows that are always resilient and they don't fail i will be creating next a mega course on power automate and make sure that you tune in and check it out
Info
Channel: RPA Champion
Views: 373
Rating: 4.6190476 out of 5
Keywords: microsoft power automate tutorial, microsoft power automate desktop tutorial, power automate, microsoft power automate, power automate tutorial, microsoft flow tutorial, power automate desktop, microsoft automate, powerautomatedesktop, power platform, power automate desktop introduction, power automate desktop tutorial, power automate desktop web automation, power automate desktop app, power automate desktop flow, power automate desktop free, rpa champion
Id: NmEwmvColb0
Channel Id: undefined
Length: 11min 55sec (715 seconds)
Published: Sun Sep 19 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.