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 / Please tell me how to ...
Power Automate
Answered

Please tell me how to reliably control the file selection dialog in a browser.

(1) ShareShare
ReportReport
Posted on by 24
Hello,

I have a question about controlling the dialog that appears when selecting a local file in the Edge or Chrome browser.

Depending on the state of the desktop, I can't control it well, so if anyone knows a more reliable method than mine, I would appreciate your guidance.

I always use the "UI Automation" action to control the dialog. I wait for the dialog to appear, enter the full path of the specified file in the file name, and press the open (or save) button.
In the Edge browser, I prepare UI elements with selectors like the following:
 
> window[Class="#32770"][Process="msedge"]

> window[Class="#32770"][Process="msedge"] > combobox[Class="ComboBox"][Name="ファイル名(N):"] > edit[Class="Edit"]
 
> window[Class="#32770"][Process="msedge"] > button[Class="Button"][Name="開く(O)"]

Basically, there is no problem, but I can't retrieve it when multiple Edge browsers are running on the screen.
Avoiding that situation solves the problem, but sometimes I want to display multiple windows to do some work. Is there a good method for this?
I have the same question (0)
  • Verified answer
    SaiRT14 Profile Picture
    1,990 Super User 2025 Season 2 on at
    pls try the following:
     
    Add more attributes to the selector for better specificity: window[Class="#32770"][Process="msedge"][Title="Open"]
     
    Before triggering the file dialog, capture the title of the parent browser window. Adjust your selector to target dialogs owned by the window with the captured title window[Class="#32770"][Process="msedge"][OwnerTitle="ParentBrowserWindowTitle"]
     
     
  • samoedo Profile Picture
    24 on at
    Thank you for your response.
    (I couldn't figure out how to reply, so I'm replying to myself.)

    Since selectors like Title and OwnerTitle were not available as options in Power Automate Desktop, I adjusted the parent selector to also check the Name attribute based on your advice.

    :desktop > window[Name="Page Title"][Process="msedge"]

    By specifying the page that has the "Open" dialog, it works well even if multiple browsers are open. Making the Page Title part a variable and inserting the title obtained with the "Get details of web page" action allows for dynamic handling, which is very convenient.

    Thank you for the advice.
  • Hairy_Drumroll Profile Picture
    251 on at
    Yes, the key is adjust the 'parent' selector.
    I had to set mine as 
    :desktop > window[Name^="%MyPageTitle%"][Process="msedge"]
    This ensured that the trailling text such as " - Microsoft Edge" didn't stuff it up.

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

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard