Microsoft Edge WebDriver - unable to upload file - sendKeys not working at "input type=file"

Fixed Issue #7194303


Milos S.
Apr 13, 2016
This issue is public.
Reported by 26 people

Sign in to watch or report this issue.

Steps to reproduce

using selenium I’m unable to upload file in Edge. IE works fine with the same code. Follow steps below to reproduce issue:

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.edge.EdgeDriver;
public class UploadFileEdgeTest {
    WebDriver driver;
    public void setUp() throws Exception {
        System.setProperty("webdriver.edge.driver", "pathToDriver/MicrosoftWebDriver.exe");
        driver = new EdgeDriver();
    public void tearDown() throws Exception {
    public void uploadFile() {


0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Rick J.”

      Changed Assigned To from “Rick J.” to “Ibrahim O.”

      Changed Assigned To to “Rick J.”

      Changed Assigned To to “Mara P.”

      Changed Status to “Fixed”

    • This is a duplicate of a backlogged work item to implement. Normally the value of an input type="file" is not settable except by the browser itself after the user opens the Browse dialog and selects a file.

    • Can you please link the ticket that this issue duplicates so that we can track it’s progress?

    • Can anyone let me know the workaround for this.I am facing the same issue.Not able to send the path of the file through send keys.

    • Is there any work-around for this at this moment? Java-script/Sendkeys do not work on edge driver for uploading a file.

    • Any possible work-around ?

    • As of now, this still appears to be an issue. Lack of this functionality causes inability to test file upload scenarios in Edge. Are there any updates or suggested temporary workarounds for this issue?

    • Any workaround available?

    • Unfortunately there is currently no workaround for this issue but we are actively working on a fix for this. A possible ‘workaround’ is to .Click() on the element and selecting the file manually via the file picker. I understand this is not a viable fix for any automated test suites and I’m looking to solve this issue as soon as possible.


      The bug we are tracking for this is internal and thus not visible externally, I will try to update all dupes of this bug when it is fixed.

    • Microsoft Edge Team

      Changed Assigned To to “Stanley H.”

    • You can workaround with AutoIT .

      using System;
      using System.Collections.Generic;
      using System.Linq;
      using System.Text;
      using System.Threading;
      using System.Threading.Tasks;
      using OpenQA.Selenium;
      using OpenQA.Selenium.Edge;
      using OpenQA.Selenium.Chrome;
      using OpenQA.Selenium.IE;
      using OpenQA.Selenium.Firefox;

      using System.IO;
      using System.Data;
      using System.Collections;

      using AutoIt;

      namespace OpenFileSelenium.OfdSelenium
      public class OfdSelenium
      static void Main(string[] args)
      Automation auto = new Automation();
      Thread oThread = new Thread(new ThreadStart(auto.DoAutomationEdge));
      FileMontior fmMonitor = new FileMontior();
      Thread fmThread = new Thread(new ThreadStart(fmMonitor.SetFileName));
      Console.WriteLine(“Waiting for Open…”);
      Console.WriteLine(“Start File Name…”);


      public class FileMontior
      public void SetFileName()
      int _numproc = AutoIt.AutoItX.WinWaitActive(“Open”);

      public class Automation
      public void DoAutomationEdge()
      EdgeOptions options = new EdgeOptions();
      options.PageLoadStrategy = EdgePageLoadStrategy.Normal;
      IWebDriver driver = new EdgeDriver(AppDomain.CurrentDomain.BaseDirectory, options);
      TimeSpan DriverTimeout = TimeSpan.FromSeconds(100);
      driver.Url = "";

            var theanchor = driver.FindElements(By.TagName("a")).Where(a => a.GetAttribute("aria-label") == "Search by image").FirstOrDefault();
            var indexanchor = driver.FindElements(By.TagName("a")).IndexOf(theanchor);
            string scriptex = "document.getElementsByTagName('a')[" + indexanchor + "].click()";
            var anchors = driver.FindElements(By.TagName("span"));
            var uptheanchor = anchors.Where(a => a.Text == "Upload an image").FirstOrDefault();
            var indexupanchor = anchors.IndexOf(uptheanchor);
            scriptex = "google.qb.ti(true); return false"; //href="javascript: void(0)">Upload an image

      "//"document.getElementsByTagName(‘span’)[" + indexupanchor + "].click()";

            Console.Write("FIN de DoAutomation");


    • this is now fixed in an internal build and will be available publicly soon.

    • Thank you for the update Stanley.
      Once you know about the release date or it is released kindly post a comment by informing.

    • @Stanley: Can you let us know if the fix is already available in latest Edge driver ? Kindly update on the version

    • Any update on this?

    • Our tests are failing (Edge only) :(
      Please fix this ASAP!

    • @ Stanley H. Is the fix available in the Latest Edge driver?? or its not yet released??

    • @Stanley H. When will the new version be released? Any idea?

    • Hi, Edge developers ,
      Any updates on above issue ?? Autoit

    • When we try to do it manually and compile script then it works fine , however when we run it using selenium webdriver then it doesnt repornd ? can you please what fix has been given and its there in latest driver or not ??

    • I still have this issue even after downloading the latest version, any plans on when this will be release?

    • Is this issue fixed?

      MicrosoftWebDrive.exe for RS3 (Version 16299) not launching EDGE Browser on RS2 Platform (Version 15063).
      This issue gets fixed in which version of Edge driver version 16299 or 15063?

    • Hi Developers,

      The files are not getting uploaded even via the AutoIT Scripts.
      Whenever the browse button clicks , the windows control opens up and the AutoIT doesn’t work at all. If we click the browse button manually then the AutoIT script works fine.

      And also we are not able to use sendkeys in the browse button.
      When the issue will be fixed?

    • Yes passing send keys on the browse button blocks the control and not releasing it to File Open dialog box and hence it is timing out. Need a fix for this.

    • Stanley H. Jul 26, 2017 MICROSOFT EDGE TEAM
      this is now fixed in an internal build and will be available publicly soon.

      Hi @Stanley H.
      According to the status on this ticket the issue has been fixed. Would you be able to tell me what version of the driver this has been fixed in and what versions of Edge this works against?


    • HI @Jon L.

      IS this issue fixed? Then please let me know the solution.

    • Hi @Siva,

      From what I have gathered this fix is not publicly available yet. I was replying to @Stanley.H’s previous comment where he said the issue had been fixed internally and the bug has been marked as fixed. However it is still an issue in the latest drivers I have grabbed.

      I have still not found a resolution to this issue, and I am awaiting a reply from an MS rep in this thread to confirm public availability.


    • Hi,
      Does anyone knows about this issue is still open or fixed?
      Is there any workaround available?

    • Still an issue with latest driver 16299…adding report here simply to get notified when the fix is publicly avail.

    • Since Microsoft seems to be paying no attention to this page, here’s another place to report it:

    • Hello Friends,
      I am facing similar issue which is described here. unable to click input[type=file] using microsoftwebdriver. From this thread, it seems this issue is reported as fixed by Microsoft Team, but its actually not fixed. Does anyone found any alternative on how to achieve this?

    You need to sign in to your Microsoft account to add a comment.

    Sign in