Watin-How to download pdf file atteched with IE popup
I am trying to download PDF file using Watin but I can't downl开发者_如何学Gooad file. I have wrote following code but it doesn't work. Actual scenario is atteched with image file. please click on link.
IE ie = IE.AttachToIE(Find.ByUrl("Url here..."));--Its give error.
FileDownloadHandler handler = new FileDownloadHandler(fullFileName);
using (new UseDialogOnce(ie.DialogWatcher, handler))
{
lnkDoc.Click();
try
{
handler.WaitUntilFileDownloadDialogIsHandled(30);
handler.WaitUntilDownloadCompleted(100);
}
catch
{
}
}
This new window you try to attach to is showing a PDF. WatiN can't attach to these kind of windows.
精彩评论