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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / PAD Web Automation: cl...
Power Automate
Answered

PAD Web Automation: click on specific button according with div referrence

(0) ShareShare
ReportReport
Posted on by 51

Hi everyone, I have a flow in PAD that automates a web page by clicking the "Pagar" (pay) button.

However, this page may display one or more "Pagar" buttons, and what I need is for the click to occur specifically on the button in the "Mensalidade" div according to what I specify or the largest.

 

For example: below we have "Mensalidade 04" then the click must occur on the respective button ignoring "Mensalidade 02" and "Mensalidade 03":

 

LeandroCampacci_0-1695322392131.png

In this case below, we have only "Mensalidade 04" visible, then the click will occur on the button of that div:

 

LeandroCampacci_1-1695322445894.png

 

If I just capture the screen element via the PAD, it will "lock" a specific button. How can I tell him to use the "Mensalidade 04" parameter as a reference?

LeandroCampacci_2-1695323800483.png

 

  • Verified answer
    Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    You will need to extract all of the "Mensalide" values into a list. You can use Extract data from web page to do that. Then find the sequential index for the one you need inside the list, by looping through it. Or, if it is always ordered in ascending order, you can simply use the count of values by getting %DataFromWebPage.RowsCount% to get the last item.

     

    You will then need to use the index as a variable in the selector for your button. I suggest capturing a couple of instances of the button in different rows, to see how they differ. Then modify the selector to make it dynamic according to the row index.

    See here for more reference on how to customize selectors: https://learn.microsoft.com/en-us/power-automate/desktop-flows/build-custom-selectors#use-variables-in-a-custom-selector

    Also this tutorial video: https://www.youtube.com/watch?v=2PcyBa22Jj8&ab_channel=Thomas%22Shaky%22Petersen

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

  • LeandroCampacci Profile Picture
    51 on at

    That worked!

     

    Ths most difficult to me was get results from the page

    LeandroCampacci_1-1695758005934.png

     

     

    LeandroCampacci_0-1695757843729.png

     

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Great! Happy to hear you figured it out. Good luck in your automations. 

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 414

#2
11manish Profile Picture

11manish 331 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard