点击下载文件的保存或另存为对话框 [英] Click on Save or SaveAs dialog of file download
问题描述
我见过几个问题张贴在这个主题,但没有解决方案的工作,这就是为什么我再次发布它。
我使用华廷自动化测试我的网站。使用IE 11.我必须下载并保存文件,但我不能够点击下载窗口的保存或另存为按钮。我试着FileDownloadHandler华廷,但它并没有奏效。
我不局限于华廷唯一的解决办法。它可以是任何东西,我可以在我的C#代码中使用是可以接受的。
FileDownloadHandler fileDownloadHandler =新FileDownloadHandler();
browser.AddDialogHandler(fileDownloadHandler);
browser.Image(Find.ByAlt(Download.Csv))祖先(一)ClickNoWait()。;
fileDownloadHandler.WaitUntilFileDownloadDialogIsHandled(40);
fileDownloadHandler.WaitUntilDownloadCompleted(200);
我使用IE 11,并能够下载和关闭对话框
I have seen couple of question posted on this topic but none of the solution worked that's why I am posting it again.
I am using WatIn to automate the testing of my website. Using IE 11. I have to download and save the file, but I am not able to click the save or saveas button of the download window. I tried FileDownloadHandler of WatIn but it didn't worked. I am not limited to WatIn only solutions. It could be anything thing which I can use in my C# code will be acceptable
FileDownloadHandler fileDownloadHandler = new FileDownloadHandler();
browser.AddDialogHandler(fileDownloadHandler);
browser.Image(Find.ByAlt("Download.Csv")).Ancestor("a").ClickNoWait();
fileDownloadHandler.WaitUntilFileDownloadDialogIsHandled(40);
fileDownloadHandler.WaitUntilDownloadCompleted(200);
I am using IE 11 and was able to download and close the dialog box
Automate of file download in IE 11 using c#
这篇关于点击下载文件的保存或另存为对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!