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 / UI AUTOMATION - window...
Power Automate
Unanswered

UI AUTOMATION - window name changes each time

(0) ShareShare
ReportReport
Posted on by
Hi 
 
I cannot see a previous solution for this.
 
We are building a Application (not web) UI Integration where the data entry window title changes each time - the first few characters remain same but the last characters are the next incremental batch number.
 
How can I refer to this window in the automation - either by the first few characters or a handle ?
 
Thanks a million
John
I have the same question (0)
  • Suggested answer
    VishnuReddy1997 Profile Picture
    2,656 Super User 2025 Season 2 on at
     
    Change the window selector like this.
     
    :desktop > window[Name^="First Application name"][Process="EWeb"]
     

    The ^ symbol inside [Name^="..."] is a "starts with" operator. It comes from CSS attribute selector syntax and is often used in automation tools like UIA selectors, CSS, or frameworks like Playwright.

    So,[Name^="First Application name"] means:


    • Match any window whose Name starts with "First Application name"

      For example, it would match:


      • "First Application name - Patient View"


      • "First Application name System Login"

     

     
    Regards,
    Vishnu Reddy
  • Suggested answer
    Riyaz_riz11 Profile Picture
    3,844 Super User 2025 Season 2 on at
    Hi,
     

    Solution 1: Use the Window Handle (More Advanced)

    If your title might not be unique or you want a 100% precise match, you can get the window handle dynamically.

    Steps:

     Use Get Windows action:

    • This retrieves all open windows.

    • You get a list variable %Windows%.

     Loop through the list to find the right window:

    For each Window in Windows
    If Window.Title starts with "Data Entry Batch"
    Set variable TargetWindowHandle = Window.Handle
    Exit Loop
     

     Use Attach Window by Handle:

    • Many UI actions in PAD can use the handle to target the correct window.

     This is more robust if:

    • You have many similar windows.

    • Titles are not reliable.

    Solution 2: Use UI Elements Instead of Title

    In many cases, window title is not the only way to identify the window:

    • Use the UI element recorder to capture a control unique to that window.

    • PAD will automatically record a reliable selector, often using the process + class + hierarchy, not just the title.

    This makes your automation:

    More stable across batches.

    Resilient if the title changes.

     

    If I have answered your question, please mark it as the preferred solution ✅ . If you like my response, please give it a Thumbs Up 👍.
    Regards,
    Riyaz

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard