我将我的 WebDriver 与 FireFox 一起使用。
我有一个 elemnt://input[@class="uploadFiles"],当我点击它时: driver.findElement(By.xpath("//input[@class="uploadFiles"]")),打开上传文件的窗口(Windows操作系统的窗口),但测试没有继续到下一行,并卡住。
有什么帮助吗?
最佳答案
Webdriver 不与操作系统级别的对话框交互,这就是它不继续下一行的原因。这里有一些东西可以帮助你:http://code.google.com/p/selenium/wiki/FrequentlyAskedQuestions#Q:_Does_WebDriver_support_file_uploads ?
关于firefox - WebDriver/打开上传文件窗口时卡住,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14688123/