Search code examples
power-automatepower-automate-desktop

How to add click actions to go through list of links inside a variable ? Power automate desktop


I have simple flow:

1- Launch new Chrome with url `https://www.google.com/search?q=2022+games`
2- Extract data from web page into variable `%DataFromWebPage%`

Here is the flow

enter image description here

Here is the data:

enter image description here

How I can visit or click each link in the %DataFromWebPage% variable ?


Solution

  • Not really sure if you just want to know how to access the items in the variable %DataFromWebPage% or need to navigate to the urls in the list and then extract data from each page.

    It looks like you extracted the information into a data table/list so you can access the values using the index or the name. see the microsoft website

    In your example you can use a loop or for each loop and navigate to each page.

    Copy either of the 'code' sections below and paste it in your flow.

    LOOP FOREACH currentRow IN DataFromWebPage
        WebAutomation.GoToWebPage.GoToWebPage BrowserInstance: Browser Url: currentRow[1] WaitForPageToLoadTimeout: 60
    END
    

    or use a loop

    LOOP LoopIndex FROM 0 TO DataFromWebPage.Count - 1 STEP 1
        WebAutomation.GoToWebPage.GoToWebPage BrowserInstance: Browser Url: DataFromWebPage[LoopIndex][1] WaitForPageToLoadTimeout: 60
    END