Keyboard commands on TFS build

Jun 17, 2009 at 9:21 PM
Edited Jun 17, 2009 at 9:23 PM

Has anyone had much luck integrating white UI tests into an automated build? 

I have desktop interaction and all of those pieces working correctly as I can launch the application and verify, for example, the text in a label.  However, when I attempt to use keyboard commands, it doesn't work.  The three examples below put "5" into a cell in the grid and move to the next cell if run from the IDE.  They also work if I initiate the build and remote desktop the session running the TFSBuildService.exe for the port 9192 build agent.  A test that only launches the app and verifies that text appears where it should passes fine on the build server.  For these keyboard commands, there is no error and the test just moves on to the next line.  The only thing that happens is the test fails when I assert that the text was entered correctly.

For troubleshooting, I'll create a simpler test that only involves a form with a single textbox, but I was wondering if anyone was not having any problems using white on an automated TFS build.  Thanks!

1)

 myGrid.Rows[i].Cells[j].Click();

Core.InputDevices.Keyboard.Instance.Enter("5");

Core.InputDevices.Keyboard.Instance.PressSpecialKey(KeyboardInput.SpecialKeys.RETURN);

2)

myGrid.Rows[i].Cells[j].Click();

_window.Keyboard.Enter("5");

_window.Keyboard.PressSpecialKey(KeyboardInput.SpecialKeys.RETURN);

3)

myGrid.Rows[i].Cells[j].Enter("5");

myGrid.Rows[i].Cells[j].KeyIn(KeyboardInput.SpecialKeys.RETURN);

Jun 22, 2009 at 4:13 PM

Nevermind...I finally noticed your blurb about this in the documentation and got the second option to work using vnc.