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

How to click a button in Silverlight notification popup

3 Answers 118 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Dumitru
Top achievements
Rank 1
Dumitru asked on 24 Jul 2012, 08:40 AM

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. 

3 Answers, 1 is accepted

Sort by
0
Anthony
Telerik team
answered on 27 Jul 2012, 02:10 PM
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
0
Dumitru
Top achievements
Rank 1
answered on 03 Aug 2012, 12:17 PM
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?
0
Cody
Telerik team
answered on 08 Aug 2012, 08:17 PM
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
Tags
General Discussions
Asked by
Dumitru
Top achievements
Rank 1
Answers by
Anthony
Telerik team
Dumitru
Top achievements
Rank 1
Cody
Telerik team
Share this question
or