【问题标题】:upload control did not working on Selenium microsoft edge driver上传控制不适用于 Selenium microsoft edge 驱动程序
【发布时间】:2017-09-30 14:44:36
【问题描述】:

我使用 Selenium 3.0,并从 https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/ 版本 14393 下载了 IE Edge 驱动程序以匹配我的 windows 10 版本

这是我的控件

我的下拉列表控件可以正常工作,但上传控件的文本框中从来没有文件,并且“上传”按钮也不能正常工作。

EdgeDriver driver = new EdgeDriver();
driver.Url = "http://www.test.com";
IWebElement ddl = driver.FindElement(By.Id("ddlDocumentType"));
SelectElement select = new SelectElement(ddl);
select.SelectByIndex(2);
IWebElement fileUpload = driver.FindElement(By.Id("fileUploadControl"));
//Approach 1: SendKeys
string key = @"c:\test.pdf";
fileUpload.SendKeys(key);
Thread.Sleep(1000);
IWebElement btn = driver.FindElement(By.Id("btnSubmit"));
btn.Click();
Thread.Sleep(1000);
driver.Quit();

有人知道我在 Selenium IE Edge 文件上传自动测试中缺少什么吗?

【问题讨论】:

    标签: selenium internet-explorer microsoft-edge


    【解决方案1】:

    您的问题与Edge Upload File control using Selenium相同。

    答案是according to jhoward,很遗憾这是known issue

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-04-11
      • 2017-04-07
      • 2017-01-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多