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

[Dialog(DialogButton.OK)] always click cancel

5 Answers 114 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Kumar
Top achievements
Rank 1
Kumar asked on 20 Dec 2010, 07:59 AM
Hi,
I am using  [Dialog(DialogButton.OK)] in my test method.
using DialogButton.OK i want to click 'OK' in  JavaScript confirm dialog but it always click cancel in JavaScript confirm dialog.When i use 
Manager.DialogMonitor.AddDialog(new AlertDialog(ActiveBrowser, DialogButton.OK));
Manager.DialogMonitor.Start();

it is working fine.Is there any bug in DialogButton.OK

Thanks,
Kumar








5 Answers, 1 is accepted

Sort by
0
Keaegan
Telerik team
answered on 20 Dec 2010, 06:49 PM

Hello Kumar,

We are not aware of a bug within DialogButton.OK. Please change the following setting:

  1. Open your project/solution within Visual Studio
  2. In the Solution Explorer, locate your test settings file (local.testsettings in 2010)
  3. Double-click the test settings to bring up the properties
  4. Click WebAii Test on the left column
  5. Click the Execution tab
  6. The bottom item on this tab is titled Unexpected Dialog Handling, change this to Handle and Continue

After you have made this change, please re-test the issue. We will look for your reply.

Greetings,
Keaegan
the Telerik team

Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
0
Kumar
Top achievements
Rank 1
answered on 21 Dec 2010, 07:11 AM
Hi Keaegan

Thanks for your reply.When i opened my local test settings 'WebAii Test' was not available in the left column,can you please tell me how can i add  'WebAii Test'  in my local setting.

Thanks,
Kumar
0
Stoich
Telerik team
answered on 21 Dec 2010, 01:45 PM
Hello Kumar,

You should create a new Test Project. From there it's easy: Here's a Jing video demonstrating how you can change the Dialog Handling settings as described by Keaegan.

I hope this helps!

Best wishes,
Stoich
the Telerik team
Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
0
Kumar
Top achievements
Rank 1
answered on 21 Dec 2010, 02:14 PM
Hi,

thanks for your reply but my problem is that i am not able to see 'WebAii Test'  in my local setting.How can i include 'WebAii Test'  in my local setting?
Thanks,
Kumar
0
Cody
Telerik team
answered on 21 Dec 2010, 11:43 PM
Hello Kumar,

I apologize for the confusion. The WebAii framework product does not include a WebAii Test tab in the local test settings. I apologize my colleagues gave you bad information.

What is most likely happening is that our Unexpected Dialog handler feature is getting in your way. It is set to "Handle and fail test" by default.

To override this you can add the following code (or something very similar) to the beginning of your test:

Manager.Settings.UnexpectedDialogAction = UnexpectedDialogAction.DoNotHandle;


Hope that helps,
Cody
the Telerik team
Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
Tags
General Discussions
Asked by
Kumar
Top achievements
Rank 1
Answers by
Keaegan
Telerik team
Kumar
Top achievements
Rank 1
Stoich
Telerik team
Cody
Telerik team
Share this question
or