<input type="button" class="button white-button custom-modal-button" id="btnAttachment" ng-click="openAttachment()" value="Import CSV template">
enter code here
WebElement browse =driver.findElement(By.xpath("//*[@id=\"btnAttachment\"]"));
//pass the path of the file to be uploaded using Sendkeys method
browse.sendKeys("\\Users\\nilaapps13\\Desktop\\lead.csv");
使用 sendkeys 功能时,它会打开上传窗口,但不会选择文件。还有其他方法吗?
莫回无
眼眸繁星
明月笑刀无情
相关分类