Silverlight controls not recognized when XAP hosted at different domain


  • The Coded UI Test Builder fails to recognize Silverlight controls when the application (XAP) source is a different domain

    I placed XAP at two different locations

    1. http:\\Domain1\MyApp\MyApp.XAP
    2. http:\\Domain2\MyApp\MyApp.XAP

    My WebPage is at http:\\Domain1\HomePage.html

    If the Silverlight object's source is set to 1st one (same domain) it works fine and CUIT builder recognizes, records and playbacks properly.

    But when I set the source to 2nd one (i.e. different domain), the CUIT builder fails to recognize Silverlight app.

    What do I need to make it work?


    PS: Please note that the Silverlight application itself works fine no matter from which domain I am using - I have appropriate crossdomain policy file available and enableHtmlAccess set to true.

    Thursday, September 08, 2011 7:46 AM

All replies

  • What is the error message that you are getting ??
    ---Mark this post if this Answers or Helps---
    Thursday, September 08, 2011 10:57 AM
  • No error message is there...

    On moving cross-hair over the Silverlight app and its controls, the control property windows displays general warning - No silverlight controls were detected..

    Neither main app nor the controls get highlighted. As I mentioned earlier, when I copy the same XAP at a path within same domain and then direct the web page to use XAP from that location, everything works fine.

    Thursday, September 08, 2011 11:25 AM
  • Have you followed these steps while deploying on both machines


    ---Mark this post if this Answers or Helps---
    Thursday, September 08, 2011 11:30 AM
  • Yes I have. Both app and web are same (copy) at both domains.

    The application itself work fine when hosted at Domain1 or Domain2. The recording is also successful when web page at DomainX refers to app at same DomainX. It fails to record when web page at DomainX refers to the same app at DomainY.


    Thursday, September 08, 2011 11:52 AM
  • Verify once again ifthe SilverlightUIAutomationHelper DLL exists in the xap file. This instrumentation is required for CodedUITest to detect SL control.
    Thursday, September 08, 2011 4:26 PM
  • Verifying presence of that dll was the first thing I did when it was not recognizing Silverlight controls. Then I also made sure this by having the same XAP and webpages at both domains.

    It should be simple to reproduce, just have a web page refer to some Silverlight app. Once refer the app put in same domain, then refer same app put at other domain.

    Friday, September 09, 2011 4:08 AM