We use WatiN - 2.1.0 to take a screenshot when the integration test failed. When performing these tests locally on my virtual machine, all screenshots are recorded correctly (using IE8 or IE9).
However, when they are executed on our integration server:
- Windows 2008 VM Server
- Internet explorer 8
- we run watin tests from the city team using nunit-console
Screenshots recorded during a test error are all black. I reviewed a few posts that cover similar concepts, but they all refer to an earlier version of Watin. Has anyone had similar problems with the latest version?
Screenshot of the test error code:
[TearDown] public void TearDown() { if (TestContext.CurrentContext.Result.State == TestState.Failure || TestContext.CurrentContext.Result.State == TestState.Error) { Browser.BringToFront(); Browser.CaptureWebPageToFile(DateTime.Now.ToString("ddmmyyyyHHmmss") + GetType().Name + ".png"); } Browser.Close(); }
Jesse source share