cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Vinodhkumar
Frequent Visitor

Dynamic selectors, web automation

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

1 ACCEPTED SOLUTION

Accepted Solutions
tkuehara
Solution Specialist
Solution Specialist

Hi @Vinodhkumar 

 

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

 

View solution in original post

10 REPLIES 10
PBrt
Frequent Visitor

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
Impactful Individual
Impactful Individual

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.

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
Frequent Visitor

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

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.

Vinodhkumar
Frequent Visitor

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?

tkuehara
Solution Specialist
Solution Specialist

Hi @Vinodhkumar 

 

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

 

View solution in original post

Vinodhkumar
Frequent Visitor

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

Vinodhkumar
Frequent Visitor

Kindly share suggestions to the above task.

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,692)