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 / How to upload a File f...
Power Automate
Unanswered

How to upload a File from Select File Button

(0) ShareShare
ReportReport
Posted on by 118

Hi Experts,

 

Please may I know, how to select a a particular file in Web Automation 

I have "Select File" button so I used that as UI element but that has no parameters 

 

I am thinking, I must use get file or something but unsure how to link ?

 

The actions are 

1. Select File  - > Click   the output is a windows explorer connecting me to local folder 

The following actions I do manually

I click the "Download" folder and select a particular .xlsx file and click upload 

 

repeat the same for 10 more time for 10 different files .

 

Any help would be appreciated 

2021-03-09_10h35_27.png

I have the same question (0)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @acerNZ ,

     

    I would do something like this:

    1. Press button on webpage action to open that file explorer

    2. Set the variable with exact file path

    3. If you don't know the exact file path use File/Folder actions in RPA to get the file path

    4. Use "Populate text field in window" action select the address bar(UI element) of the file explorer

    Note: Use the above action from UI automation section not Web automation

    5. Use the file path variable in "Populate text field in window" action

    6. Then use "Press button in window"  action

    Note: Use the above action from UI automation section not Web automation

     

    sakula1996_0-1615247918299.png

     

     

    Hope this helps 🙂

     

    Thanks

  • acerNZ Profile Picture
    118 on at

    @Anonymous  Thank you, I suddenly got blank, I don't see UI automation anymore, I never used it. I remember seeing that in the PAD menu on the top along with Web Recorder, Desktop Recorder but not anymore. Please can you help me how to invoke it so that I get the file path and come back to my flow to add that path to populate..

    2.  Another point:

    But what I did was to run the flow with just "Press Button" step, Ideally when I manually click "Select File" I get a windows explorer allowing me to select a file. But nothing happens, seems like "Press button on web page " has no impact. Please can you help me out.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @acerNZ ,

     

    I think, I might know the issue. Could you please send me the screenshot of your PAD development canvas.

     

    sakula1996_0-1615250088232.png

     

     

    Thanks,

  • acerNZ Profile Picture
    118 on at

    Hi @Anonymous Here is my PAD screen, 

    2021-03-09_11h47_29.png

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @acerNZ 

    I can see UI automation and Desktop recorder there:

     

    sakula1996_1-1615251295325.png

     

    Expand UI automation section, you should see all relevant actions

     

     

  • acerNZ Profile Picture
    118 on at

    @Anonymous  Thank you. Sorry My mistake, I was looking for "UI automation " menu, which somehow I remember seeing it. I am not sure, If I did what you wanted in steps but I still do not see "Press Button on Webpage" prompting me to select file like I do manually.  So have no chance to test "Populate text field in Window" 

     

    Note: The web automation is not recording the "Select File" click for some reason and when I automated the file selection, I have what you have suggested "Populate text field in Window" with embedded file path input.

    Strangely, only one step is recorded along with browser link attached to record automation.  When I run this is failing.

    2021-03-09_13h51_25.png

    More Information: This is an i-Frame and xpath is //input[@class='gwt-FileUpload'] but I think I can do xpath only in xml file. 

    Please can you guide me

    This Needs to be Clicked, "Press Button fails"This Needs to be Clicked, "Press Button fails"Fail scriptFail script

  • acerNZ Profile Picture
    118 on at

    Is this a limitation of the way this website designed/limitation of power app or some stupid mistake of me? Please can some one help me. Once I get through this, I have working in tabs to sort out

  • Charles Seguin Profile Picture
    401 on at

    Hello @acerNZ ,

    I am having exactly the same problem as you. I tried many things to solve this problem

    • Tried both Chrome and Edge (Chrome works better)
    • Cannot get it to work with Web recorder (will not record the step to click on the Choose File button)
    • Tried manually defining the UI element as a Web element, but it won't recognize the Choose File button)
    • Tried using UI Automation to click on the button. This actually works if I "Run from here" half way through my automation but it does not work when I run the flow from the start. Really weird. 

    Here is the button I'm trying to click on:

    CharlesS_0-1617155343982.png

    Here is a copy of my flow:

    Does not work when I start from Step 18 or before, but it works fine if I run it from step 19.

    CharlesS_5-1617156319966.png

     

    CharlesS_6-1617156365588.png

     

     

    All the Wait instructions and Chrome instances are there for debugging purposes. This is driving me crazy, holding back my project and starting to have a negative effect on my married life (lol, writing this at 10pm). Why would it work when starting from one step and not from the next?

     

    Also, it isn't giving me an error, it just keeps running and running...

     

    Any advice would be appreciated.

     

    Keep 'em flowin'

     

    Charles

  • fraenK Profile Picture
    2,125 on at

    Looks like your Chrome window is not in the foreground. Don't use this. Better start a new Chrome session and use this.

  • Charles Seguin Profile Picture
    401 on at

    Hello @fraenK !

    Thank you for your reply, however that is not the issue. I can confirm that the window is indeed in the foreground. When it isn't, I get an error. And why would my flow work just fine from step 19 and not from step 18 is that was the issue? Do you have any other ideas?

    Much appreciated!

    Keep 'em flowin'

    Charles

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 267 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 196

#3
Haque Profile Picture

Haque 182

Last 30 days Overall leaderboard