c# - Watin Test works from Visual Studio but not CCNet running as Windows Service -
we have watin test page ajax model popup window. test trying open window, hide reshow it.
the test runs fine when run visual studio or our local build scripts. test fails when runs on build server.
the build server cruise control.net running windows service (logged in domain account). our build scripts written in nant , running watin tests using method described in this post.
the modal ajax popup window implemented using jquery.
we using:
- watin 2.0.20
- nunit 2.5.5
- windows server 2003 ie7
- jquery 1.4.2
here snippet of failing test.
_iebrowser.button("btntoggle").click(); _iebrowser.waitforcomplete(); assert.istrue(_iebrowser.button("btnreshow").exists); _iebrowser.button("btnreshow").click(); _iebrowser.waitforcomplete(); _iebrowser.textfield("editbody").waituntilexists(); assert.istrue(_iebrowser.textfield("editbody").text.contains(thisiscustomer)); _iebrowser.button("btndone").click(); _iebrowser.waitforcomplete();
this line:
_iebrowser.textfield("editbody").waituntilexists();
times out.
by default windows service cannot interact desktop.
if go properties of service, @ log on tab, see 2 options account of service: local system account or other specified account.
if select local system account, enable allow service interact desktop check box.
if enable option, restart service, should allow service open , close windows.
Comments
Post a Comment