Package org.openqa.selenium.WebDriver

Examples of org.openqa.selenium.WebDriver.Options


    public void test_webDriver_methods_which_should_not_return_proxy() {
        IsNotProxyable isNotProxyable = new IsNotProxyable();

        // when
        WebDriver driver = Mockito.mock(WebDriver.class, isNotProxyable);
        Options options = mock(Options.class, isNotProxyable);
        Navigation navigation = mock(Navigation.class, isNotProxyable);
        ImeHandler ime = mock(ImeHandler.class, isNotProxyable);
        Logs logs = mock(Logs.class, isNotProxyable);

        // then
        try {
            driver.toString();
            driver.close();
            driver.equals(new Object());
            driver.get("");
            driver.getClass();
            driver.getCurrentUrl();
            driver.getPageSource();
            driver.getTitle();
            driver.getWindowHandle();
            driver.hashCode();
            driver.quit();
            driver.toString();

            options.addCookie(mock(Cookie.class));
            options.deleteAllCookies();
            options.deleteCookie(mock(Cookie.class));
            options.deleteCookieNamed("");
            options.getCookieNamed("");

            navigation.back();
            navigation.forward();
            navigation.to("");
            navigation.to(new URL("http://localhost/"));
View Full Code Here


    public void test_webDriver_methods_which_should_return_proxy() {
        IsProxyable isProxyable = new IsProxyable();

        // when
        WebDriver driver = Mockito.mock(WebDriver.class, isProxyable);
        Options options = mock(Options.class, isProxyable);
        TargetLocator targetLocator = mock(TargetLocator.class, isProxyable);
        ImeHandler ime = mock(ImeHandler.class, isProxyable);
        Timeouts timeouts = mock(Timeouts.class, isProxyable);

        // then
        try {
            driver.manage();
            driver.navigate();
            driver.switchTo();
            driver.findElement(By.className(""));
            driver.findElements(By.className(""));
            driver.getWindowHandles();

            options.ime();
            options.logs();
            options.timeouts();
            options.window();
            options.getCookies();

            targetLocator.activeElement();
            targetLocator.alert();
            targetLocator.defaultContent();
            targetLocator.frame(0);
View Full Code Here

TOP

Related Classes of org.openqa.selenium.WebDriver.Options

Copyright © 2018 www.massapicom. 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.