Get details of element on web page in Power Automate Desktop

by

You can copy code of this article from my github and paste it in the Power Automate Desktop’s workspace

This article will talk about various actions in Browser Automation of Power Automate Desktop such as populate text field on web page, get details of element on web page

Before create this flow, make sure that you had already installed the Power Automate Extensions for working on the Browser. If you haven’t installed it read the installation guide here

Create Desktop Flow

Name the flow name “Google Weather” and press create button

Build a flow
Name the flow and press create button

Actions in Browser Automation

There are many actions in Browser Automation, it can group as web data extraction, web form filling and others.

Browser automation
Actions in Browser Automation

Launch new Chrome

parameter of “Launch new Chrome” has 2 types

  1. Launch new Instance: Open new window of Google Chrome
  2. Attach to running instance: Active specific window by title/URL/foreground
Launch new Chrome Launch new Instance
Type 1 Launch new Instance
Launch new Chrome Attach to running instance
Type 2 Attach to running instance (You can choose attach to Chrome tab By title/By URL/Use foreground window)

For this article set the parameter as per below:

Launch new Chrome
This action will create flow variable name as “Browser” automatically.

Open website that you want robot to work with. In this case I use http://www.google.com

www.google.com
Open http://www.google.com

Populate text field on web page

populate text field on web page before add ui element
After press “Add UI element”, the new window, UI element picker window will appear as per below.

Move mouse to the element that we want robot to work with. In this case is the Google search bar.

The red frame will appear on the element that we move mouse to, then press Ctrl on the keyboard and press left click on the mouse.

ui element picker and google
Ctrl + Left Click on Google search bar

We will get the UI element as per below:

populate text field on web page after add ui element
After capture the UI element of Google search bar

Type “bangkok weather” at text parameter

populate text field on web page input as text
Setting parameter in Populate text field on web page
If you want to encrypted (hide the text), you can click dropdown at the text parameter and choose “Direct encrypted text input” (Click here for see image)

We will mimick the robot work process by go to the http://www.google.com and type “bangkok weather”

Google.com
Mimicking the robot wrork process (Type bangkok weather)

Press button on web page

press button on web page before add ui element
The windows change a little bit from previous action because it will store all UI element that we had captured.

Move mouse to the element that we want robot to work with. In this case is the Google search button.

The red frame will appear on the element that we move mouse to, then press Ctrl on the keyboard and press left click on the mouse as same as the previous step.

ui element and google
Ctrl + Left Click on Google Search button

We will get the UI element as per below picture, then press save button.

press button on web page after add ui element
Setting parameter in Press button on web page (Google search button)

We will mimick the robot work process by press “Google Search” button.

Google search button
Mimicking the robot wrork process (Press “Google Search” button)

Then we will get the search results as per below picture:

google search result
Search Result from Google

Get details of element on web page

Click dropdown at parameter “UI element”. In this action we will capture the temperature result in Google search result.

Click UI element dropdown and press “Add UI element” button

Move mouse to the temperature.

The red frame will appear on the element that we move mouse to, then press Ctrl on the keyboard and press left click on the mouse.

Ctrl + Left Click on Google Search result (Temperature)

We will get the UI element as per below picture store in “AttributeValue” variable, then press save button.

Temperature’s element from Google search result

Display message

Drag action “Display message” and drop to Power Automate Desktop’s workspace

Setting parameter as per above image

Close Browser

Drag action “Close Browser” and drop to Power Automate Desktop’s workspace for close the website

Completed Flow

Press save button and press run button

Completed Flow

Example of Result

If you press run button, the message box will show title and body as our setting in display message action

Example of Result
Display message result (Left) and Display message action setting (Right)

Hope this article will be useful to the people who just starting to study Power Automate Desktop, if you have any questions about this article, you can comment and ask section below.

Don’t forget to press like, share, subscribe for good articles from now on (press the subscribe button and you will receive a mail confirming your subscription to confirm again as well).

Until we meet again, Happy Automating!! 😁

Did You Enjoy this Article?

Subscription to get new articles sent to your inbox each week for FREE

Question?

If you have any questions or feedback about this article please leave a message in the comments section below.


Comments

2 responses to “Get details of element on web page in Power Automate Desktop”

  1. Thank you for this step by step. I have a question. Let’s say I wanted to create a flow that would be identifying an image UI in a webpage, and this could be a random number of images on the webpage. How would I get Power Automate to count these images and store them into a variable so that I can recall that Variable and have Power Automate recall in another flow how many images that it counted? Here is the link to the website I had a question about. Thanks

    https://drive.google.com/file/d/11eORqNhU6tYob6nsaOZDT9kmlv6FgrBc/view?usp=drivesdk

    Like

    1. I don’t have access to this link. However I think you can use ‘Extract element from webpage’ action and find all tags.

      Like

Leave a comment

Subscribe to get new articles sent to your inbox each week for FREE