How to navigate to different URLs based on an Excel spreadsheet
💡 Do you need to navigate to multiple URLs iteratively? Each of the URLs contains dynamic values which need to be read from an Excel spreadsheet.
Problem Description
You need to navigate to multiple URLs (and perform certain actions thereafter). For example, you need to navigate to:
https://links.sgx.com/1.0.0/corporate-announcements/<URL1>/<URL2>
Where URL1 and URL2 are dynamic values that you need to read from an Excel file.
In this case, you will need to navigate to the following URLs:
Solution
The following flow provides a high level overview of the solution:
We will need to read the Excel data as a datatable using the action “Read from Excel worksheet”. Remember to specify that the first line of range contains column names under the advanced properties.
Then, using the action “For each”, we will loop through each of the datarow “CurrentItem“ ****in the datatable. For each iteration of the loop, we use the action “Go to web page” to navigate to the URL “%Url%/%CurrentItem[0]%/%CurrentItem[1]%” which consists of 3 parts:
%Url% which is fixed and is “https://links.sgx.com/1.0.0/corporate-announcements/” in this example
%CurrentItem[0]% refer to the first column of the current datarow, i.e. “CurrentItem“, which is read from the Excel
%CurrentItem[1]% refer to the second column of the current datarow, i.e. “CurrentItem“, which is read from the Excel
Additional Information
Last updated on: 24 Jan 2023
Tested version(s): 2.27.177.22340
Prerequisites: Excel, Browser (e.g. Edge)
Dependencies: None
Known issues: None