public HtmlSpan Link{ get { return Get<HtmlSpan>("TextContent=" + _link,"tagname=span"); }}public class ExpressionDefinitions{ private HtmlFindExpression _link; public ExpressionDefinitions(string link) { string textcontent = "TextContent=" + link; _link = new HtmlFindExpression(textcontent, "tagname=span"); } public HtmlFindExpression Link { get { return _link; } } public HtmlFindExpression LogOff = new HtmlFindExpression("tagname=button", "TextContent=Log Off");}Hi,
everybody
I am having a problem while handling IE8 download_complete window.The code I am using is below--
private bool DownloadExportedFile(string diskpath, FrameworkElement downloadButton)
{
//download dialog handler
DownloadDialogsHandler downloadHandler = new DownloadDialogsHandler(Manager.Current.ActiveBrowser, DialogButton.SAVE, diskpath, Manager.Current.Desktop);
Manager.Current.DialogMonitor.Start();
//trigger download event
downloadButton.User.Click();
//invoke handler
downloadHandler.WaitUntilHandled(80000);
}
The code works fine for a particular file(.xlsx format,size 10.7 KB ) but when i use the same code for a different file(.zip format,size 342 bytes) it works as excepted for the initial download dialog and then for resulting save as dialog but it does not handle the resulting download complete dialog as it does not click on its close button. As a result this window remains open.I am on windows 7 with ie 8.
var _fileUploadDlg = new FileUploadDialog(WebAii.Manager.ActiveBrowser, "fileName", DialogButton.OPEN, "Open"); WebAii.Manager.DialogMonitor.AddDialog(_fileUploadDlg); WebAii.Manager.DialogMonitor.Start(); // click on some element to open dialog _fileUploadDlg.WaitUntilHandled(30000); WebAii.Manager.DialogMonitor.Stop(); WebAii.Manager.DialogMonitor.RemoveDialog(_fileUploadDlg);With new 2011.2.1413.0 version the Open file dialog is appeared but the file is not selected. I have the error:
Message System.TimeoutException : Timed out waiting '30000' msec. for any dialog to be handled '1' Stack Trace at ArtOfTest.WebAii.Win32.Dialogs.BaseDialog.WaitUntilAnyHandled(IEnumerable`1 dialogs, Int32 handleCount, Int64 timeoutMilliseconds, Boolean resetHandleCount) at ArtOfTest.WebAii.Win32.Dialogs.BaseDialog.WaitUntilHandled(Int32 handleCount, Int32 timeout, Boolean resetHandleCount) at ArtOfTest.WebAii.Win32.Dialogs.BaseDialog.WaitUntilHandled(Int32 timeout) ... Was the dialog handling approach changed? May be it is somehow related to the reported defect concerning ConfirmDialog and AlertDialog http://www.telerik.com/support/pits.aspx#/public/test-studio/9855 ?
Look forward to your advice.
Thanks.
public void Upload(string filePath) { //((HtmlInputFile) TelerikHtmlWrapper).Upload(filePath, GlobalConst.FileUploadDialogTimeout); Manager manager = CoreManager.GetCurrentManagerObj(); FileUploadDialog fDialog = new FileUploadDialog(TelerikHtmlWrapper.OwnerBrowser, filePath, DialogButton.OPEN); manager.DialogMonitor.Start(); manager.DialogMonitor.AddDialog(fDialog); TelerikHtmlWrapper.Click(); fDialog.WaitUntilHandled(); manager.DialogMonitor.Stop(); }