# CUIT C# help



## seaninboulder (Jul 14, 2010)

I'm trying to get this extension for Visual Studio 2010 Coded UI Tests working. When I run the tests I get the following error:

Test method SampleTestProject.CodedUITest1.CodedUITestMethod1 threw exception: 
System.NullReferenceException: Object reference not set to an instance of an object

It's pointing to this statement:
Keyboard.SendKeys(uISheet122Cell, this.ClickB2andtypeHelloWorldParams.UISheet122CellSendKeys, ModifierKeys.None);

log:
E, 4752, 44, 2010/07/14, 12:42:22.291, 194360266472, QTAgent32.exe, AccessibleObjectFromWindow failed for window handle 2229994
E, 4752, 44, 2010/07/14, 12:42:22.291, 194360266953, QTAgent32.exe, Msaa.AccWrapperFromWindow: AccessibleObjectFromWindow returned null object
E, 4752, 44, 2010/07/14, 12:42:22.334, 194360367500, QTAgent32.exe, Window 2229994 not responding. Last Win32 error 0
E, 4752, 44, 2010/07/14, 12:42:22.353, 194360410464, QTAgent32.exe, GetClassName for handle 2229994 failed
W, 4752, 44, 2010/07/14, 12:42:22.359, 194360424873, QTAgent32.exe, PERF WARNING: CacheQueryId: took 128 ms. Expected it to take maximum 100 ms.
E, 4752, 44, 2010/07/14, 12:42:22.361, 194360429735, QTAgent32.exe, Window 2229994 not responding. Last Win32 error 1400
E, 4752, 44, 2010/07/14, 12:42:22.362, 194360430906, QTAgent32.exe, GetClassName for handle 2229994 failed
W, 4752, 44, 2010/07/14, 12:42:23.900, 194364026015, QTAgent32.exe, PERF WARNING: FindTopLevelWindowHelper::FindAllDescendents: took 1448 ms. Expected it to take maximum 500 ms.
W, 4752, 44, 2010/07/14, 12:42:24.221, 194364775456, QTAgent32.exe, IEDOM : StopSession of the plugin called before StartSession
W, 4752, 44, 2010/07/14, 12:42:24.221, 194364775605, QTAgent32.exe, UIA : StopSession of the plugin called before StartSession

error stack trace;

Microsoft.VisualStudio.TestTools.UITesting.UITestControl.GetPropertyValue(String propertyName)
Microsoft.VisualStudio.TestTools.UITesting.UITestControl.GetProperty(String propertyName)
Microsoft.VisualStudio.TestTools.UITesting.UITestControl.GetPropertyInternal[T](String propertyName)
Microsoft.VisualStudio.TestTools.UITesting.UITestControl.get_BoundingRectangle()
Microsoft.VisualStudio.TestTools.UITesting.UITestControl.CaptureImage()
Microsoft.VisualStudio.TestTools.UITesting.Playback.CaptureScreenShot(UITestControl control)
Microsoft.VisualStudio.TestTools.UITesting.Playback.GetUITestControlString(UITestControl control)
Microsoft.VisualStudio.TestTools.UITesting.Playback.AddUITestControlDescriptionToException(SystemException exception, IPlaybackContext context)
Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(SystemException exception, IPlaybackContext context)
Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(SystemException exception, String actionName, UITestControl uiControl)
Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(SystemException exception, String actionName, Object parameterValue, UITestControl uiControl)
Microsoft.VisualStudio.TestTools.UITesting.UITestControl.GetPropertyValue(String propertyName)
Microsoft.VisualStudio.TestTools.UITesting.UITestControl.GetProperty(String propertyName)
Microsoft.VisualStudio.TestTools.UITesting.UITestControl.GetPropertyInternal[T](String propertyName)
Microsoft.VisualStudio.TestTools.UITesting.UITestControl.get_Enabled()
Microsoft.VisualStudio.TestTools.UITesting.UITestControl.GetEnabledWithoutWFR()
Microsoft.VisualStudio.TestTools.UITesting.UITestControl.WaitForControlEnabled(Int32 millisecondsTimeout)
Microsoft.VisualStudio.TestTools.UITesting.UITestControl.SendKeys(String text, ModifierKeys modifierKeys, Boolean isEncoded, Boolean isUnicode)
Microsoft.VisualStudio.TestTools.UITesting.Keyboard.SendKeysImplementation(UITestControl control, String text, ModifierKeys modifierKeys, Boolean isEncoded, Boolean isUnicode)
Microsoft.VisualStudio.TestTools.UITesting.Keyboard.SendKeysImplementationWrapper(UITestControl control, String text, ModifierKeys modifierKeys, Boolean isEncoded, Boolean isUnicode)
Microsoft.VisualStudio.TestTools.UITesting.Keyboard.SendKeys(UITestControl control, String text, ModifierKeys modifierKeys)
SampleTestProject.UIMap.ClickB2andtypeHelloWorld() in C:\Users\seans\Documents\Visual Studio 2010\Projects\CodedUITestOfExcel\SampleTestProject\UIMap.Designer.cs: line 65
SampleTestProject.CodedUITest1.CodedUITestMethod1() in C:\Users\seans\Documents\Visual Studio 2010\Projects\CodedUITestOfExcel\SampleTestProject\CodedUITest1.cs: line 31


----------

