Skip to main content

Notifications

Community site session details

Community site session details

Session Id : IUzTNXvQ2e+n4dFg5xXBwu
Power Automate - Power Automate Desktop
Unanswered

HTML dynamic Element selector

Like (0) ShareShare
ReportReport
Posted on 11 Nov 2022 09:47:24 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?

 

  • fugit185 Profile Picture
    20 on 16 Nov 2022 at 06:27:34
    Re: HTML dynamic Element selector

    could not get working, tried many times

  • momlo Profile Picture
    1,527 Super User 2024 Season 1 on 11 Nov 2022 at 12:49:38
    Re: HTML dynamic Element selector

    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

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Power Automate Desktop

#1
eetuRobo Profile Picture

eetuRobo 64 Super User 2025 Season 1

#2
Nived_Nambiar Profile Picture

Nived_Nambiar 18 Super User 2025 Season 1

#3
CU12050101-0 Profile Picture

CU12050101-0 12

Overall leaderboard
Loading started