src/main/java/com/xceptance/neodymium/module/statement/browser/multibrowser/WebDriverCache.java
/**
     * This function can be used within a function of a JUnit test case that is annotated with @AfterClass to clear the
     * WebDriverCache of the WebDrivers ready for reuse.
     * <p>
     * <b>Attention:</b> It is save to run this function during a sequential test execution. It can have repercussions
     * (e.g. longer test duration) in a parallel execution environment.
     *
     * <pre>
     * &#64;AfterClass
     * public void afterClass()
     * {
     *     WebDriverCache.quitCachedBrowsers();
     * }
     * </pre>
     **/
This function can be used within a function of a JUnit test case that is annotated with @AfterClass to clear the
WebDriverCache of the WebDrivers ready for reuse.

Attention: It is save to run this function during a sequential test execution. It can have repercussions
in a parallel execution environment.


This function can be used within a function of a JUnit test case that is annotated with @AfterClass to clear the WebDriverCache of the WebDrivers ready for reuse . Attention : It is save to run this function during a sequential test execution . It can have repercussions in a parallel execution environment .
public static void quitCachedBrowsers()
    {
        instance.cache.values().forEach((wDSC) -> {
            try
            {
                WebDriver webDriver = wDSC.getWebDriver();
                LOGGER.debug("Quit web driver: " + webDriver.toString());
                webDriver.quit();
                BrowserUpProxy proxy = wDSC.getProxy();
                if (proxy != null)
                {
                    proxy.stop();
                }
            }
            catch (Exception e)
            {
                LOGGER.debug("Error on quitting web driver", e);
            }
        });
        instance.cache.clear();
    }
public static void quitCachedBrowsers ( ) { instance . cache . values ( ) . forEach ( ( wDSC ) -> { try { WebDriver webDriver = wDSC . getWebDriver ( ) ; LOGGER . debug ( "Quit web driver: " + webDriver . toString ( ) ) ; webDriver . quit ( ) ; BrowserUpProxy proxy = wDSC . getProxy ( ) ; if ( proxy != null ) { proxy . stop ( ) ; } } catch ( Exception e ) { LOGGER . debug ( "Error on quitting web driver" , e ) ; } } ) ; instance . cache . clear ( ) ; }
This function can be used within a function of a JUnit test case that is annotated with @AfterClass to clear the
 WebDriverCache of the WebDrivers ready for reuse.
This function can be used within a function of a JUnit test case that is annotated with @AfterClass to clear the WebDriverCache of the WebDrivers ready for reuse .