No handling of chrome popup dialogs

2 posts, 0 answers
  1. Joseph
    Joseph avatar
    1 posts
    Member since:
    Mar 2018

    Posted 07 Mar Link to this post

    I'm trying to use the Manager's DialogMonitor class to handle dialogues triggered by javascript over the course of testing.

    I've tried running this before tests start:

    Confirm = new ConfirmDialog(browser, DialogButton.OK);
    manager.DialogMonitor.AddDialog(Confirm);
     
    OnBeforeUnload = new OnBeforeUnloadDialog(browser, DialogButton.OK);
    manager.DialogMonitor.AddDialog(OnBeforeUnload);
     
    Alert = new AlertDialog(browser, DialogButton.OK);
    manager.DialogMonitor.AddDialog(Alert);
     
    manager.DialogMonitor.Start();

     

    However, it appears that the monitor doesn't even register that dialogues are appearing when testing in Chrome.

    I've also tried this:

    Confirm = new ConfirmDialog(browser, DialogButton.OK);
    Confirm.HandlerDelegate =
        dialog => {
            manager.Desktop.KeyBoard.KeyPress(Keys.Enter);
        };
    manager.DialogMonitor.AddDialog(Confirm);
     
    OnBeforeUnload = new OnBeforeUnloadDialog(browser, DialogButton.OK);
    OnBeforeUnload.HandlerDelegate = Confirm.HandlerDelegate;
    manager.DialogMonitor.AddDialog(OnBeforeUnload);
     
    Alert = new AlertDialog(browser, DialogButton.OK);
    Alert.HandlerDelegate = Confirm.HandlerDelegate;
    manager.DialogMonitor.AddDialog(Alert);
     
    manager.DialogMonitor.Start();

     

    The delegate is never called, no matter what type of dialog is triggered or when it happens.

    Is there some setting I don't know about to allow handling Chrome dialogues, or does the framework as it is now just not support Chrome?

  2. Nikolay Petrov
    Admin
    Nikolay Petrov avatar
    308 posts

    Posted 08 Mar Link to this post

    Hi Joseph,

    When using latest Chrome version (64.0) for automation please, note that it is necessary to have installed latest product version (2018.1.130).
    Test Studio Chrome extension has to be the latest available in the web store (2017.3.103) as well. 
    Once you don't have problems using other browsers - try to update the product version and Chrome extension.

    I hope this will resolve the problem.

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