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

Test Studio Ignores Elevated Trust

3 Answers 92 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Top Gun
Top achievements
Rank 1
Top Gun asked on 11 Jul 2012, 09:37 PM

I am using Test Studio to run automated tests against a Silverlight Out of Browser application.  My SL OOB application has been installed on my computer with elevated trust.  When I launch the application, it opens in Full Screen.

However, when Test Studio launches the application, it (SL application) opens and ignores the Full Screen option.  Any code in the OOB application that requires elevated trust is ignored.  This creates a problem.  My Silverlight OOB application no longer runs exactly the way it is intended when launched by Test Studio.  How do I configure Test Studio to record and run my out of browser application with elevated trust?  (Allow Full Screen Option, File IO, plus other elevated trust options)

Also, Test Studio changes certain files in the Silverlight application (See Attached).  When these files change the application continues to run with elevated trust ignored.  Attached you will see the files that have changed after Test Studio opened my application.  I suspect these file changes may be causing the application to ignore elevated trust.  Please let me know.

3 Answers, 1 is accepted

Sort by
0
Byron
Telerik team
answered on 11 Jul 2012, 09:57 PM
Hello Amrit,

Thanks for trying Test Studio. Please review our documentation on Silverlight OOB elevated trust applications. This article describes the conditions under which your application can be automated with elevated trust. Please let us know if we can assist you further.

Regards,
Byron
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Top Gun
Top achievements
Rank 1
answered on 11 Jul 2012, 11:09 PM
I have read the article.  But I am still having trouble.  I created a simple Elevated OOB Application that I installed on my computer.  In the constructor the code looks like the following:
var msg = "Does Not Have Elevated Permission";
          if (Application.Current.HasElevatedPermissions)
          {
              msg = "Has Elevated Permission!";
          }
          MessageBox.Show(msg);

When, I open the app on the desktop, I see "Has Elevated Permission!"  When Test Studio opens, I see, "Does Not Have Elevated Permission".

The project is attached.  Please let me know how you get Test Studio to run in elevated trust mode.
0
Byron
Telerik team
answered on 16 Jul 2012, 09:14 PM
Hi Amrit,

I noticed that the sample application you provided does not get elevated trust in-browser. In cases such as these, the application will not get elevated trust when automated against by Test Studio (even out of browser), because Test Studio must replace the launching URL in order to inject its hooks into your Silverlight application. The side effect of this is that your application will not detect that it is running in OOB mode and elevated trust will be removed.

One work-around may be to enable your application to run with elevated trust in-browser, so that your application is still running with elevated trust after Test Studio begins to automate. Please let us know if we can assist you further.

Greetings,
Byron
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Tags
General Discussions
Asked by
Top Gun
Top achievements
Rank 1
Answers by
Byron
Telerik team
Top Gun
Top achievements
Rank 1
Share this question
or