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

Launch Desktop Silverlight Application

1 Answer 79 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Abi
Top achievements
Rank 1
Abi asked on 10 Aug 2011, 04:25 AM

Hello,

I have to launch my Silverlight application for automating my testing, I am now working with Internet Browser for now, but I ideally need to automate my testing by initiating the desktop link to of Silverlight application to test. I have tried couple of options posted in some the following links..

 

http://www.telerik.com/automated-testing-tools/support/kb/using-telerik-testing-framework-with-silverlight-out-of-browser-and-elevated-trust.aspx

 

http://www.telerik.com/automated-testing-tools/community/forums/test-studio-express/automation-framework/silverlight-out-of-browser-in-webaii-2010-2.aspx

 

I hope I am missing somethingā€¦Please help me on the sameā€¦

 

Find my desktop link properties::

"C:\Program Files (x86)\Microsoft Silverlight\sllauncher.exe" 846926624.localhost

 

Code Below:

 

//ABI

        [TestMethod]

        public void SilverlightApplicationFileUploadExample4()

        {

            var settings = GetSettings();

            settings.EnableSilverlight = true;

            Window buttonToClick = null;

 

            Initialize(settings, Console.WriteLine);

            Manager.Settings.ExecutionDelay = 10;

            //Manager.LaunchNewBrowser(BrowserType.InternetExplorer);

 

            //ActiveBrowser.NavigateTo("http://localhost/Web/FieldClaims.aspx");

 

            Manager.LaunchNewBrowser(BrowserType.SilverlightOutOfBrowser, true, System.Diagnostics.ProcessWindowStyle.Minimized, "846926624.localhost"); //Fails here with Script Error

       

          }

1 Answer, 1 is accepted

Sort by
0
Stoich
Telerik team
answered on 11 Aug 2011, 03:16 PM
Hi Abi,
   I've confirmed a couple of issue related to testing out-of-browser Silverlight apps.

The first one is the one you seem to have encountered. You hit it when you attempt to launch and connect to a oob SL app from code. I've logged it as a bug and you can track its progress here:
http://www.telerik.com/support/pits.aspx#/public/test-studio/7359

The only workaround I can offer is launch a normal web browser and then connect to the development server where your Silverlight app is deployed. For example:
Manager.LaunchNewBrowser(BrowserType.InternetExplorer);
ActiveBrowser.NavigateTo("http://localhost:9047/SilverlightApplication20TestPage.html");
Please note that you won't need an active Internet connection in order to do this.

The second issue appears when running out-of-browser test with Test Studio:
http://www.telerik.com/support/pits.aspx#/public/test-studio/7361
Since you're using the Testing Framework you're unlikely to hit this problem.

Let me know if you require any additional assistance.

Regards,
Stoich
the Telerik team
Vote for Telerik Test Studio at the Annual Automation Honors Voting!
Tags
General Discussions
Asked by
Abi
Top achievements
Rank 1
Answers by
Stoich
Telerik team
Share this question
or