Launch Desktop Silverlight Application

2 posts, 0 answers
  1. Abi
    Abi avatar
    8 posts
    Member since:
    Jul 2011

    Posted 09 Aug 2011 Link to this post

    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

           

              }

  2. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 11 Aug 2011 Link to this post

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