We have a Watin test for the ajax model popup page. The test tries to open a window, hide it, and then view it.
The test runs fine when I run it from Visual Studio or our local build scripts. The test fails when it runs on the build server.
The build server is Cruise Control.Net running as a Windows service (registered as a domain account). Our build scripts are written in NAnt, and we run the Watin tests using the method described in this post .
Ajax modal popup is implemented using jquery.
We use:
- Watin 2.0.20
- NUnit 2.5.5
- Windows Server 2003 with IE7
- jQuery 1.4.2
Here is a fragment of a failed 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();
:
_ieBrowser.TextField("editBody").WaitUntilExists();
.