DownloadDialogsHandler broken in Firefox 29.0

3 posts, 0 answers
  1. Luca
    Luca avatar
    1 posts
    Member since:
    Mar 2011

    Posted 29 Apr 2014 Link to this post

    Run this piece of code: 

    [TestFixture]
      public class TelerikTestingFrameworkTests
      {
          [Test]
          public void DownloadAFile()
          {
              var mySettings = new Settings
              {
                  Web =
                  {
                      DefaultBrowser = BrowserType.FireFox
                  },
                  ExecutionDelay = 1,
                  UnexpectedDialogAction = UnexpectedDialogAction.DoNotHandle
              };
     
              var manager = new Manager(mySettings);
              manager.Start();
              manager.LaunchNewBrowser();
              manager.DialogMonitor.Start();
     
              var browser = manager.ActiveBrowser;
     
              string urlForDownload = @"http://notepad-plus-plus.org/download/v6.5.5.html";
              browser.NavigateTo(urlForDownload);
               
              HtmlAnchor a = browser.Find.ByExpression<HtmlAnchor>("TextContent=Notepad++ Installer""tagname=a");
               
              string saveLocation = System.IO.Path.Combine(@"c:\", "notepadSetup.exe");
              File.Delete(saveLocation);
     
              DownloadDialogsHandler handler = new DownloadDialogsHandler(browser, DialogButton.SAVE, saveLocation, browser.Desktop);
              a.Click();
       
              handler.WaitUntilHandled(20000);
              //System.Threading.Thread.Sleep(10000);
               
              File.Exists(saveLocation).Should().BeTrue();
     
              manager.Dispose();
              File.Delete(saveLocation);
     
          }
      }

    The result is:
    System.TimeoutException : Timed out waiting '20000' msec. for any dialog to be handled '1'

    The file is downloaded, but WaitUntilHandled fails everytime.
    If I try to remove call to WaitUntilHandled and call Sleep(20000), all goes fine. 
     
    I configured Firefox as described in http://docs.telerik.com/teststudio/user-guide/configure-your-browser/firefox.aspx
    but  in Firefox 29 was removed the "Show the Downloads window.. " setting.

    What is wrong in my code?









  2. Ivaylo
    Admin
    Ivaylo avatar
    750 posts

    Posted 01 May 2014 Link to this post

    Hello Luca,

    I am sorry to hear you are experiencing this behavior. However using the latest version of Test Studio and Firefox 29 I was not able to reproduce this behavior. Could you please try upgrading and see if you are still able to reproduce the behavior.

    Looking forward to hearing from you.

    Regards,
    Ivaylo
    Telerik
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
  3. Ivaylo
    Admin
    Ivaylo avatar
    750 posts

    Posted 01 May 2014 Link to this post

    Hello Luca,

    We were able to reproduce this behavior and logged a bug on your behalf which you can see using this public URL.
    Until this is fixed please use the workaround that you have already found out with the Thread.Sleep.

    Thank you for your understanding.

    I have updated your telerik points accordingly for reporting this issue.

    Regards,
    Ivaylo
    Telerik
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
Back to Top