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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Using UI elements for ...
Power Automate
Suggested Answer

Using UI elements for different instances of the same application

(0) ShareShare
ReportReport
Posted on by 1
I was trying to encrypt multiple excel files, by looping through them, and pressing the UI elements that I captured, however this worked only for the first file (from which the UI elements where captured).
Does this mean that UI elements work only with the same application instance they were captured from?
I'm getting the following error: " Failed to press button, failed to get window"
Screenshot 2026-04-09 094304.png
I have the same question (0)
  • Suggested answer
    rezarizvii Profile Picture
    352 on at
    Hi, hope you are doing well.
     
    Each time you open a new file, it creates a new window instance / handle. Your captured UI element still points to the old window which is why PAD can’t find it anymore.
     
    To fix this, you must attach to the correct Excel instance each loop.
    • Re-capture UI elements with:
      • Window title contains (not exact match)
    • Or use wildcards (if file name changes per loop)
     
     

     
    Reza M. Rizvi
    Reza M. Rizvi
    LinkedIn  |  Email
    If this solved your issue, please mark it as ✅ Accepted Answer. If it helped, feel free to give it a 🩷 Like!

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 377

#2
11manish Profile Picture

11manish 279

#3
David_MA Profile Picture

David_MA 234 Super User 2026 Season 1

Last 30 days Overall leaderboard