Chrome unable to Handle 'Alert' Dialog

15 posts, 0 answers
  1. Andrew
    Andrew avatar
    5 posts
    Member since:
    Apr 2017

    Posted 15 May 2017 Link to this post

    I am doing a simple handle of a alert dialog after a save button is being pressed and the alert is being handled correctly in IE and Firefox but when I run the same test in Chrome the OK is never clicked and the handle is never resolved.  I am also unable to record anything in Chrome due to the recorder to not start so the test was recorded in Firefox but I think it is probably different issue. 
  2. Nikolay Petrov
    Admin
    Nikolay Petrov avatar
    308 posts

    Posted 17 May 2017 Link to this post

    Hi Andrew,

    Please provide further details on this case:

     - Which version of the Chrome and Telerik browser extensions do you work with?
     - Provide a scrrenshot of the handle step options, please. 

    I attached a possible options configuration on the handle alert dialog step that works fine with Chrome on our side. Try to implement them to check if it works in your case as well.

    Best Regards,
    Nikolay Petrov
    Telerik by Progress
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  3. Andrew
    Andrew avatar
    5 posts
    Member since:
    Apr 2017

    Posted 17 May 2017 in reply to Nikolay Petrov Link to this post

    I did a new install of chrome yesterday it is Version 58.0.3029.110 (64-bit)

    test studio is version 2017.1.207.0

    and I attached the handle step options

    I re downloaded the extensions this morning but they are

    Telerik test studio chrome explore 2014.1.410.2

    Telerik test studio chrome playback 2016.3.1027.1

    Telerik test studio chrome recorder 2014.2.618.5

  4. Andrew
    Andrew avatar
    5 posts
    Member since:
    Apr 2017

    Posted 17 May 2017 in reply to Nikolay Petrov Link to this post

    forgot the screenshot in last reply here it is
  5. Andrew
    Andrew avatar
    5 posts
    Member since:
    Apr 2017

    Posted 17 May 2017 in reply to Nikolay Petrov Link to this post

    the site is not letting me post my files but I have it set up the same way you do and its not working
  6. Nikolay Petrov
    Admin
    Nikolay Petrov avatar
    308 posts

    Posted 19 May 2017 Link to this post

    Hi Andrew,

    Thank you for the additional information provided.

    The problem here seems to be in very old Chrome Recording extension. If update to the latest internal build version (2017.1.328) as pointed out on the attached screenshot it should update the extensions as well.

    I hope this would solve the problem.

    Kind Regards,
    Nikolay Petrov
    Telerik by Progress
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  7. Andrew
    Andrew avatar
    5 posts
    Member since:
    Apr 2017

    Posted 25 May 2017 in reply to Nikolay Petrov Link to this post

    I did the upgrade but Chrome is still not handling the alert boxes
  8. Nikolay Petrov
    Admin
    Nikolay Petrov avatar
    308 posts

    Posted 30 May 2017 Link to this post

    Hello Andrew,

    We have a new product release available. It should update the Chrome extensions automatically. Try to update or install fresh and let us know if this solves the problem, please.

    Best Regards,
    Nikolay Petrov
    Progress Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  9. Matthias
    Matthias avatar
    16 posts
    Member since:
    Jan 2017

    Posted 31 May 2017 Link to this post

    Same problem. No real solution?
  10. Andrew
    Andrew avatar
    5 posts
    Member since:
    Apr 2017

    Posted 31 May 2017 Link to this post

    it looks like it is working now but I need to re-record some of my tests in Chrome in order to get them to work.
  11. Nikolay Petrov
    Admin
    Nikolay Petrov avatar
    308 posts

    Posted 05 Jun 2017 Link to this post

    Hi Andrew,

    Please make sure that you use latest product release 2017.2.530 with the latest extensions available for Chrome. See the attached screenshot.

    Kind Regards,
    Nikolay Petrov
    Progress Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  12. Austin
    Austin avatar
    17 posts
    Member since:
    Sep 2015

    Posted 26 Oct 2018 Link to this post

    I need coded step for handling alert box.

    Following code doesn't work for me-

    AlertDialog altDlg = new AlertDialog(ActiveBrowser,DialogButton.OK);
    Manager.DialogMonitor.AddDialog(altDlg);

    I need code only, as its a lot of if-else condition there, so In build dialog handler will now work.

     

  13. Elena
    Admin
    Elena avatar
    1102 posts

    Posted 31 Oct 2018 Link to this post

    Hi Austin,

    The dialog from the screenshot looks like a Confirm dialog and probably this is the reason for the failures you encountered when using Alert dialog handler. This said, can you try the following code as it should be the same as yours, but using a Confirm dialog:

    // Add a confirm dialog to monitor
    ConfirmDialog altDlg = new ConfirmDialog(ActiveBrowser , DialogButton.OK);
    Manager.DialogMonitor.AddDialog(altDlg);
     
    // Given that there were not dialog attribute set, the manager will not start the monitoring.
    // You need to invoke the monitoring
    Manager.DialogMonitor.Start();
     
    // Then invoke the action that triggers the dialog

    Additionally, please note that, you need to explicitly start the dialogMonitor and trigger the dialog appearance after the dialog is added. In other words - the consequence of the actions in the code above need to be explicitly followed. 

    I hope this works for you. In case you need further assistance, please let me know. 

    Regards,
    Elena Tsvetkova
    Progress Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  14. Austin
    Austin avatar
    17 posts
    Member since:
    Sep 2015

    Posted 03 Dec 2018 in reply to Elena Link to this post

    With this code I am facing issue:

    1.  The type or namespace name 'ConfirmDialog' could not be found (are you missing a using directive or an assembly reference?)

    2. The name 'DialogButton' does not exist in the current context

  15. Elena
    Admin
    Elena avatar
    1102 posts

    Posted 06 Dec 2018 Link to this post

    Hello Austin,

    Can you please double check if you have included the following using statement at the beginning of the coded step:

    using ArtOfTest.WebAii.Win32.Dialogs;

    If not, please add this and then compile the project again. Will this work this time? 

    In the case you still face any troubles, please prepare a sample test with this code, which reproduces the issue and send it zipped via this thread. Thanks in advance. 

    Regards,
    Elena Tsvetkova
    Progress Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
Back to Top