Beispiel #1
0
        public void AfterScenario()
        {
            try
            {
                if (_scenarioContext.TestError != null)
                {
                    WebDriverExtensions.TakeScreenshot(Driver);
                }
            }

            catch (Exception e)
            {
                Console.WriteLine($"Unable to execute AfterScenario step due to {e.Message}");
            }

            finally
            {
                WebDriverExtensions.CloseHangingWindows(Driver, OriginalHandle);
                Driver.Manage().Cookies.DeleteAllCookies();
            }
        }