Tests failing on silverlight pages using Chrome

13 posts, 0 answers
  1. Joseph
    Joseph avatar
    8 posts
    Member since:
    Apr 2014

    Posted 06 May 2014 Link to this post

    Hello all,

    I have a suite of automated tests that run fine on IE. When I change my app.config to use Chrome, all the tests fail and timeout with this exception.

    System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TimeoutException: Timeout trying to connect to Silverlight App.

    I have other non Silverlight pages in my application that execute fine. Any pointers or tips would be much appreciated.

    Thanks,

    Joseph

     
  2. Joseph
    Joseph avatar
    8 posts
    Member since:
    Apr 2014

    Posted 07 May 2014 Link to this post

    To add to my post, all the tips here have been confirmed and still no luck on Chrome..
    http://docs.telerik.com/teststudio/user-guide/troubleshooting_guide/recording-problems/unable-to-connect-to-silverlight-application
  3. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 09 May 2014 Link to this post

    Hi Joseph,

    Did you enable Silverlight automation? This can be done one of two ways:
    1) In the app.config file, in the "WebAii.Settings.Web" section include
    enableSilverlight="true"
    2) Via code:
    Manager.Settings.Web.EnableSilverlight = true;
    This line needs to run before you launch the browser.

    Regards,
    Cody
    Telerik
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
  4. Joseph
    Joseph avatar
    8 posts
    Member since:
    Apr 2014

    Posted 09 May 2014 in reply to Cody Link to this post

    yep, that's set to true. If that were set to false, wouldn't IE fail as well?
  5. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 09 May 2014 Link to this post

    Hello Joseph,

    My apologies for overlooking that this is Chrome specific, and yes you are right it would fail in IE as well.

    It may be a proxy interference problem. In order for us to automate Silverlight applications in Chrome we start up our own HTTP proxy process and automatically change the proxy settings of the machine to point to our proxy. If Chrome is not recognizing the change in proxy settings, or a third party anti-virus product is interfering, then we won't be able to inject our automation hooks into the Silverlight application.

    Can you investigate this possibility?

    Regards,
    Cody
    Telerik
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
  6. Joseph
    Joseph avatar
    8 posts
    Member since:
    Apr 2014

    Posted 09 May 2014 in reply to Cody Link to this post

    The application is on a internal network, with its own proxy and firewall. I asked my network guy and he said he just needs to open up the firewall for this connection to get out. Where can I get the specs that I can forward to him? Pardon me if I am being vague, but I am not a network guy.

    Thanks,

    Joseph
  7. Joseph
    Joseph avatar
    8 posts
    Member since:
    Apr 2014

    Posted 09 May 2014 in reply to Joseph Link to this post

    Also, just curious as why IE doesn't require the proxy?
  8. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 09 May 2014 Link to this post

    Hello Joseph,

    There's really not much to the specs. When running a Silverlgith applcation we start up a process "ArtOfTest.WebAii.HttpProxy.exe" out of our Bin folder. We then modify the proxy settings of your machine to what's shown in the attached screen shot. That forces all HTTP traffic to be routed through our proxy process on your machine.

    IE doesn't require it because it has a different API which allows us to inject our Silverlight automation hooks w/o using the proxy. The other browsers don't have the same API. The proxy is the only method we have to inject our hooks.

    Regards,
    Cody
    Telerik
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
  9. Joseph
    Joseph avatar
    8 posts
    Member since:
    Apr 2014

    Posted 12 May 2014 in reply to Cody Link to this post

    Thanks Cody. I am working with my network guy today on this. I am not sure if something is blocking the proxy change since we use our own proxy for traffic. I also don't know if our network is allowing your proxy to get out. I'll know more later. Thanks!

    Joseph
  10. Joseph
    Joseph avatar
    8 posts
    Member since:
    Apr 2014

    Posted 12 May 2014 in reply to Cody Link to this post

    Hi Cody,

    I went back to my network guy, and he asked for a destination IP for your HTTP proxy. Can you tell me where it is pointing?
  11. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 12 May 2014 Link to this post

    Hello Joseph,

    It doesn't work that way. Any HTTP request our proxy receives (the browser sends to 127.0.0.1:8089 per the proxy settings) is recorded by Test Studio and then forwarded directly to the requested real destination IP address. There is no external IP address used.

    Regards,
    Cody
    Telerik
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
  12. Joseph
    Joseph avatar
    8 posts
    Member since:
    Apr 2014

    Posted 12 May 2014 in reply to Cody Link to this post

    Fwiw, I am not using the Test Studio directly. I am only using the framework as a reference in my VS solution.
  13. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 12 May 2014 Link to this post

    Hello Joseph,

    That's just fine and doesn't change anything. Test Studio is built on top of our own framework and it's our framework that is activating the proxy for all Silverlight test automation... both full Test Studio and those using our free framework.

    Regards,
    Cody
    Telerik
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
Back to Top