web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Power Automate Desktop...
Power Automate
Unanswered

Power Automate Desktop to open html table row and download attachment

(0) ShareShare
ReportReport
Posted on by 48

Hi All,


We have a water bill portal and like to download the water bill for the properties using power automate desktop. The water bills are listed across 3 web pages and each page lists 50 water bills.

 

So far i have been able to automate the login process and navigate to the current billing page.

 

As in the attached screenshot the current bill page list all the properties with the water bill amount. To view the bill attachment, we have to click on the dropdown arrow and then click on the Download bill (PDF) button.

 

I do not know how to expand the table row for each bill and then download the attachment. 

 

Any help will be highly appreciated as im new to power automate desktop.

 

Please find below the screenshot of the current bill page and html code

 

WaterBills.png

 

The list index starts from 0 upto 49

 

table_index.png

 

Thanks

JS

I have the same question (0)
  • Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at

    Hi @jsbev 

     

    Could you show the selector of dropdown in power automate desktop ?

    Nived_Nambiar_0-1690034452075.png

     

    Let's see what attributes we can use here to increment the row so it loops to next 🙂

     

  • jsbev Profile Picture
    48 on at

    let me know if the below is the correct info required?


    I noticed the ordinal attribute for each dropdown increments by 12. ie the first row arrow has ordinal value of 11, the 2nd row 23 and 3rd 35 and so on

     

    dropdown_list.png

  • Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at

    Hi @jsbev 

     

    Ok thanks for sharing information

     

    So i would recommend to try this logic.

     

    First make the bot to scrap the single page, then calculate how much such drop down are there and use loop to loop a sequeunce that number of times, inside the sequence first select that drop down and click Download PDF 

    then increment the counter by 12 which would be ordinal attribute which you have shown.

     

    Put the same loop inside the another loop which clicks the page number one by one until it reaches last page 🙂

     

    Hope it helps !

     

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Also, you might want to use the ordinal index on the <tr> (table row) element instead. It seems like that one should be incremented by 1 with each row. But make sure you don't use a "class" property for the row element, because it seems like it has different classes for even and odd rows.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • jsbev Profile Picture
    48 on at

    Sorry how do i do that please?

  • jsbev Profile Picture
    48 on at

    Using the Extract data from web page action, i'm able to get the number of rows and table information as below.

     

    Based on this how do i setup flow that the dropdown link is clicked for each row and then click on download pdf button?

     

    FlowVariable_DataFromweb.png

     

    Table_Extract.png

  • Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at

    Hi @jsbev 

     

    Try like below

     

    1. First make a loop that click the page to browse to next page until it reaches last page , Now inside the do the below sequence for very page.

       

       1a. Extract the data from the page and determine how much rows of data are there in that page using extract data from webpage action.

     

       1b. set a variable ordinal with value as 11

       1c. Now use Loop number of times to loop given number of times the rows of table, with the sequence in the loop

          

               1c.1  Now use click action to click on dropdown element and make sure that selector attribute ordinal value is replaced by the variable ordinal set at step 1b.

          

               1c.2 Click Download PDF button 

               1c3. click on the same drop down again to close it

               1c4 Increment the ordinal variable by 12

     

     

     

     

    This is how you can design the flow 🙂

     

    Hope it helps !

    Mark it as solution if it resolves your query !

     

  • jsbev Profile Picture
    48 on at

    Making progress and pdf attachments are downloading and incrementing to the next row. 

     

    After the last attachment is downloaded, the loop does not stop and get the error below

     

    looperror.png

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    You should loop to %DataFromWebPage.RowsCount-1%. Since the index is 0-based, if you have 50 results, you should end at index 49.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • jsbev Profile Picture
    48 on at

    Thanks Agnius. Have a similar issue with the outer loop which increments the page number. considering the first page has page no = 1, i want the loop to stop after page 3

     

    If i change the PageNo to end = 2, then the page 3 loads, but the inner loop does not continue.

     

    outerloop_page.png

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard