Package org.openqa.selenium

Examples of org.openqa.selenium.WebDriver.quit()


        d = getDriver();
        d.get(url + "?session2=value2");
        // Grab set of session cookies
        secondSessionCookies = d.manage().getCookies();
        // Manually quit the current Driver and create a new one
        d.quit();
    }

    @Test
    public void shouldCreateASeparateSessionWithEveryNewDriverInstance() {
        // No cookie of the new Session can be found in the cookies of the old Session
View Full Code Here


        // Get Driver Instance
        WebDriver d = getDriver();
        d.navigate().to("about:blank");

        // Quit the driver, that will cause the process to close
        d.quit();

        // Throws "SessionNotFoundException", because no process is actually left to respond
        d.getWindowHandle();
    }
View Full Code Here

    public void useDriverButDontQuit() {
        WebDriver d = getDriver();
        disableAutoQuitDriver();

        d.get("http://www.google.com/");
        d.quit();
    }

//    @Test
//    public void shouldSurviveExecutingManyTimesTheSameCommand() {
//        WebDriver d = getDriver();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.