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

4 posts, 1 answers
  1. Ray
    Ray avatar
    2 posts
    Member since:
    Dec 2012

    Posted 14 Dec 2012 Link to this post

    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);
    }
  2. Answer
    Cody
    Admin
    Cody avatar
    3360 posts

    Posted 18 Dec 2012 Link to this post

    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
  3. Ray
    Ray avatar
    2 posts
    Member since:
    Dec 2012

    Posted 18 Dec 2012 Link to this post

    Thanks, I've solved my problem by using WindowManager.FindWindowRecursively
  4. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 19 Dec 2012 Link to this post

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