Sequence to grab url, place in search bar, and select first link in browser search


I’m new to UiPath without a programming background.

I have a list of urls and they can be in word or excel (my choice with whatever is easiest to grab and place into search bar). I am trying to grab those urls- one at a time- open IE browser to search, click on the top link that appears from the search and when that page loads, take a screenshot of what pops up, save the screenshot, then do the same thing with the next url til there are no more urls to search.

So far I created a sequence with Open Browser do Click input for the search field, used specific url for Type Into activity, Click again (or send hotkey), then I’ve tried Find Element or recording but I cannot figure out how to grab first link in search and open it so I can then use Take Screenshot activity and Save Image.

I do not need to save the data in a table, the screenshot details are good enough.

Please help.

Thank you!

1 Like

hope these sequence would help you resolve this
–lets take like we have a excel with a column having 10 records of url in it
–now use a EXCEL APPLICATION SCOPE and pass the file path of the excel as input
–inside the scope use READ RANGE activity and get the output with a variable of type datatable named dt
–now use a FOR EACH ROW activity and pass the variable dt as input
–inside the loop use a OPEN BROWSER activity and mention the input URL as row(“yourcolumnname”).ToString
and choose IE as a browser type
–this will open the browser and now use TAKE SCREENSHOT activity and select the whole browser as a element and get the output with a variable named screenshot
–next to this while still being inside the OPEN BROWSER activity, use a SAVE IMAGE activity where mention the variable screenshot as input and mention the file path of the image with .png file extension so that the image will be saved to that folder may be likethis format (filepath of image)
where counter is a variable of type int32 with default value as 1 defined in the variable panel
–next to this SAVE IMAGE activity finally use a ASSIGN activity like this
counter = counter + 1
so that it will increment for each iteration of FOR EACH ROW loop and the file name for each image will change

kindly try this and let know for any queries or clarification
Cheers @Jessica_Moseley

1 Like


Thank you for your thoughtful response.

I created an excel doc. My excel file path looks like this and it giving me an error:
2nd, I need to actually click on the link that shows up in the browser results and then take a screenshot of that screen- not the browser results screen.

Thanks so much for more clarification!
Cheers @Palaniyappan

I found my file path and Excel Application Scope is saying it cannot be found.

1 Like

Same steps as mentioned above till open browser but inside the open browser before TAKE SCREENSHOT accuse a CLICK ACTIVITY with Simulate click property enabled in the property panel of click activity
—then place the TAKE SCREENSHOT activity

Remaining steps are same

And for this

Kindly check with file path
For that paste file path in file path field in FILE EXPLORER so that we can check whether if it’s right it will take to that file

You were almost done
Kindly try this and let know for any queries or clarification
Cheers @Jessica_Moseley

Thank you, I really appreciate all of your help!

I’m attaching a screenshot. When I run the sequence an error occurs at Open Browser saying the Column does not belong to table DataTable.

Many thanks @Palaniyappan !