Download Dialog Issue

16 posts, 0 answers
  1. Laxmi
    Laxmi avatar
    2 posts
    Member since:
    Aug 2010

    Posted 21 Mar 2011 Link to this post

    Hello!

    I am using the 2010.3.1307.0 version of the Web Ui Test Studio Developer Edition.
    I am having issues where the download Dialog is not being handled.
     On clicking the button, the download dialog should be handled( Cancel button ).
    But i get the following error

    ArtOfTest.Common.Design.Exceptions.ExecutionException: Timed out waiting '10000' msec. for dialog to be handled '1' ---> System.TimeoutException: Timed out waiting '10000' msec. for dialog to be handled '1'
       at ArtOfTest.WebAii.Win32.Dialogs.BaseDialog.WaitUntilHandled(Int32 handleCount, Int32 timeout, Boolean resetHandleCount)
       at ArtOfTest.WebAii.Win32.Dialogs.DownloadDialogsHandler.WaitUntilHandled(Int32 timeout)
       at ArtOfTest.WebAii.Design.IntrinsicTranslators.Descriptors.DownloadDialogHandlerDescriptor.Execute(Browser browser)
       at ArtOfTest.WebAii.Design.IntrinsicTranslators.Descriptors.DialogHandlerDescriptor.Execute(IAutomationHost browser)
       at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep()
       --- End of inner exception stack trace ---

    I have tried the following.
    -Waits ( 25000 to 50000 msecs ) befor handling the dialog.
    -Timeout for the dialog wait from (25000 to 50000 msecs)

    Any help would be highly appreciated since we have to handle such download dialogs throughout the application.

    Thanks,
    Laxmi.
  2. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 23 Mar 2011 Link to this post

    Hi Laxmi,
        when you run the test can you see the Dialog? Does it actually appear? My feeling is that the Dialog probably never appears - that's why it can't be handled. Please check!

    Regards,
    Stoich
    the Telerik team
  3. Laxmi
    Laxmi avatar
    2 posts
    Member since:
    Aug 2010

    Posted 23 Mar 2011 Link to this post

    Yes, you are correct ! When i run the test, i download dialog does not appear.
    What could be the reason?

    Thanks,
    Laxmi.
  4. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 25 Mar 2011 Link to this post

    Hi Laxmi,
         probably the action which brings up the Dialog is either missing from your test or isn't invoked correctly. Make sure the piece of code which executes the action to bring up the Dialog functions correctly.

    Let me know how it goes!

    Regards,
    Stoich
    the Telerik team
  5. Alex
    Alex avatar
    24 posts
    Member since:
    Aug 2010

    Posted 14 Jul 2011 Link to this post

    I'm having the exact same issue. Below are my attempts to get this to work.

     

     

     

    //Enter path to file location
    string fullPath = "C:\\Temp";
    //This code will only open the download dialog and click Cancel
    DownloadDialogsHandler handler = new DownloadDialogsHandler(Manager.ActiveBrowser, DialogButton.CANCEL, fullPath, Manager.Desktop);
    Pages.UMDealerBusiness_40.UserControl130DBIEXCELREPORTDOWNLOADBtnDownloadReportLink.MouseClick();
    The above will open the File Download dialog and it will just hang until it times out.

    I've also tried the code below

     

    string fullPath = "C:\\Temp";
    Pages.UMDealerBusiness_40.UserControl130DBIEXCELREPORTDOWNLOADBtnDownloadReportLink.Download(false, DownloadOption.Cancel, fullPath, 10000);

    The code above won't open the File Download dialog. The overall result is a success, but I don't believe the dialog is being called at all.

    I've also trying the built in dialog handlers in the development edition of WebAii, but they react the same way the first piece of code does.
  6. Alex
    Alex avatar
    24 posts
    Member since:
    Aug 2010

    Posted 14 Jul 2011 Link to this post

    I'm having the exact same issue. Below are my attempts to get this to work.

     

     

     

    //Enter path to file location
    string fullPath = "C:\\Temp";
    //This code will only open the download dialog and click Cancel
    DownloadDialogsHandler handler = new DownloadDialogsHandler(Manager.ActiveBrowser, DialogButton.CANCEL, fullPath, Manager.Desktop);
    Pages.UMDealerBusiness_40.UserControl130DBIEXCELREPORTDOWNLOADBtnDownloadReportLink.MouseClick();
    The above will open the File Download dialog and it will just hang until it times out.

    I've also tried the code below

     

    string fullPath = "C:\\Temp";
    Pages.UMDealerBusiness_40.UserControl130DBIEXCELREPORTDOWNLOADBtnDownloadReportLink.Download(false, DownloadOption.Cancel, fullPath, 10000);

    The code above won't open the File Download dialog. The overall result is a success, but I don't believe the dialog is being called at all.

    I've also trying the built in dialog handlers in the development edition of WebAii, but they react the same way the first piece of code does.
  7. Alex
    Alex avatar
    24 posts
    Member since:
    Aug 2010

    Posted 14 Jul 2011 Link to this post

    I'm having the exact same issue. Below are my attempts to get this to work. 

     

    //Enter path to file location
    string fullPath = "C:\\Temp";
    //This code will only open the download dialog and click Cancel
    DownloadDialogsHandler handler = new DownloadDialogsHandler(Manager.ActiveBrowser, DialogButton.CANCEL, fullPath, Manager.Desktop);
    Pages.UMDealerBusiness_40.UserControl130DBIEXCELREPORTDOWNLOADBtnDownloadReportLink.MouseClick();
    The above will open the File Download dialog and it will just hang until it times out.

    I've also tried the code below 
    string fullPath = "C:\\Temp";
    Pages.UMDealerBusiness_40.UserControl130DBIEXCELREPORTDOWNLOADBtnDownloadReportLink.Download(false, DownloadOption.Cancel, fullPath, 10000);

    The code above won't open the File Download dialog. The overall result is a success, but I don't believe the dialog is being called at all.

    I've also trying the built in dialog handlers in the development edition of WebAii, but they react the same way the first piece of code does.
  8. Alex
    Alex avatar
    24 posts
    Member since:
    Aug 2010

    Posted 14 Jul 2011 Link to this post

    I'm having the exact same issue. Below are my attempts to get this to work. 

     

    //Enter path to file location
    string fullPath = "C:\\Temp";
    //This code will only open the download dialog and click Cancel
    DownloadDialogsHandler handler = new DownloadDialogsHandler(Manager.ActiveBrowser, DialogButton.CANCEL, fullPath, Manager.Desktop);
    Pages.UMDealerBusiness_40.UserControl130DBIEXCELREPORTDOWNLOADBtnDownloadReportLink.MouseClick();
    The above will open the File Download dialog and it will just hang until it times out.

    I've also tried the code below 
    string fullPath = "C:\\Temp";
    Pages.UMDealerBusiness_40.UserControl130DBIEXCELREPORTDOWNLOADBtnDownloadReportLink.Download(false, DownloadOption.Cancel, fullPath, 10000);

    The code above won't open the File Download dialog. The overall result is a success, but I don't believe the dialog is being called at all.

    I've also trying the built in dialog handlers in the development edition of WebAii, but they react the same way the first piece of code does.
  9. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 19 Jul 2011 Link to this post

    Hello Alex,

    Your code looks fine, but try adding WaitUntilHandled(10000) method and check your security settings. In order to get it to work add the page to "Trusted Sites"(see screenshot), and make sure all possible security settings are set to allow downloads. Also when specifying the folder, use the full name and path "C:\\Temp\\excel.xls" for example.
    //Enter path to file location 
    string fullPath = "C:\\Temp\\excel.xls"
    //This code will only open the download dialog and click Cancel 
    DownloadDialogsHandler handler = new DownloadDialogsHandler(Manager.ActiveBrowser, DialogButton.CANCEL, fullPath, Manager.Desktop); 
    Pages.UMDealerBusiness_40.UserControl130DBIEXCELREPORTDOWNLOADBtnDownloadReportLink.MouseClick();
    handler.WaitUntilHandled(10000);
    Here is a working example:
    string fullPath = "C:\\Temp\\file.csv";
      
    DownloadDialogsHandler handler = new DownloadDialogsHandler(ActiveBrowser, DialogButton.SAVE, fullPath, Manager.Desktop);
    Pages.PowerSharesExchangeTraded.MainPageLeftMainPageContentExportHoldings1LinkButton1Link.Click(false); handler.WaitUntilHandled(10000);
    And here is the same thing using Find.ByExpression:
    string fullPath = "C:\\Temp\\pqs.csv";
      
    DownloadDialogsHandler handler = new DownloadDialogsHandler(ActiveBrowser, DialogButton.SAVE, fullPath, Manager.Desktop);
    HtmlAnchor a = Find.ByExpression<HtmlAnchor>("id=ctl00_MainPageLeft_MainPageContent_ExportHoldings1_LinkButton1","tagname=a");
    a.Click(false);
    handler.WaitUntilHandled(10000);
    Hope this help!

    Best wishes,
    Plamen
    the Telerik team
    Register today for a live 'What's New in Test Studio R1 2011 SP2' event on Tuesday, July 19 at 2pm EST!

    Have you looked at the new Online User Guide for Telerik Test Studio?
  10. Alex
    Alex avatar
    24 posts
    Member since:
    Aug 2010

    Posted 08 Sep 2011 Link to this post

    I've since been required to upgrade IE9 from IE8 and the issue seems to have gotten worse. I no longer can use any dialogs through the Telerik UI, or if I code it. The odd thing is if I run it through a testlist it works fine. Below is a couple attempts at trying code to get the telerik tool to handle dialogs. Implementing an IDialog is my next step, but I wanted to hear from you guys about any other suggestions.

    Both of the attempts simply wait at the dialog and don't handle the dialog. I checked the dialog class and it is part of the windows #32770 class, so I figured it should be handled with no issue. I'm not really sure where to go from here, I would like to continue using the telerik tool for this and not have to switch over to a testlist to run anything with dialogs.

    GenericDialog ConfirmationDialog =
    new GenericDialog(ActiveBrowser, "Message from webpage", false, 1);  // Click on the Yes button
    Manager.DialogMonitor.AddDialog(ConfirmationDialog);
    Manager.DialogMonitor.AddDialog(new Confirmation(ActiveBrowser, DialogButton.OK, Manager.Desktop));
    Manager.DialogMonitor.Start();
    ActiveBrowser.WaitUntilReady();
    Manager.DialogMonitor.Stop();

    The second code block uses a class which is very similar to the BaseDialog setup here.
  11. Cody
    Admin
    Cody avatar
    3354 posts

    Posted 08 Sep 2011 Link to this post

    Hello Alex,

    Which version of the Telerik Testing Framework do you have installed? We added support for IE9 in 2011.1.629,

    Greetings,
    Cody
    the Telerik team
    Vote for Telerik Test Studio at the Annual Automation Honors Voting!
  12. Alex
    Alex avatar
    24 posts
    Member since:
    Aug 2010

    Posted 14 Sep 2011 Link to this post

    Hi Cody,

    I have the Developer Edition and looking at the update area it shows I have the latest build (2010.3 1421). Is this different from what you are suggesting?

    Thank you
  13. Cody
    Admin
    Cody avatar
    3354 posts

    Posted 14 Sep 2011 Link to this post

    Hello Alex,

    Yes what I'm referring to is very different and much newer then 2010.3 1421. That version was released last year and is known to not work with IE9. Version 2011.1.629 was released in June of 2011.

    Looking at your account I see a download for a trial of WebUI Dev Edition last year, but no purchases and no licensed users. Where did you get your license from? Is there a different account owner I can look up? Until I can see this information I cannot confirm that you are eligible for an upgrade.

    Regards,
    Cody
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  14. Alex
    Alex avatar
    24 posts
    Member since:
    Aug 2010

    Posted 14 Sep 2011 Link to this post

    Hi Cody,

    Our Information Systems group holds all of the licenses. When they sign in they see we are up to date. Would it be possible to send or direct me to where I can find instructions on how to update to the 2011.1.629 version?

    Thank you
  15. Alex
    Alex avatar
    24 posts
    Member since:
    Aug 2010

    Posted 14 Sep 2011 Link to this post

    Hi Cody,

    I have some more information, the IS group from my company has been working with Jennifer Valenti on this upgrade also. She confirmed that the latest developer edition is at 2010.3.1421, which is fine assuming the R2 release is due out end of Sept.

    I would like to confirm that the R2 release for the dev edition is slated for the end of this month. Can you confirm?
  16. Jennifer Valenti
    Admin
    Jennifer Valenti avatar
    1 posts

    Posted 15 Sep 2011 Link to this post

    Hi Alex,

     I am more than happy to help with your inquiries.  Please contact me directly at: jennifer.valenti@telerik.com.  

    All the best,
    Jennifer Valenti
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top