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

How to detect if the silverlight copy paste permission dialog poped up?

3 Answers 65 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ray
Top achievements
Rank 1
Ray asked on 14 Dec 2012, 07:19 PM
Hi, Guys

I have a problem when doing UI automation for our in-browser Silverlight app, when simulate user copy and paste, silverlight will pop up a window and ask for permission, we cannot assume the copy and paste permission is already granted.

Currently we use the trick to workaround this, we focused to the "ok" button in the permission dialog and click space or enter, however that action will screw up the automation because I cannot find a way to know when permissionDialogPops is true, please help. Thanks

if(permissionDialogPops)
{
_myManager.Desktop.KeyBoard.KeyPress(Keys.Left);
_myManager.Desktop.KeyBoard.KeyPress(Keys.Space);
}

3 Answers, 1 is accepted

Sort by
0
Accepted
Cody
Telerik team
answered on 18 Dec 2012, 11:17 PM
Hello,

Do you know if this window is a Win32 type of window, not a Silverlight window buried inside the application? If it is you can probably handle it automatically using our GenericDialog handler.

Kind regards,
Cody
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Ray
Top achievements
Rank 1
answered on 19 Dec 2012, 05:06 AM
Thanks, I've solved my problem by using WindowManager.FindWindowRecursively
0
Cody
Telerik team
answered on 19 Dec 2012, 01:17 PM
Hello Ray,

That sounds like a reasonable solution. Thanks for sharing!

Regards,
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
Ray
Top achievements
Rank 1
Answers by
Cody
Telerik team
Ray
Top achievements
Rank 1
Share this question
or