How to click a button in Silverlight notification popup

4 posts, 0 answers
  1. Dumitru
    Dumitru avatar
    4 posts
    Member since:
    Mar 2011

    Posted 24 Jul 2012 Link to this post


    Hello to everyone!. 
    How to click Yes button in this popup? Where can I find this popup? Manager.Browsers.Count returns 1. Also I tried with no luck to search it in ActiveBrowser.Window.AllChildren collection. 
  2. Anthony
    Admin
    Anthony avatar
    19 posts

    Posted 27 Jul 2012 Link to this post

    Hello Dumitru,

    That actually looks like a Generic Dialog and not a popup window. Of course you can always handle it by using Blind Key Presses as well.

    Kind regards,
    Anthony
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  3. Dumitru
    Dumitru avatar
    4 posts
    Member since:
    Mar 2011

    Posted 03 Aug 2012 Link to this post

    I use this code
    GenericDialog storageDialog = new GenericDialog(ActiveBrowser, string.Empty, true, "Yes", string.Empty);  // Click on the Yes button
    Manager.DialogMonitor.AddDialog(storageDialog);
    storageDialog.WaitUntilHandled(3000);
    The dialog closes, but looks it presses wrong button, because storage remains the same and doesn't increase. Do you have any ideas why this happens?
  4. Cody
    Admin
    Cody avatar
    3354 posts

    Posted 08 Aug 2012 Link to this post

    Hi Dumitru,

    I apologize for the delay getting back to you on this.

    We're wondering if the cause of the error message really should be managed by correct testing environment configuration to begin with. In other words avoid getting this dialog in the first place by setting up your test machine as needed before running Test Studio tests. Then you won't need to handle the dialog during the test.

    Since we don't know how to create this dialog, we're not able to guarantee you a solution. Our best guess is this:
    new GenericDialog(ActiveBrowser, “Microsoft Silverlight”, “Yes”, false)

    Let us know if this works or not.

    All the best,
    Cody
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
Back to Top