We are using WatiN - 2.1.0 to take a screenshot when an integration test fails. When running these tests locally on my dev VM all screenshot's are recorded correctly (using IE8 or IE9).
However, when they are running on our integration server:
The screenshots recorded on test failure are all black. I have reviewed several posts that cover similar concepts however they were all referencing earlier version of Watin. Has anyone had similar issues with the latest version?
Screenshot on test failure 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();
}
This post refers to an identical issue that another user was facing.
Have you tried this out.
Regards,
Ashish Narmen
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With