Package org.openqa.selenium.server.BrowserSessionFactory

Examples of org.openqa.selenium.server.BrowserSessionFactory.BrowserSessionInfo


                SESSION_ID_1, BROWSER_1, BASEURL1, mockLauncher1, null);
    }

    private BrowserSessionInfo getTestSession2() {
        DummyLauncher mockLauncher2 = new DummyLauncher();
        return new BrowserSessionInfo(
                SESSION_ID_2, BROWSER2, BASEURL2, mockLauncher2, null);
    }
View Full Code Here


          fail("RuntimeException was expected...");
        }
    }
   
    public void testIsValidWithInvalidSessionInfo() {
        BrowserSessionInfo info = new BrowserSessionInfo("id1", "*firefox",
                null, null, null);
        assertNotNull(info);
    }
View Full Code Here

    }

    public void testLookupByBrowserAndUrl() {
        BrowserSessionFactory factory = getTestSessionFactory();
        Set<BrowserSessionInfo> infos = getTestSessionSet();
        BrowserSessionInfo result = factory.lookupInfoByBrowserAndUrl(
                BROWSER_1, BASEURL1, infos);
        assertEquals(SESSION_ID_1, result.sessionId);
    }
View Full Code Here

    }

    public void testLookupByBrowserAndUrlWithNoMatch() {
        BrowserSessionFactory factory = getTestSessionFactory();
        Set<BrowserSessionInfo> infos = getTestSessionSet();
        BrowserSessionInfo result = factory.lookupInfoByBrowserAndUrl(
                BROWSER_1, "fooey", infos);
        assertNull(result);
    }
View Full Code Here

    }

    public void testLookupBySessionId() {
        BrowserSessionFactory factory = getTestSessionFactory();
        Set<BrowserSessionInfo> infos = getTestSessionSet();
        BrowserSessionInfo result = factory.lookupInfoBySessionId(
                SESSION_ID_2, infos);
        assertEquals(BASEURL2, result.baseUrl);
    }
View Full Code Here

    }

    public void testLookupBySessionIdWithNoMatch() {
        BrowserSessionFactory factory = getTestSessionFactory();
        Set<BrowserSessionInfo> infos = getTestSessionSet();
        BrowserSessionInfo result = factory.lookupInfoBySessionId(
                "fooey", infos);
        assertNull(result);
    }
View Full Code Here

            } else {
                String browser = values.get(0);
                String newSessionId = generateNewSessionId();
                BrowserLauncher simpleLauncher = browserLauncherFactory.getBrowserLauncher(browser, newSessionId, remoteControl.getConfiguration());
                String baseUrl = "http://localhost:" + remoteControl.getPort();
                remoteControl.registerBrowserSession(new BrowserSessionInfo(
                    newSessionId, browser, baseUrl, simpleLauncher, null));
                simpleLauncher.launchHTMLSuite("TestPrompt.html?thisIsSeleniumServer=true", baseUrl, false, "info");
                results = "OK";
            }
        } else if ("slowResources".equals(cmd)) {
View Full Code Here

    }

    protected String getNewBrowserSession(String browserString, String startURL, String extensionJs,
            BrowserConfigurationOptions browserConfigurations)
        throws RemoteCommandException {
        BrowserSessionInfo sessionInfo =  browserSessionFactory
            .getNewBrowserSession(browserString, startURL, extensionJs,
                    browserConfigurations, remoteControl.getConfiguration());
        setLastSessionId(sessionInfo.sessionId);
        return sessionInfo.sessionId;
    }
View Full Code Here

            } else {
                String browser = values.get(0);
                String newSessionId = generateNewSessionId();
                BrowserLauncher simpleLauncher = browserLauncherFactory.getBrowserLauncher(browser, newSessionId, remoteControl.getConfiguration());
                String baseUrl = "http://localhost:" + remoteControl.getPort();
                remoteControl.registerBrowserSession(new BrowserSessionInfo(
                    newSessionId, browser, baseUrl, simpleLauncher, null));
                simpleLauncher.launchHTMLSuite("TestPrompt.html?thisIsSeleniumServer=true", baseUrl, false, "info");
                results = "OK";
            }
        } else if ("slowResources".equals(cmd)) {
View Full Code Here

    }

    protected String getNewBrowserSession(String browserString, String startURL, String extensionJs,
            BrowserConfigurationOptions browserConfigurations)
        throws RemoteCommandException {
        BrowserSessionInfo sessionInfo =  browserSessionFactory
            .getNewBrowserSession(browserString, startURL, extensionJs,
                    browserConfigurations, remoteControl.getConfiguration());
        setLastSessionId(sessionInfo.sessionId);
        return sessionInfo.sessionId;
    }
View Full Code Here

TOP

Related Classes of org.openqa.selenium.server.BrowserSessionFactory.BrowserSessionInfo

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.