开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜