[InCisif.net.Library.Test(@" Test the download of a file based on http://west-wind.com/weblog/posts/76293.aspx", 1,TestPriority.High) ] public void DownloadFileUnitTest(){ using ( InCisif.net.Library.Test t = new InCisif.net.Library.Test(Language.CSharp, this) ) { Page.URL = @"http://localhost/InCisif.UnitTest/asp.net/MainDownLoadFile.htm"; Page.WaitForPage(@"/MainDownLoadFile.htm"); string FileName = System.Environment.GetEnvironmentVariable("TEMP") + @"\MyImageUnitTest.jpg"; Page.ToolBox.DeleteFile(FileName); // Make sure the file does not exist Page.Control("DownLoadFile").Click(); Page.FileDownloadDialog.Save(); Page.SaveAsDialog.Submit(FileName); Page.WaitForFile(FileName); Page.DownloadCompleteDialog.Close(); t.ASSERT( System.IO.File.Exists(FileName) , string.Format("Verify file '{0}' has been created", FileName)); t.Passed = true; } }