c# - White UIAutomation click() stops working on different platform -
i'm using white automate bdd testing of our c# wpf ui.
my first couple of tests working on development machine (running windows 7). however, when try , run same code on build server (virtual machine running windows server 2003 r2) doesn't work correctly. in both cases tests run command line , tests using cuke4nuke framework. in case of server accessing server via remote desktop connection.
the code looks like:
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 buttons click event not fired when run on server. button can clicked (using mouse) if ui left open after white has finished executing. 1 interesting point after click method run button show evidence of being clicked in picture below, in case of other buttons mouse on effect shown.

i'm not sure if problem or not, i've noticed white has few issues when used applications built using anycpu platform , run on 64-bit system. reason, anytime attempts move mouse under these conditions, automatically pushes mouse bottom of screen instead of requested location. means click command misses button told click on.
if build automation application x86 application, white automates mouse properly.
Comments
Post a Comment