Package org.openqa.selenium.server.BrowserSessionFactory

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


        configuration.copySettingsIntoBrowserOptions(browserOptions);
       
        browserOptions.setSingleWindow(!multiWindow);
       
        BrowserLauncher launcher = getBrowserLauncher(browser, sessionId, configuration, browserOptions);
        BrowserSessionInfo sessionInfo = new BrowserSessionInfo(sessionId,
            browser, browserURL, launcher, null);
       
        remoteControl.registerBrowserSession(sessionInfo);
       
        // JB: -- aren't these URLs in the wrong order according to declaration?
View Full Code Here


            } else {
                String browser = values.get(0);
                String newSessionId = generateNewSessionId();
                BrowserLauncher simpleLauncher = browserLauncherFactory.getBrowserLauncher(browser, newSessionId, remoteControl.getConfiguration(), new BrowserConfigurationOptions());
                String baseUrl = "http://localhost:" + remoteControl.getPort();
                remoteControl.registerBrowserSession(new BrowserSessionInfo(
                    newSessionId, browser, baseUrl, simpleLauncher, null));
                simpleLauncher.launchHTMLSuite("TestPrompt.html?thisIsSeleniumServer=true", baseUrl);
                results = "OK";
            }
          break;
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

          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

        assertNull(result);
    }

    public void testRegisterValidExternalSession() {
        BrowserSessionFactory factory = getTestSessionFactory();
        BrowserSessionInfo info1 = getTestSession1();
        factory.registerExternalSession(info1);
        assertTrue(factory.hasActiveSession(info1.sessionId));
    }
View Full Code Here

        assertTrue(factory.hasActiveSession(info1.sessionId));
    }

    public void testRegisterInValidExternalSession() {
        BrowserSessionFactory factory = getTestSessionFactory();
        BrowserSessionInfo info = new BrowserSessionInfo(SESSION_ID_1, "*firefox",
                null, null, null);
        factory.registerExternalSession(info);
        assertFalse(factory.hasActiveSession(info.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.