Project Description
Goal: Create a Framework around Visual Studio 2010's Coded UI Test to eliminate record and playback failure.
CodedUITests generate a lot of code, and they break on every change to the object under test.
- write new tests manually, but with as little code as possible.
- maintain an object map, that is smart enough to find changed objects
- support as many technologies as possible

Looking for volunteers to do the following:
- add code for every possible control
- create a UI crawler, that creates a UI Map for every control in a UI, and that stores this data (including the Object Tree) in a database.
- make the code smart enough, so that writing tests becomes very easy
- make tests reusable, by adding tables: the test is executed for every row.

In short: make sure this code works (or something similar, but very short)

The code uses this table:
1 + 2 = 3
2 * 3 = 6


Instead of the current:

// Click 'start' button
TAFWinWindow mUIStartWindow = new TAFWinWindow("Start", "Button", "start", "");
Mouse.Click(new TAF_WinButton(mUIStartWindow,"Start"));

// Click 'Run...' menu item
TAFWinWindow mUIStartMenu = new TAFWinWindow("", "ToolbarWindow32", "", "Application");
TAFWinMenu UiMn = new TAFWinMenu(mUIStartMenu);
Mouse.Click(new TAF_WinMenuItem(UiMn,"Run..."));

// Select 'calc.exe' in 'Open:' combo box
TAFWinWindow mUIRunWindow = new TAFWinWindow("Run", "#32770", "Run", "");
TAFWinWindow UiRunItemWindow = new TAFWinWindow(mUIRunWindow);
new TAF_WinComboBox(UiRunItemWindow,"Open:").EditableItem = "calc.exe";
// Type '{Enter}' in 'Open:' text box
Keyboard.SendKeys(new TAF_WinComboBox(UiRunItemWindow,"Open:"), "{enter}", ModifierKeys.None);

// Find the APP
TAFWinWindow mUICalculatorWindow = new TAFWinWindow("Calculator", "SciCalc", "Calculator", "");
// Find the Window and menubar
TAFWinWindow UiWindow = new TAFWinWindow(mUICalculatorWindow);
TAFWinTitleBar UiBar = new TAFWinTitleBar(mUICalculatorWindow);
// Click '1' button
Mouse.Click(new TAF_WinButton(UiWindow,"1"));
// Click '+' button
Mouse.Click(new TAF_WinButton(UiWindow,"+"));
// Click '2' button
Mouse.Click(new TAF_WinButton(UiWindow,"2"));
// Click '=' button
Mouse.Click(new TAF_WinButton(UiWindow,"="));
// Verify that 'Unknown Name' text box's property 'Text' equals '3, '
Assert.AreEqual("3, ", new TAF_WinEdit(UiWindow,"").Text);

// Click 'Close' button
Mouse.Click(new TAF_WinButton(UiBar,"Close"));

Last edited May 3, 2010 at 2:15 PM by verket, version 3