Cant access Silverlight in IE

Feb 8, 2010 at 2:31 PM


I'm trying to make a program that fills a silverligh form to save data. I have installed silverlight 3, so i downloaded white from trunk (at google code svn). But I can't see the silverlight document and browserWindow.SilverlightDocument always get an exception:

"Could not find Silverlight document after waiting for 5000. Timeout value configured by BusyTimeout in White/Core"

So I look at the source code, and see this is the code to look up the silverlight "object"

Clock.Do perform =  () => finder.Descendant(AutomationSearchCondition.ByControlType(ControlType.Window).OfName("Silverlight Control"));

I debugged it and there is not any object of that name ("Silverlight Control") in AutomotationElement (subtree), can't neither be seen by UIspy.exe. The closest object I can see is the tab, I'm using internet explorer 8. By the way, I don't havee access of source code of the silverlight or web server.


Feb 10, 2010 at 5:41 AM

can you do window.LogStructure() on the IE window to see what it displays.


Feb 10, 2010 at 9:53 AM


Window.LogStructure() shows same as UISpy, the only control of type ControlType.Window  is the main window:


ControlType: ControlType.Window
Name: DEMO - Internet Explorer
Bounding rectangle: 121;-936;1167;827
ClassName: IEFrame
IsOffScreen: False
FrameworkId: Win32
ProcessId: 3456

By the way i can't see in the whole log anything refering silverlight at all.

Any help?



Feb 10, 2010 at 2:17 PM

have you looked at point 3 here


Feb 10, 2010 at 3:30 PM




Certanly I didn't read this:

3. I am not able to find any items inside ToolStrip and MenuStrip (or DataGrid)
If you running NUnitConsole without /nothread option then you should try that out.
There is a known issue with UIAutomation and ToolStrip/MenuStrip support. Please search for "UIAutomation menustrip" in google for more on this.
Try changing the ApartmentState to STA and see if that helps. In order to change this you would need to edit the app.config file for the test. See the Configuration page.


1) I can't find the silverlight document itselt in the IEWindow, not the control (which obiously i can't get as long as i don't have the document)

2) I've tried this whithout success:





Feb 19, 2010 at 5:07 PM

Would it be possible to provide some sample code for application under test to reproduce the issue?


Feb 19, 2010 at 5:23 PM

What code do you mean ? the silver light code? or the html code? I can't provide acces to the silverlight code but yes to the HTMl, but it does not have anything strange or unsual... or maybe you can provide me a web page whith a working silverlight that i can try access!



Feb 21, 2010 at 3:48 PM

If you checkout the source code of white then you can see that there are unit tests which run against silvelight application.