[Dialog(DialogButton.OK)] always click cancel

6 posts, 0 answers
  1. Kumar
    Kumar avatar
    12 posts
    Member since:
    Sep 2010

    Posted 20 Dec 2010 Link to this post

    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








  2. Keaegan
    Admin
    Keaegan avatar
    126 posts

    Posted 20 Dec 2010 Link to this post

    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
  3. Kumar
    Kumar avatar
    12 posts
    Member since:
    Sep 2010

    Posted 21 Dec 2010 Link to this post

    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
  4. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 21 Dec 2010 Link to this post

    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
  5. Kumar
    Kumar avatar
    12 posts
    Member since:
    Sep 2010

    Posted 21 Dec 2010 Link to this post

    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
  6. Cody
    Admin
    Cody avatar
    3354 posts

    Posted 21 Dec 2010 Link to this post

    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
Back to Top