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 / Issue with Web UI sele...
Power Automate
Unanswered

Issue with Web UI selecting "Choose File" button

(0) ShareShare
ReportReport
Posted on by 38

Hello,

 

My first ever flow is all completed but I am having issues with the Web UI on PAD selecting a "Choose File" button on a web page to select a file from my desktop to upload to the browser.

 

I cannot seem to either click on the icon or input the file path through PAD. I tried either "press button on web page" and it does nothing (was recorded from web recorder) and I also tried to capture the UI element and chose to select element but doesn't work as well. I also tried "Populate text Field on web page" for input:file with the text as the file path and also no go.

 

This is the field:

 

File.PNG

 

This is what I see with DevTool:

 

File 2.PNG

 

Here is the selection for the action

File 3.PNG

Here is the UI Element

 

File 4.PNG

 

Any help would be greatly appreciated.

I have the same question (0)
  • fraenK Profile Picture
    2,125 on at

    Your selector is looking for an empty input element ([Value=""]), your screenshot shows a non-empty one.

    Is it empty by default?

  • Henrik_M Profile Picture
    2,021 Super User 2024 Season 1 on at
    1. Don't use Web Recorder, ever.
    2. Try if you can implement this technique in PAD to better activate the web element: How to send physical right/left click on web element | Microsoft Docs
  • IsaacR Profile Picture
    38 on at

    Yes, it is empty by default and after I select the file it shows the way it does on the screenshot. When I look at the value through DevTools after I select a file, it looks like this:  "C:\fakepath\WCLeadImportSampleFile.csv"

     

     

  • burque505 Profile Picture
    398 on at

    @IsaacR, many frequent visitors don't like to use this function on web pages. I do. It's easy and usually works great. You can use DevTools to see if it's going to work before you commit to it.

    I don't know if this will suit your needs, since I don't know what the page will do after you load the value. It should fill in that input at least. Of course if you want you can substitute a variable for what I have here (maybe 'C:\work\PAD\myFile.csv' with %myCsvFile%, for instance.)

    (Running a JS function on the page should let you click the button if you choose to go that route, but I don't know what that button element looks like on the page. If you want, post the code for that button element and maybe I can help.)

     

    capture.PNG

    Regards,

    burque505

  • IsaacR Profile Picture
    38 on at

    Hello burque,

     

    I tried everything but no go. I even tried with Selenium, added option to update URL's from the plugin, and I still get this error: code":-32000,“message”:“Not allowed”

     

    I also tried it on Edge, reinstalled the plugin, and same issue.

     

    I tried to paste the html source code but the board keeps erasing my response. Have been trying for days but no go. How can I paste it without the board removing the info?I keep on pasting it between the script command.

  • burque505 Profile Picture
    398 on at

    Well, first things first, let's see if you can get the code onto the board.

    First click here:

    first.PNG

    That will expand the toolbar, as shown. Click on the indicated icon.

    second.PNG

    You should see this:

    insert code sample.PNG

    I suppose that's a proprietary URL you are using that you can't share, but if you can share it or at least a portion of it, that would also help. I guess you tried DevTools and running the JS I shared above on the page, right?

     

    I think from the code you shared that the page uses the Angular framework. I generally cringe when I see that because I usually have to jump through hoops to fill forms or scrape.

  • IsaacR Profile Picture
    38 on at

    Yes, I tried DevTools and running the JScript but no luck.

     

    I tried to save the code just the way you mentioned above but it does not work.

     

    Here are some images that I took of the relevant code:

     

    Capture ph1.PNGCapture ph2.PNGCapture ph3.PNG

     

     

     

  • IsaacR Profile Picture
    38 on at

    I think I made some progress. I recorded again through Selenium and one of the commands comes out as:

    Command : Click

    Target: id=file

    Value: C:\Users\Isaac\Desktop\LeadImport.csv

     

    I just changed the command type from Click > Type and voila!

     

    Now I just need guidance in how to implement that in PAD.

  • burque505 Profile Picture
    398 on at

    Glad you're making progress. Just out of curiosity, are you using Selenium from an upgraded version (i.e. not free 😀) of PAD? I only have the free version. If not, which Selenium framework are you using (like C#, node.js, python, java)? Or maybe the Selenium IDE?

     

    Anyway, that's just out of curiosity. If I would you I would try that 'Type text' activity on the element you found above, but after, perhaps, first a click or hover on that element. Sorry I don't have PAD available at the moment, so I can't do any kind of a test.

  • IsaacR Profile Picture
    38 on at

    Selenium IDE (plugin).

     

    I tried Set Focus on Text Field and I get "Failed to set input focus on web page text box."

    If I try just going straight to Populate text Field on Web Page, I get " Failed to write text 'C:\Users\Isaac\Desktop\LeadImport.csv' in form field.

    Here are the details:

     

    Robin.Core.ActionException: Failed to write text 'C:\Users\Isaac\Desktop\LeadImport.csv' in form field. ---> System.NullReferenceException: Object reference not set to an instance of an object.
    at Robin.Modules.WebAutomation.Actions.WebpageTextFieldPopulator.HandlePopulateTextResult(WebAutomationResult result)
    at Robin.Modules.WebAutomation.Actions.WebpageTextFieldPopulator.WebExtensionsBrowserRun()
    --- End of inner exception stack trace ---
    at Robin.Modules.WebAutomation.Actions.PopulateTextFieldBase.Execute(ActionContext context)
    at Robin.Runtime.Engine.ActionRunner.RunAction(String action, Dictionary`2 inputArguments, Dictionary`2 outputArguments, IActionStatement statement)

     

     

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 252 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 169

#3
Haque Profile Picture

Haque 154

Last 30 days Overall leaderboard