单击下载按钮后,将下载文件.在执行下一个代码之前,需要等到下载完成.我的代码看起来像这样:
Thread.sleep(2000);
driver.findElement(By.xpath("//*[@id='perform']")).click();//click for download
Thread.sleep(20000);
//code to be executed after download completes
Readfile fileobj=new Readfile();
String checkfile=fileobj.checkfilename();
Run Code Online (Sandbox Code Playgroud)
如何使webdriver等到下载完成?
是否可以使用 selenium webdriver 对网页中显示的内容进行拼写检查。或者您可以建议任何相同的 API 吗?问候,埃利亚斯