web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Dynamic selectors, web...
Power Automate
Answered

Dynamic selectors, web automation

(0) ShareShare
ReportReport
Posted on by

Trying to type user name in the text field, but unable to type it through bot due to dynamic selector, also getting the below error.

suggest me how to use find element or element exist and partial window selectors.

 

 

 

Selector.PNG

I have the same question (0)
  • PBrt Profile Picture
    27 on at

    Seems like you are mixing Windows automation and Web automation:

     

    For every classic application you use Windows automation section.

    For everything on the web (your use case), you use the "web automation" section.

    This is because the element selection process differs from windows application to web content (HTML pages).

     

    In your case you need to work with the "web automation" module (as you are working with a webpage).

     

    As of your code:

    1- You don't have to use "get window" because you just launched a browser instance and stored it into the variable %browser%.  Everytime you use an action from the "web automation" section, just specify %browser% as browser instance and the program will always know where to look.

    2- Instead of "populate text field in window" action, use the equivalent action from the web automation section. You will probably also need to change your UI selector, it looks a bit weird.

     

    Lastly, could you precise what you mean by dynamic selector?

     

    Best regards

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    PBrt is correct.  Instead, use "Populate Text Field on Web page" instead.  To find the element, go to the UI element drop down and select "Add a new Element".  Then, hover the mouse over your web page window and over the proper text field.  When the red rectangle surrounds the text box, Ctrl+Left Click and it will memorize the element (selector) to your bot.

  • Community Power Platform Member Profile Picture
    on at

    Thanks for the response, also kindly clarify do we have any activity in active pane for password protect?

    using variable i could not protect the values, it is easily visible to workpane. kindly suggest me do we have dictionary concept ? how? 

  • PBrt Profile Picture
    27 on at

    This is another subject but yes PAD is mssing a way to protect simple variables.

     

    If you work with password, never pass them in a standard variable (or they will be visible in the execution logs for every co-owner of the flow).

    Overall, i've noted two ways you can work with passwords:

    1- Directly hard code it in a "populate text field" action, and selecting the correct option (see picture, sorry it's in French). If you select the right option, your password will not be visible/retrievable from the execution logs. 

    1-Protected input in a textfield1-Protected input in a textfield

    2- Use Input/Output variables (in your case probably input as you wouldn't want the program to return a password at the end). You can select the "sensitive text" option and the variable will be "protected". Note that at the start of your flow, you'll be prompted to initialize these variables. However, you can simply add a default value and leave the prompt empty at start.

    2-Protected input variable2-Protected input variable

     

    However, in both case, you can always see the password if you can enter the code: you just have to click on the little "eye" logo to show hidden password.

     

    This can be mitigated using the right policy when its comes to roles and authorizations on a flow.

    I suggest to only allow the platform admin and the devs to "own" the flows so they can enter the code and edit it.

    Everybody else  should only have the permission to run a flow (so that they can't access the code or modify it).

     

    Also be careful if you send a copy of your code and it might contains sensitive data.

     

    Hope i was clear enough,

     

    Best regards

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    I did not have any luck using PBrt's options below.  Although everything explained is accurate and is supposed to work that way, it literally just ended up putting dots in the webpage and the password didn't work.  It is possible I did something wrong.  I don't know what ends up on execution logs or not, so I don't have any great answers.  The only thing that I can think of are the following:
    1)  For an attended bot, you could interrupt the bot with a message box asking the user to manually input their password into the proper field, and then click OK for the bot to continue.
    2)  For an unattended bot, you could have a password protected Excel file with all your logins and passwords.  Obviously, this has the same unintended consequence of, "well now everyone has access to your Excel password list." However, you could make this as simple or as complicated as you want.  You don't even have to keep the website in the Excel program, just the password, and point the bot to a specific cell.  You could keep usernames on a completely different Excel workbook.  You could keep the entire workbook encrypted, and the bot knows to run a Macro (held in another workbook to unencrypt the password workbook) before pulling the password.  So, there is a lot of steps you can do with this idea to separate the information that would make it **bleep** near impossible for someone to get those passwords for fraudulent use.  Of course, anyone else using the bot would need to have the same setup.  Best of luck.

  • Community Power Platform Member Profile Picture
    on at

    Thank you for the response.

     

    As a Beginner I wanted to learn more things into power automate. could you please guide me how we can use element exist and find element activities which are using in other automation tools. 

     

    Any videos if you have kindly share here. Power automate academy or tutorials?

  • Pavel_NaNoi Profile Picture
    1,074 on at

    Barely any videos, but tons of tutorial stuff here:

    https://docs.microsoft.com/en-gb/learn/browse/?expanded=power-platform&products=power-automate

     

  • Verified answer
    tkuehara Profile Picture
    667 on at

    Hi @Anonymous 

     

    I don't know if you wanted something like this, but you can retrieve some values from a given web element and one of them is checking if an element exists:

    tkuehara_0-1625705800570.png

    After running the code above, it will look for the element in the page and return true/false:

    tkuehara_1-1625706107796.png

     

  • Community Power Platform Member Profile Picture
    on at

    Kindly suggest the activities to spy the below UI elements.

     

    (WEB AUTOMATION)

     

    Case 1:

     

    While hover the cursor on the question mark image close button will be enable then it needs to be closed.

     

    Image 1.pngImage2.pngImage 3.png

     

    Case2:

    Trying to click tools option

     

    Image 4.pngImage 5.png

  • Community Power Platform Member Profile Picture
    on at

    Kindly share suggestions to the above task.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard