I am new to Coded UI Project. I recorded simple steps that interact with Calculator application. While running the test within Test Explorer works fine whereas while running the test from another Console Project throws error. I read from a question thread that
Playback.Initialize();
//Call Coded UI test Method
Playback.Cleanup();
the above is the format to call any coded ui test method from other project types viz., Console or Windows. I included below dll references as well.
Microsoft.VisualStudio.QualityTools.UnitTestFramework
Microsoft.VisualStudio.TestTools.UITest.Common
Microsoft.VisualStudio.TestTools.UITest.Extension
Microsoft.VisualStudio.TestTools.UITest.Extension.IE
Microsoft.VisualStudio.TestTools.UITest.Framework
Microsoft.VisualStudio.TestTools.UITest.Logging
Microsoft.VisualStudio.TestTools.UITest.Playback
Microsoft.VisualStudio.TestTools.UITest.UITesting
I am getting Type.Initialization.Exception while executing Playback.Initialize() method.
I am using Visual Studio 2013.
Here is the complete exception information
An unhandled exception of type 'System.TypeInitializationException' occurred in Microsoft.VisualStudio.TestTools.UITesting.dll
Additional information: The type initializer for 'Microsoft.VisualStudio.TestTools.UITest.Extension.UITestUtilities' threw an exception.
{"The type initializer for 'Microsoft.VisualStudio.TestTools.UITest.Extension.UITestUtilities' threw an exception."}