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 / Dynamic selector change
Power Automate
Unanswered

Dynamic selector change

(0) ShareShare
ReportReport
Posted on by 39

This is the selector I use to select data from a drop down each time when page get reloaded the 856 value alone gets changed with some random value. I tried replacing 856 as * and tried but still error no element found. Please do help  me solution.


div[Id="18:856;a"] > div > div > a[Class="select"]

 

  • HellitonWoo Profile Picture
    39 on at

    After opening the selector with "Visual Editor", you can try to change the "Operator" of certain "attribute"

    This is a screenshot of selectors for "Windows Calculator". You can see that I changed "Equal to" to "Start with" and this still works

     

    HellitonWoo_1-1602682088365.png

    HellitonWoo_2-1602682135530.png

     

     

     

    If this "ID" is very unstable, I'd suggest you tick it off and use another attribute.

  • adijain Profile Picture
    Microsoft Employee on at

    Hello @soumiya, In addition to what @HellitonWoo mentioned, you can also directly customize the selector to any of the following:

    •  div[Id^="18:"] > div > div > a[Class="select"] - this will target the div element which has the Id attribute starting with "18:".
    • div[Id*="18:"] > div > div > a[Class="select"] - this will target the div element which has Id attribute containing "18:"
    • div[Id@="18:.*?;a"] > div > div > a[Class="select"] - this will target the div element which has id attribute matching "18:*a", here regular expression is applied.
  • soumiya Profile Picture
    39 on at

    Thanks for your reply....

    Still its not working throwing same error element not found 

  • soumiya Profile Picture
    39 on at

    Thanks for your reply....

    Still its not working throwing same error element not found

  • adijain Profile Picture
    Microsoft Employee on at

    Hello @soumiya, could you please let us know the webpage URL where the element exists? It will help us identify patterns in specific attributes of the target element which do not change dynamically. 

  • soumiya Profile Picture
    39 on at

    We are trying to automate salesforce Lead process

    https://ap16.lightning.force.com/lightning/o/Lead/new

     

    The above URL is used for automating

  • soumiya Profile Picture
    39 on at

    I have attached the screenshot of where I need to automate so in this i need to fill the most of the field. In selector only a part of Id changes for all field i had identified and tried to change it as dynamic but nothing works.

    Capture.PNG

     

    div[Id="18:846;a"] > div > div > a[Class="select"]

    this is the selector for first dropdown field here 846 will alone be changing for each entry so i tried with start with option, contains option and lot more but still nothing helped to achieve my task.

    Please do help with solutions that would be possible for this selector   

     

    Thanks and Regards

    Soumiya

  • PetrosF-MSFT Profile Picture
    Microsoft Employee on at

    Hi @soumiya 

     

    You could also try using the "has" selector:

    https://support.softomotive.com/support/solutions/articles/35000089128-how-to-use-the-has-css-selector

     

    You could try several approaches, the following one may be helpful:

    div:has(a.select) > div > div > a[Class="select"]

     

  • HEATFreight Profile Picture
    1,024 on at

    .

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

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 426

#2
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard