Launch encoded UI as VS2012 windows

I am having a problem connecting my coded UI on a button click. I seem to keep getting errors like

"'Microsoft.VisualStudio.TestTools.UITest.Common.UITestLogWrapper' threw an exception."

I was wondering if there is a link that I was missing or if I need to change the initialization code?

Here is my code so far '

namespace WindowsFormsApplication2
{
    public partial class Form1 : Form
    {
        public Form1()
        {
        InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            Microsoft.VisualStudio.TestTools.UITesting.Playback.Initialize();
            CodedUITestProject.CodedUITest1 coded = new CodedUITestProject.CodedUITest1();
            coded.Method();
            Microsoft.VisualStudio.TestTools.UITesting.Playback.Cleanup();
        }
    }
}'

      

Noting that Microsoft.VisualStudio.TestTools.extension.Uia Microsoft.VisualStudio.TestTools.extension.ie are not in private or open assemblies (is this something in 2012?)

Both projects are in .NET Framework 4

Any help would be greatly appreciated.

+3


source to share


3 answers


I was able to solve the above issue by adding a reference to Microsoft.VisualStudio.TestTools.UITest.Logging from the PrivateAssemblies directory. However, I am getting errors loading the IE Interop assembly even though I am referring to it. Hope you help you further than I do.



0


source


The compiled Microsoft.VisualStudio.TestTools.extension.Uia and Microsoft.VisualStudio.TestTools.extension.ie which you need will be found in "C: \ Program Files (x86) \ Common Files \ Microsoft Shared \ VSTT \ 12.0" although I not sure if it solves your problem.



0


source


add link from. \ Microsoft Visual Studio 11.0 \ Common7 \ IDE \ PrivateAssemblies. i means just adding a link from PrivateAssemblies and PublicAssemblies is enough. don't forget to check Microsoft.VisualStudio.TestTools.UITest.Extension.IE.Communication.Interop.dll, this is stated in the debug folder

-1


source







All Articles