public void Dispose() { if (!string.IsNullOrEmpty(TestContext.CurrentContext.Test.MethodName)) { if (TestContext.CurrentContext.Result.Outcome != ResultState.Success) { Screenshot(); } else { Reporting.TestPassed(); } Selenium.Dispose(); } }