<aside> 💡 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.

</aside>

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.

Untitled

In this case, you will need to navigate to the following URLs:

  1. https://links.sgx.com/1.0.0/corporate-announcements/RV2BQWRZDF3YOHPB/601ebc6e2687d0f3fd9997f3aeecadd8580963a4bcd39631a0b966739e715376
  2. https://links.sgx.com/1.0.0/corporate-announcements/Z8S9J2N08E4X5WIE/7c642c72d8bdc401c3c726eaaf999a091222375a282afa286045974afd9724db
  3. https://links.sgx.com/1.0.0/corporate-announcements/7XSDF8SHB4Q88FNM/ff13ff9ec0b2075eed8e4723a362c21bc1a74bc82484e87187c7bd082828cef8

Solution

The following flow provides a high level overview of the solution:

Untitled

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.

Untitled

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:

  1. %Url% which is fixed and is “https://links.sgx.com/1.0.0/corporate-announcements/” in this example
  2. %CurrentItem[0]% refer to the first column of the current datarow, i.e. “CurrentItem“, which is read from the Excel