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 / Defining a dynamic sel...
Power Automate
Unanswered

Defining a dynamic selector in web Automation

(0) ShareShare
ReportReport
Posted on by 2

Could someone help me in changing the populate text field of web page selector as the input field changes as the page gets reloaded. 

 

My task is to enter the master data of customers, which are stored in a separate Excel spreadsheet, into a model driven app  that I have created with PowerApps. After the form is filled in for one customer the bot has to do this for each row of the data table. For this I used the ForEach action. Unfortunately, once the new form loads, the UI selector of the text field won't get recognized correctly. The following did not work:
div:contains("CustomerName") > input.

 

Here you can see the HTML details: 

sarah1898_0-1625915424590.png

 

Which of these could be used as an anchor? Thanks in advance!

 

 

I have the same question (0)
  • tkuehara Profile Picture
    667 on at

    Hi @sarah1898 

     

    Could you provide more details about your flow? When you say it didn't work, does it run at least once?

    If it does recognize the first time, then it might be the case of waiting for the element for a bit longer.

  • sarah1898 Profile Picture
    2 on at

    Hello @tkuehara

    thank you for replying!

     

    I have tried your recommendation, but unfortunately that did not work either. Yes exactly, the ForEach-loop runs one time sucessfully... After one form has been saved, the text field doesn't get recognized anymore. 

    sarah1898_1-1626351726979.png

     

    sarah1898_0-1626351685172.png

    If someone could help me, that would be awesome!

  • tkuehara Profile Picture
    667 on at

    Hi @sarah1898 

     

    I see you have a "Set drop-down list list value on web page" before the "Populate text field on web page" action. Does the former work after one form has been saved? If none of the controls work after the first save, then it might be a higher-level change in the page structure.

    The selector "div:contains("CustomerName") > input" is already pretty generic and should work in most cases, again, unless the refresh changes its structure after the first save (like adding a new element like a div or label before the input).

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 959

#2
Valantis Profile Picture

Valantis 872

#3
Haque Profile Picture

Haque 589

Last 30 days Overall leaderboard