Silverlight / WPF Window Name

PROBLEM

You receive one of the following errors in the test execution log for your Silverlight or WPF application:

  • Unable to find the window '' inside application.
  • System.NullReferenceException: Object reference not set to an instance of an object.

SOLUTION

It is possible the main and/or popup window does not have a title:

 

 

Ensure all windows are given unique names in the application's source code so that Test Studio can correctly identify them during its Find Element operations. The Caption property for the window node must match the window's title.