Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Power Automate Desktop
Suggested answer

I want to loop and select by adding variables when clicking in html browser

(1) ShareShare
ReportReport
Posted on by
I want to incorporate variables into UI elements from the action "Press a button on a web page" and loop through them.
Text editor for UI elements
div[Id="member_grid_html"] > div%member_change% > div > a > img
The Xpath obtained from the browser is as follows.
 
First person
 /html/body/div[9]/div[4]/div[1]/div[2]/div[1]/div/div[3]/div[2]/div[2]/div[3]/div/div[1]/div[1]/a/img
Second person
 /html/body/div[9]/div[4]/div[1]/div[2]/div[1]/div/div[3]/div[2]/div[2]/div[3]/div/ div[2]/div[1]/a/img
 
 /html/body/div[9]/div[4]/div[1]/div[2]/div[1]/div/div[3]/div[2]/div[2]/div[3]/div/div[n←I want to set this as a variable, but it doesn't work even if I set the variable]/div[1]/a/img
 
I'm trying to link Xpath with the setting summary, but it's not working as I expected.
Categories:
  • Suggested answer
    Nived_Nambiar Profile Picture
    17,929 Super User 2025 Season 2 on at
    I want to loop and select by adding variables when clicking in html browser
     
    Did you tried values for css selector used in PAD with hardcoding values for testing like below
     
    first 
    div[Id="member_grid_html"] > div.eq(0)> div > a > img
     
    second
    div[Id="member_grid_html"] > div.eq(1)> div > a > img
     
    third
    div[Id="member_grid_html"] > div.eq(2)> div > a > img
     
    like this ?
     

    Thanks & Regards,
    Nived N

    Stay connected:
    LinkedIn | YouTube | Blogs

    Was this answer helpful?
    If yes, please mark it as the solution by selecting the checkbox in the discussion thread.
    Your feedback motivates me to keep contributing. Thank you!

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2