3
如何在Chrome .NET中使用Selenium WebDriver上传文件。selenium webdriver .net chrome上传文件
版本Chrome(20.0.1132.57)。版本chromedriver 22.0.1203.0b
代码:
driver.GetElement(someXpath).SendKeys(filePath)
抛出异常:
Element is not clickable at point (144, 90.5). Other element would receive the click: <h2>...</h2>
HTML代码:
<a class="button addfile"> Upload <input class="fileupload" type="file" multiple="" name="files[]"/> </a>
预先在任何时间点不可点击的元素是否被禁用?如果是这样的话,你可能需要在SendKeys()之前添加一个等待命令() – 2012-07-12 10:14:39
这个元素在这个时候启用并且在页面上可见 – 2012-07-12 10:20:22
在FireFox中这段代码正常工作,但我需要在Chrome中运行我的测试 – 2012-07-12 10:31:52