How to use Javascript to scroll down on webpages with Microsoft Power Automate

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome rpa champions i am the rpa champion and this morning i woke up and i wanted to extract all of the urls and all of the information from all of the groups that i belong to in linkedin however there was a problem the page that i wanted to extract the information from was loading automatically as i would scroll down so i needed a solution solution is automation exactly we're going to be using microsoft power automate to give us a hand with this automation so we're going to create a new process we're going to create a new process from scratch we're going to call this process with a meaningful name so that we don't lose it amongst all of the other processes we have extract all data from loading a table that's what it's going to be called and we're going to start with a blank canvas meaning that there's going to be nothing inside of your process we're going to see every step how to do this so in this video we're gonna see how to open a linkedin page in this example load a table dynamically and extract the urls from that table so let's go to the linkedin groups let's maximize the link using the option to launch google chrome and let's add also the functionality to run some javascript so let's look for the javascript option so run javascript and let's add the javascript this is going to allow microsoft power automate to execute some javascript when the micros when the google chrome page is open let's test the process and see if this is working so the page is opening and it doesn't seem that there has been anything executed but that is because we don't add any javascript to our process so far so let's go back and let's add some javascript that is going to scroll all the way down to the bottom of this page and then we're going to extract all of the urls from this page as well so let's go back to power automate and extract the url so that we don't have to do it we're going to have microsoft power automate do it for us back in microsoft power automate we have added the functionality to run some javascript inside of our process so let's add some javascript this is the default function that is created by microsoft power automate when you add this when you add this capability so don't remove the function just maybe remove the comments if you want and put your code in here i have found some code online that allows me to scroll all the way down to the bottom of the page so i'm just going to paste this code that i went through and it looks pretty simple it's just a function that does another method and a call to scrolling down on the document body so more or less i think this should work i've checked out that this 50 is the interval with which this happens so this 50 is going to be 50 milliseconds or it's going to be a really fast interval solution scroll down immediately immediately immediately so as we can see the page is going down immediately it went all the way to the bottom of the page now i have loaded all of the results already on the page so by scrolling all the way down i have loaded all the results now i can extract all the results with microsoft power automate by extracting all the results i will be able to put all these results in an excel sheet so the easiest way to do this is either by dragging dropping an action or just by hitting the record button and then extracting or clicking the record and then highlighting what we want to extract since this is not a table but a list and selecting the different things that we want to extract so in this example i will extract the url is the main thing but just to show you that we can extract also different things we can extract the image url we can extract the number of members this group have so we can extract all this information and put it inside of an excel sheet from which we can do further automations so let's save this process and what we have generated is obviously what has been created by microsoft power automate so we're gonna have to remove some things that we don't need like the comments and also the navigate to the page what we are left is is with this function we're gonna change it to excel spreadsheet extract data from web page and this is pretty much all of our process we should add a weight of four seconds to wait to load all of the elements and our process should work as so far it has gone all the way down to the bottom of the page now it should save all the results in excel sheet and as we can see all of the results have been saved in excel sheet and we have successfully extracted some 50 urls from uh from linkedin that of all of the groups that we belong to this is just another example of how automation can be used to save hours minutes but save you time by doing repetitive things that you otherwise you would have to do manually keep in mind also that there is no website no captcha nothing that is saved from automation and processes can be done in different ways to achieve the same goal keep in mind also that the idea is to have the simplest process with the smallest amount of steps inside of the process this for a couple of reasons so that your process can be efficient you don't have to debug it a lot and that you can build it quickly thank you so much for watching rpa champions in the next video we are gonna see how we can send or upload posts to different linkedin groups now that we have extracted them all to an excel sheet we are going to be creating a really great process in the next video so sticker stick around and i will see you in the next one thank you so much for watching you are the best
Info
Channel: RPA Champion
Views: 228
Rating: 5 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: E-WE9BpneOM
Channel Id: undefined
Length: 6min 5sec (365 seconds)
Published: Thu Sep 09 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.