Handle Alert message Box/ Not recognized by Hovering

4 posts, 1 answers
  1. N1t1nA
    N1t1nA avatar
    37 posts
    Member since:
    Mar 2011

    Posted 10 May 2011 Link to this post

    How to Handle Alert message, having OK and Cancel Buttons
    These are Not Recognized by hovering the Highlighter, I want to Press 'OK' button.
    See attached image.(It seems to be a JavaScript Alert/Popup)

    Thanks
  2. Anthony
    Admin
    Anthony avatar
    19 posts

    Posted 11 May 2011 Link to this post

    Hello Nitin,

    To handle dialogs you often need to add a step manually. Please see this link for a screen shot of where to find these dialogs in the toolbar and a brief description of each.

    Your screen shot appears to be a Confirm dialog and not an Alert. Add a Confirm dialog and set the ConfirmButton to "OK."

    Regards,
    Anthony
    the Telerik team
    Do you think you know all the new features coming out in Test Studio R1 2011? Think again - we have some surprises and will share them with you in the What's New in Test Studio R1 2011 Webinar on May 12th.
    Register Today!
  3. N1t1nA
    N1t1nA avatar
    37 posts
    Member since:
    Mar 2011

    Posted 12 May 2011 Link to this post

    Hi Anthony

    Thanks for the info, Could you please provide the Coded Step for Handling Confirm Dialog.


  4. Answer
    Anthony
    Admin
    Anthony avatar
    19 posts

    Posted 12 May 2011 Link to this post

    Hello Nitin,

    Here is how to handle a Confirm Dialog in code:

    //Start the DialogMonitor - this is only needed for pure coded tests. Test Studio will automatically start it during its initialization.
    Manager.DialogMonitor.Start();

    // Handle Confirm dialog. 
    ConfirmDialog confirmDialog = new ConfirmDialog(ActiveBrowser, DialogButton.OK); 
      
    Manager.DialogMonitor.AddDialog(confirmDialog);
    confirmDialog.WaitUntilHandled(5000);

    Please see here for more information on this topic.

    Regards,
    Anthony
    the Telerik team
    Do you think you know all the new features coming out in Test Studio R1 2011? Think again - we have some surprises and will share them with you in the What's New in Test Studio R1 2011 Webinar on May 12th.
    Register Today!
Back to Top
  Cast Your Vote at DevPro Connections! Cast Your Vote at  Win IT Pro Connections!