This is a migrated thread and some comments may be shown as answers.

Handle Alert message Box/ Not recognized by Hovering

3 Answers 138 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
N1t1nA
Top achievements
Rank 1
N1t1nA asked on 10 May 2011, 01:01 PM
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

3 Answers, 1 is accepted

Sort by
0
Anthony
Telerik team
answered on 11 May 2011, 06:20 PM
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!
0
N1t1nA
Top achievements
Rank 1
answered on 12 May 2011, 05:18 AM
Hi Anthony

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


0
Accepted
Anthony
Telerik team
answered on 12 May 2011, 04:24 PM
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!
Tags
General Discussions
Asked by
N1t1nA
Top achievements
Rank 1
Answers by
Anthony
Telerik team
N1t1nA
Top achievements
Rank 1
Share this question
or