public void TestCleanup() { if (TestContext.CurrentTestOutcome == UnitTestOutcome.Passed) { TC01_ValidateSideMenus.IncrementPassedTests(); } var status = TestContext.CurrentTestOutcome; Status status1; // LogSatus logstatus; Console.WriteLine("TestContext:" + TestContext.CurrentTestOutcome); Console.WriteLine("UnitTestOutcome.Passed" + UnitTestOutcome.Passed); if (TestContext.CurrentTestOutcome != UnitTestOutcome.Passed) { status1 = Status.Fail; PropertiesCollection.test.Log(Status.Fail, "Test failed and aborted"); } System.Threading.Thread.Sleep(4000); PropertiesCollection.driver.Close(); PropertiesCollection.driver.Quit(); PropertiesCollection.driver.Dispose(); }
public void TestInitialize() { TC01_ValidateSideMenus.IncrementTests(); PropertiesCollection.driver = new ChromeDriver(@ConfigurationManager.AppSettings["ChromeDriverPath"]); PropertiesCollection.driver.Manage().Window.Maximize(); FpLoginPage loginPage = new FpLoginPage(); loginPage.Login(); }