Exemplo n.º 1
0
        public void QuitDriver()
        {
            if (TestContext.CurrentContext.Result.Outcome != ResultState.Success)
            {
                ScreenshotCreater.SaveScreenShot(webDriver);
            }

            DriverSingleton.CloseDriver();
        }
Exemplo n.º 2
0
        public void ClearDriver()
        {
            if (TestContext.CurrentContext.Result.Outcome != ResultState.Success)
            {
                ScreenshotCreater.SaveScreenShot(webDriver);
                Logger.Log.Fatal("Test Failed");
            }

            DriverSingleton.CloseDriver();
            Logger.Log.Info("Driver Closed.");
        }
Exemplo n.º 3
0
        public void ClearDriver()
        {
            if (TestContext.CurrentContext.Result.Outcome != ResultState.Success)
            {
                Logger.Log.Error("Test failed. Taking screenshot.");
                ScreenshotCreater.SaveScreenShot(Driver);
                Logger.Log.Info("Took screenshot.");
            }

            Logger.Log.Warn("Driver is closing.");
            DriverSingleton.CloseDriver();
            Logger.Log.Info("Driver closed.");
        }
        public void ClearDriver()
        {
            if (TestContext.CurrentContext.Result.Outcome == ResultState.Success)
            {
                Logger.WhenTestSuccess();
            }

            if (TestContext.CurrentContext.Result.Outcome == ResultState.Failure ||
                TestContext.CurrentContext.Result.Outcome == ResultState.Error)
            {
                Logger.WhenTestFails();
                ScreenshotCreater.SaveScreenShot();
            }
            DriverSingleton.CloseBrowser();
        }