I use White to automate the BDD testing of our C # WPF interface.
My first pair of tests works well on my development machine (running Windows 7). However, when I try to run the same code on the build server (a virtual machine running Windows Server 2003 R2), it does not work correctly. In both cases, tests are run from the command line, and tests use the Cuke4Nuke framework. In the case of a server, I access the server through a remote desktop connection.
The code looks like this:
var application = Application.Launch("whiteApp.exe");
var initializeOption = InitializeOption.NoCache;
var windowCriteria = SearchCriteria.ByText("whiteApp");
var window = application.GetWindow(criteria, initializeOption);
var criteria = SearchCriteria.ByAutomationId("rightButton");
var button = (Button) window.Get(criteria);
button.click();
The problem is that the button press event does not fire when it runs on the server. A button can be pressed (with the mouse) if the user interface remains open after White completes. One interesting point is that after the click method is launched, the button shows that the button is pressed, as shown in the figure below, in the case of other buttons, the mouse effect is displayed.

source
share