Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [OneTimeTearDown]
- public void TestFail()
- {
- if (TestContext.CurrentContext.Result.Outcome != ResultState.Success)
- {
- string screensLocation = @"E:";
- string testName = TestContext.CurrentContext.Test.Name;
- var screenshot = ((ITakesScreenshot)driver).GetScreenshot();
- screenshot.SaveAsFile(screensLocation + testName + ".png");
- }
- }
Add Comment
Please, Sign In to add comment