This project is read-only.

Not able to run the test from Coded UI

Feb 20, 2014 at 7:27 PM
Edited Feb 20, 2014 at 7:29 PM
Hi all,

I am using VS2012 for coded UI and just now started analyzing CUITe.
I have done same thing as it is mentioned in Quick Start - https://cuite.codeplex.com/wikipage?title=Quick%20Start&referringTitle=Documentation

But still not able to execute the test method but strange thing is that i am not getting any warnings or error msgs. But still its not running.

Here is the class file under Object Repository:-
using CUITe.Controls.HtmlControls;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Telerik2.Object_Repository
{
class Class1 : CUITe_BrowserWindow
{
    public new string sWindowTitle = "Login";
    public CUITe_HtmlEdit txttxtEmployeeID = new CUITe_HtmlEdit("Id=txtEmployeeID");
    public CUITe_HtmlPassword txttxtPassword = new UITe_HtmlPassword("Id=txtPassword");
    public CUITe_HtmlInputButton btnLogIn = new CUITe_HtmlInputButton("Id=btnLogin");
}
}

and this is the Coded UI . cs file-

using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using System.Windows.Input;
using System.Windows.Forms;
using System.Drawing;
using Microsoft.VisualStudio.TestTools.UITesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UITest.Extension;
using Keyboard = Microsoft.VisualStudio.TestTools.UITesting.Keyboard;
using CUITe.Controls.HtmlControls;
using Telerik2.Object_Repository;


namespace Telerik2
{
[CodedUITest]
public class CodedUITest1
{
    public CodedUITest1()
    {
    }

    [TestMethod]
    public void CodedUITestMethod1()
    {
        this.UIMap.RecordedMethod1();//Recorded Test

        CUITe_BrowserWindow.Launch("http://10.237.178.87/Payroll/");
        Class1 pgPAHome = CUITe_BrowserWindow.GetBrowserWindow<Class1>();

        pgPAHome.txttxtEmployeeID.SetText("ARASTOGI");
        pgPAHome.txttxtPassword.SetText("ANCHAL19@");
        pgPAHome.btnLogIn.Click();
    }

    public TestContext TestContext
    {
        get
        {
            return testContextInstance;
        }
        set
        {
            testContextInstance = value;
        }
    }
    private TestContext testContextInstance;

    public UIMap UIMap
    {
        get
        {
            if ((this.map == null))
            {
                this.map = new UIMap();
            }

            return this.map;
        }
    }

    private UIMap map;
}
}

Can anyone help me on this..?
Mar 7, 2014 at 7:33 AM
How are you executing the test method?

There must be some indication of the result of the test run; what is it?