1

Closed

Error in application.GetWindowByName

description

I can't get past the setup part of a test with my own code. I get this error every time.
 
System.TypeInitializationException was unhandled by user code
Message=The type initializer for 'Guia.Locator.WindowHelper' threw an exception.
Source=Guia
TypeName=Guia.Locator.WindowHelper
StackTrace:
   at Guia.Locator.WindowHelper.GetWindowBySearchCondition(SearchCondition searchCondition, Int32 processId)
   at Guia.Core.Application.GetWindowBySearchCondition(SearchCondition searchCondition)
   at Guia.Core.Application.GetWindowByName(String name)
   at SpectralinkLibraryTest.UI.Setup() in D:\Users\jesseb.OGS\Documents\Visual Studio 2008\Projects\SpectralinkFrontEnd\UITests\UI.cs:line 26
InnerException: System.NullReferenceException
   Message=Object reference not set to an instance of an object.
   Source=Guia
   StackTrace:
        at Guia.Config.AppConfigImpl.get_WindowTimeout()
        at Guia.Locator.WindowHelper..cctor()
   InnerException:
Closed Jul 19, 2010 at 9:11 PM by PhilippAchermann
No feedback received. Problem is probably solved.

comments

PhilippAchermann wrote Jul 8, 2010 at 6:32 PM

Maybe the problem is that the Guia.dll.config is not deployed with the Guia.dll. If you're working with MSTest you have to edit the testrunconfig (deployment).
We're working on a better exception handling on that case. Version 0.1.1 should be released soon.

wrote Jul 19, 2010 at 9:11 PM

wrote Feb 14, 2013 at 12:08 AM

wrote May 16, 2013 at 7:14 AM