我想使用Watin下载PDF文件,但我无法下载文件。我写了下面的代码,但它不起作用。 Actual scenario is atteched with image file。 请点击链接。Watin-如何下载pdf文件与IE浏览器弹出
IE ie = IE.AttachToIE(Find.ByUrl(“Url here ...”)); - 它给出错误。
FileDownloadHandler handler = new FileDownloadHandler(fullFileName);
using (new UseDialogOnce(ie.DialogWatcher, handler))
{
lnkDoc.Click();
try
{
handler.WaitUntilFileDownloadDialogIsHandled(30);
handler.WaitUntilDownloadCompleted(100);
}
catch
{
}
}
你会得到什么错误? – 2011-04-05 06:22:06