Chrome and AlertDialog()

20 posts, 0 answers
  1. Steve
    Steve avatar
    35 posts
    Member since:
    Jan 2011

    Posted 03 Feb 2014 Link to this post

    The following code works great on IE and FF:
    AlertDialog SearchResults200Dialog = new AlertDialog(AiiBrowser, DialogButton.OK);
     
    Manager.Current.DialogMonitor.AddDialog(SearchResults200Dialog);
     
    Manager.Current.DialogMonitor.Start();
     
    consentSearch.SearchClick();

    SearchClick() causes the web page to invoke a Window.Alert().

    The DialogMonitor never 'sees' the alert dialog if the browser is Chrome.  Is this thanks to our new best friend Chrome v32?
  2. Steve
    Steve avatar
    35 posts
    Member since:
    Jan 2011

    Posted 04 Feb 2014 in reply to Steve Link to this post

    Oh, and yes - I did try this with the 1327 Framework...
  3. Ivaylo
    Admin
    Ivaylo avatar
    750 posts

    Posted 07 Feb 2014 Link to this post

    Hello Steve,

    I am sorry you are experiencing this issue. I have tried handling the alert dialog with Chrome v32 but I was not able to reproduce the behavior described. Here is a sample video demonstrating how this is working on my end. Could you please try adding the following line to your code and see how this will work for you:

    SearchResults200Dialog.WaitUntilHandled(1500);

    If this is not working for you could you please provide me with a reliable repro using this URL so I can continue investigating?

    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
  4. Steve
    Steve avatar
    35 posts
    Member since:
    Jan 2011

    Posted 07 Feb 2014 in reply to Ivaylo Link to this post

    No love.  So, I made a video of me trying it against that URL you sent - have a look: 

    Chrome32 Fail

    Sorry it's so big - I have multiple monitors, and Jing doesn't handle that very well, it seems, but I'm not an expert at using Jing, wither...
  5. Steve
    Steve avatar
    35 posts
    Member since:
    Jan 2011

    Posted 07 Feb 2014 in reply to Steve Link to this post

    Also, if I change from .Click(true) to .Click(false) - I get a different exception - maybe this helps:

    ExecuteCommand failed!
    BrowserCommand (Type:'Information',Info:'IsReady',Action:'NotSet',Target:'null',Data:'',ClientId:'d4cd180c-d0b0-4b8b-a4d9-ca9d25205be3',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'0',InError:'False',Response:'')
    InnerException: System.TimeoutException: Timed out waiting for command to be handled
       at ArtOfTest.WebAii.Messaging.Process.BrowserHttpRemoted.ProcessBrowserRequest(BrowserCommand command, String requestId, Int32 timeout)
       at ArtOfTest.WebAii.Messaging.Process.BrowserHttpRemoted.ProcessBrowserRequest(BrowserCommand command, String requestId)
       at ArtOfTest.WebAii.Core.Browser.ExecuteCommandInternal(BrowserCommand request)
  6. Steve
    Steve avatar
    35 posts
    Member since:
    Jan 2011

    Posted 07 Feb 2014 in reply to Steve Link to this post

    Also - in that code I just put in that movie - I realize I did not have DialogMonitor.Start() in it, I added that, and am still having the same problem...
  7. Ivaylo
    Admin
    Ivaylo avatar
    750 posts

    Posted 12 Feb 2014 Link to this post

    Hello Steve,

    Please provide me the test you are willing to run against the public URL so I can take a better look and fix this for you.

    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
  8. Steve
    Steve avatar
    35 posts
    Member since:
    Jan 2011

    Posted 12 Feb 2014 in reply to Ivaylo Link to this post

    Change the BrowserType to IE and FF to see that it works.  This is not to say that our corporate proxy isn't kiling us on this, or somehow we've managed to get Chrome v32 in a bad state, but this code fails every time for me.  Set a breakpoint on the last line, handleCount should = 1.

    [TestMethod]
    public void sand()
    {
    Manager Manager = new ArtOfTest.WebAii.Core.Manager(false);

    Manager.Start();

    Manager.LaunchNewBrowser(BrowserType.Chrome);

    Browser Browser = Manager.ActiveBrowser;

    Browser.NavigateTo("http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_alert");

    System.Threading.Thread.Sleep(4000);

    Browser.RefreshDomTree();

    AlertDialog alert = new AlertDialog(Browser, DialogButton.OK);

    Manager.DialogMonitor.AddDialog(alert);

    Manager.DialogMonitor.Start();

    Browser.Frames.ById("iframeResult").Find.ByContent<HtmlButton>("Try It").Click(true);

    alert.WaitUntilHandled(1500);

    int handleCount = alert.HandleCount;

    Manager.Dispose();

    }
  9. Ivaylo
    Admin
    Ivaylo avatar
    750 posts

    Posted 17 Feb 2014 Link to this post

    Hello Steve,

    Please excuse me for the delayed reply. I have been able to reproduce the behavior you are experiencing and I logged a bug on your behalf which you can see and keep track using this public URL.

    Unfortunately no workaround can be provided at this point.

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

    Thank you for your understanding and cooperation.

    Regards,
    Ivaylo
    Telerik
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  10. Steve
    Steve avatar
    35 posts
    Member since:
    Jan 2011

    Posted 24 Mar 2014 in reply to Ivaylo Link to this post

    Looks like we've lost traction on this issue - I added my comments on the defect earlier this month - can you see where we are?  I'm doing no testing on Chrome at this point...
  11. Ivaylo
    Admin
    Ivaylo avatar
    750 posts

    Posted 27 Mar 2014 Link to this post

    Hello Steve,

    We are still trying to reproduce this behavior on a build machine, since we are able to reproduce this specifically on one machine which is not a build machine, which interferes with further investigation. We are trying to find the specifics of causing this. Since this is happening on only one machine on our side, all others are working fine we are positive this is an environment specific problem (the hardest to solve) could you please try to reproduce this behavior on a different machine in your network, are you getting the same 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
     
  12. Steve
    Steve avatar
    35 posts
    Member since:
    Jan 2011

    Posted 27 Mar 2014 in reply to Ivaylo Link to this post

    It fails on every machine I try it on,  I just created a project in VS 2010 on a Windows Server 2008 VM with the 1417 framework and Chrome 33.0.1750.154 m and it fails.  Please try it just inside visual studio - install a clean copy of VS 2012, install whatever testing framework you want to use, include a reference to the WebAii dll and run the code I posted - it fails on every machine we have here.
  13. Ivaylo
    Admin
    Ivaylo avatar
    750 posts

    Posted 01 Apr 2014 Link to this post

    Hello Steve,

    Using the code you have provided we are not able to reproduce this behavior any longer. Another way we can proceed here is if you create a sample project containing only one test that recreates the problem (simplified as much as possible) and attach it here. Using a complete project instead of using the provided code may behave differently.

    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
     
  14. Steve
    Steve avatar
    35 posts
    Member since:
    Jan 2011

    Posted 01 Apr 2014 in reply to Ivaylo Link to this post

    Here you go - I whipped this up in VS 2010.  You will have to update the reference to the WebAii dll.
  15. Ivaylo
    Admin
    Ivaylo avatar
    750 posts

    Posted 03 Apr 2014 Link to this post

    Hello Steve,

    Thank you for providing me with the project, I am forcing our development and putting a high priority on this issue in order to be resolved as soon as possible. As soon as I have any update I will update this ticket.

    Thank you for your understanding.

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

    Posted 07 Apr 2014 Link to this post

    Hello Steve,

    Thank you for your patience regarding this matter. 
    We had the chance to locate the problem causing your test to fail and it turned out it has pretty easy workaround. Just make sure you have the Dialog monitoring enabled by using this line:

    Manager.Settings.DisableDialogMonitoring = true;

    Here is a short video how this is working on my end.
    The complete code should look like this and it should work perfectly fine on your end as well:

    [TestMethod]
           public void TestMethod1()
           {
     
               Manager Manager = new ArtOfTest.WebAii.Core.Manager(false);
               Manager.Settings.DisableDialogMonitoring = true;
               Manager.Start();           
     
               Manager.LaunchNewBrowser(BrowserType.Chrome);
     
               Browser Browser = Manager.ActiveBrowser;
     
               Browser.NavigateTo("http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_alert");
     
               System.Threading.Thread.Sleep(4000);
     
               Browser.RefreshDomTree();
     
               AlertDialog alert = new AlertDialog(Browser, DialogButton.OK);
     
               Manager.DialogMonitor.AddDialog(alert);
               Manager.DialogMonitor.Start();
     
               Browser.Frames.ById("iframeResult").Find.ByContent<HtmlButton>("Try It").Click(true);
     
               alert.WaitUntilHandled(5000);
     
               int handleCount = alert.HandleCount;
     
               Manager.Dispose();


    We will be including the fix for this in the internal build that we are going to release later this week, so adding the additional line will not be necessary.

    Thank you for your understanding and patience regarding this matter.

    Regards,
    Ivaylo
    Telerik
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
  17. Steve
    Steve avatar
    35 posts
    Member since:
    Jan 2011

    Posted 17 Jul 2014 in reply to Ivaylo Link to this post

    Have you guys come up with a permanent fix for this issue yet?  In Chrome 35, this problem has reappeared in our app, and the workaround no longer works, although the workaround still works with the above code on the tryit page.  Works fine in our code on FF and IE still.  I'm using 2014.1.410.0 of the framework.
  18. Ivaylo
    Admin
    Ivaylo avatar
    750 posts

    Posted 22 Jul 2014 Link to this post

    Hello Steve,

    You can give it a try with the latest internal build we released, which contains some fixes for the latest Chrome version.

    Regards,
    Ivaylo
    Telerik
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
  19. Steve
    Steve avatar
    35 posts
    Member since:
    Jan 2011

    Posted 23 Jul 2014 in reply to Ivaylo Link to this post

    Works great - thanks.  Is there a way to be notified via email when Telerik relases an official framework?
  20. Ivaylo
    Admin
    Ivaylo avatar
    750 posts

    Posted 24 Jul 2014 Link to this post

    Hello Steve,

    I am glad to hear it is working fine on your end.

    Unfortunately there is no way to get notified when an official framework is released, but you can subscribe to the RSS feed of our blog and get updates.

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