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 / HTML dynamic Element s...
Power Automate
Unanswered

HTML dynamic Element selector

(0) ShareShare
ReportReport
Posted on by 20

I need to write starting and ending times to specific HTML elements, but company website uses dynamic HTLM selectors. 

 

Here are those two dynamic selectors

"Input 36"

<input required="required" id="input-36" type="text">
#input-36
document.querySelector("#input-36")
//*[@id="input-36"]
/html/body/form/div[3]/div/div[3]/div/div/div/main/div/div/div/div[3]/div/form/div/div[3]/div[1]/div[2]/div[1]/div[2]/div[1]/div/input

 

"Input 186"

<input required="required" id="input-186" type="text">
#input-186
document.querySelector("#input-186")
//*[@id="input-186"]
/html/body/form/div[3]/div/div[3]/div/div/div/main/div/div/div/div[3]/div/form/div/div[3]/div[1]/div[4]/div[1]/div[2]/div[1]/div/input

 

In both selectors the numbers are changing when opening a new page!

XPATH is different but PAD doesn't support that, or at least PAD gives error when I try using XPATH 

 

I found other difference, above actual HTLM selector is "label"

It has name for the field which is different for different selectors. They are "Loppuaika" and "Alkuaika"

 fugit185_0-1668159181570.png

 

<label for="input-186" class="v-label theme--light error--text" style="left: 0px; right: auto; position: absolute;">Loppuaika</label>
<label for="input-36" class="v-label theme--light error--text" style="left: 0px; right: auto; position: absolute;">Alkuaika</label>

 

But I have tried but not found way to use that label.

So is it possible to use that and then how to do it?

 

I have the same question (0)
  • momlo Profile Picture
    1,527 Super User 2024 Season 1 on at

    See if this approach helps, it's exactly about what you need to achieve - using labels for dynamic inputs:

    https://www.youtube.com/watch?v=Lpk35MeTgFA

  • fugit185 Profile Picture
    20 on at

    could not get working, tried many times

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 233

#2
David_MA Profile Picture

David_MA 217 Super User 2026 Season 1

#3
Valantis Profile Picture

Valantis 190

Last 30 days Overall leaderboard