【发布时间】:2018-10-11 04:44:13
【问题描述】:
这是结构:
<input _ngcontent-c9="" class="form-field" placeholder="Upload Emote" readonly="" type="text">
我已使用以下代码上传文件,但 sendkeys 无法正常工作,我没有收到任何错误但无法上传。
WebElement uploadingEmote = adminDriver.findElement(By.xpath("//input[@placeholder='Upload Emote']"));
uploadingEmote.sendKeys("/home/smart/Downloads/EMO/(Heart).png");
但上面的代码不起作用,因为该字段是只读的。 任何帮助将不胜感激。
【问题讨论】:
-
代码不工作到底是什么意思?你看到任何错误吗?更新问题
标签: java html angularjs selenium file-upload