Manual encoding of a coded user interface

I worked with the Coded UI Test (CUIT) VS2010 function.
When writing the CodedUI framework, a lot of hierarchical classes are generated.

I was wondering if the coding (manually) of CUIT will shorten the generated code and will it be optimized (in search elements) as the generated code?

Also, what are the scenarios in which CUIT can be manually encoded?

+5
source share
3 answers

CUITe (Enhanced Enhanced Encoded User Interface) Framework is designed for people who prefer manual encoding. http://cuite.codeplex.com/

CUITe - , Microsoft Visual Studio Team Test Coded UI Test, , . > , .

CUITe (== UIMap). / , . , . / , .

+4

, / .

, .

USB script Silver-light

[TestMethod]
public void SilverlightHANDCODINGTest()
{
    BrowserWindow br = BrowserWindow.Launch(@"http://localhost:1377/SilverlightApplication1TestPage.html");

    UITestControl sCustom = new UITestControl(br);
    sCustom.TechnologyName = "Web";
    sCustom.SearchProperties.Add("ControlType", "Custom");
    sCustom.SearchProperties.Add("TagName", "OBJECT");
    sCustom.SearchProperties.Add("Type", "application/x-silverlight-2");
    sCustom.SearchProperties.Add("TagName", "OBJECT");

    // sCustom.DrawHighlight();

    SilverlightControl sframe = new SilverlightControl(sCustom);
    sframe.TechnologyName = "Silverlight";
    sframe.SearchProperties.Add(SilverlightControl.PropertyNames.MaxDepth, "-1");
    sframe.DrawHighlight();

    SilverlightEdit sTextBox = new SilverlightEdit(sCustom);
    sTextBox.TechnologyName = "Silverlight";
    sTextBox.DrawHighlight();
    Playback.Wait(2000);

    sTextBox.SetProperty(SilverlightEdit.PropertyNames.Text, "Thank god");

    SilverlightButton sButton = new SilverlightButton(sCustom);
    sButton.TechnologyName = "Silverlight";
    sButton.SearchProperties.Add(SilverlightButton.PropertyNames.DisplayText, "Button");

    sButton.DrawHighlight();

    Playback.Wait(2000);

    Mouse.Click(sButton);

    SilverlightComboBox sComboBox= new SilverlightComboBox(sCustom);
    sComboBox.TechnologyName = "Silverlight";

    sComboBox.DrawHighlight();

    Playback.Wait(2000);

    sComboBox.SetProperty(SilverlightComboBox.PropertyNames.SelectedItem,"Kishore");
}

,

+3

, . .

0

All Articles