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 / how to move to specifi...
Power Automate
Answered

how to move to specific buttons on a web page via Xpath and click the buttons?

(0) ShareShare
ReportReport
Posted on by 14

Hi Experts, greeting from Ken !

 

how to execute Xpath in PAD? I want to click all "Display details" buttons on the website and below and further text extraction, however, just get a challenge that i can't based on "Selectors" to position the mouse because the Selectors for all the buttons are irregular naming but Full Xpath are in order, I listed details as below.   what pop out in my mind is by executing Xpath with variables in loop, RPA can one by one to click the button to extract text.    is there any existing cases or idea we can make it ? (detail as below)

 

Kenneth_TL_0-1685004597438.png

the website:  link 

example:  origin: HAIPHONG ; VN ; VNHPH

                 destination: VANCOUVER, BC ; CA ; CAVAN

steps: input above "origin" and "destination" -  > click "Search" - > click all "Display details" buttons one by one on the page.

 

Thanks you in advance !

 

I have the same question (0)
  • Verified answer
    Gematria Profile Picture
    222 on at

    Hi.

    You can use an incrementing Selector and a loop to interact with each element.

     

    The flow:

    Gematria_0-1685006628533.png

    The Selector:

    Gematria_1-1685006638816.png

     

    Flow explained:

    1. Set ActionCount variable to 0, used to determine which button to click

    2. Set EndOfDetails variable to false, determines when there are no more items to expand and ends the loop when it turns true

    4. Loop until EndOfDetails becomes true, which will happen when the action "Press button on web page" fails to find a button, indicating there are no more Details to expand. In the loop we increment the ActionCount variable by 1 each time which is then used in the Selector to click the next button.

     

    You can add the variable ActionCount directly in the Selector Editor to replace the last "0" in the Id

     

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 412

#2
Vish WR Profile Picture

Vish WR 305

#3
David_MA Profile Picture

David_MA 262 Super User 2026 Season 1

Last 30 days Overall leaderboard