White UIAutomation click () stops working on another platform

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.

Button before and after click

+5
source share
4 answers

, , , , , AnyCPU 64- . - , , , . , click , .

x86, White .

+6

Windows 7 x64 .

, , button.RaiseClickEvent(); , . , smt.

0

, , , ...

Project White NUnit 64- Win7. , , 32- .

TestDriven.Net. CPU 32-, 64-.

0

, ( ) x86 .

However, the real problem is being created by Bely himself. On the white pages of the discussion on codeplex, Hachima published a modification of the White source code to ensure that it works under x86 as well as x64: http://white.codeplex.com/discussions/228433

0
source

All Articles