Power Automate  

How to Capture UI Elements in Power Automate Desktop Flow (PAD)

If you’ve worked with Power Automate Desktop (PAD) for any kind of UI automation, whether automating web forms, desktop apps, or internal tools, you’ve definitely bumped into this: capturing UI elements.

In simple terms, these UI elements are like PAD’s eyes. They help it recognize buttons, input fields, dropdowns, links, and so on. Without capturing these properly, your automation might work one day and fail the next.

Let’s walk through how to capture them properly and use them like a pro.

What Are UI Elements in PAD?

UI elements are visual components from any app that PAD uses to interact with the screen.

Think of it like this: when you automate a task that involves clicking a button or typing into a textbox, PAD needs to know exactly where that button or textbox is. That’s where UI elements come into play.

They’re stored under the UI Elements pane, and you can reuse them across different actions like Click UI Element, Populate Text Field, Extract Data from Web Page, etc.

Steps to Capture UI Elements

Here’s a quick and practical way to capture a UI element.

1. Open the Flow in PAD

Open the desktop flow where you want to automate some UI actions.

2. Add a UI-Based Action

From the Actions pane, drag something like.

  • Click the UI Element in the Window
  • Populate Text Field on Window
  • Get Details of UI Element in Window

Any of these will work.

Work

Drag it to the main screen,

Main screen

3. Click “Indicate UI Element”

After dragging the action, click ‘Indicate UI Element’ on the screen. Now PAD will minimize, and your cursor will turn into a crosshair.

UI Element

Click Add UI element.

On the right side, you can see the added UI element,

Add UI element

Got any website like C# corner?

Csharp

4. Hover Over the Target Element

Move your mouse over the app or browser where your target element is—say a Login button or an input box. Once it’s highlighted in red, click it.

PAD captures the element and saves it in the UI Elements list.

UI

Done. That element is now ready to use.

How to Test if the Element Was Captured Properly?

Sometimes PAD captures too many properties or not enough. Here’s how to make sure it’s reliable.

  • Open the UI Elements pane
  • Right-click on the element you captured
  • Select Edit UI Element

You’ll see different properties like Automation ID, Class name, Name, Control type, etc.

Try to avoid relying only on screen coordinates—those are brittle and will break if anything shifts.

Pro Tip: Choose a unique identifier like AutomationId or Name if available.

Reusing UI Elements

Once an element is captured, you can reuse it in multiple actions without capturing it again.

For example, you can,

  • Use the Click UI Element to click the same button again
  • Use Get Value from UI Element to extract a label or field value

This helps keep your flow clean and reduces redundancy.

Common Issues While Capturing

Here are a few problems you might face (and how to fix them).

Issue Fix
PAD can’t detect the element Run PAD as an administrator, especially if the target app runs in admin mode
UI element captured with coordinates Try using UI frameworks like WinForms/WPF that expose properties
Web elements not recognized Use Web Recorder or install Chrome/Edge extensions provided by PAD

Bonus: Organize Your UI Elements

If your flow is big, and you're capturing 20-30 elements, it’s good practice to,

  • Rename them meaningfully (like LoginButton, UsernameField)
  • Use folders or group elements by screen or module
  • Delete unused UI elements to avoid clutter

Final Thoughts

Capturing UI elements properly is the foundation of any stable PAD automation. Spend a bit of extra time making sure they’re accurate and dynamic—you’ll save yourself from debugging hell later.

If you're working on real-world automations—banking apps, internal portals, or anything that moves fast—mastering this step makes all the difference.

Next up, I’ll be covering how to use image-based automation when UI elements don’t work. Stay tuned!