Package org.openqa.selenium.server.browserlaunchers

Examples of org.openqa.selenium.server.browserlaunchers.DummyLauncher


    public void testBrowserSessionFactorySetsLastSessionIdOfSeleniumDriverResourceHandler() throws Exception {

        final RemoteControlConfiguration configuration;
       
        BrowserLauncherFactory blf = createMock(BrowserLauncherFactory.class);
        DummyLauncher launcherMock = createMock(DummyLauncher.class);
       
        configuration = new RemoteControlConfiguration();
        configuration.setTimeoutInSeconds(1);
       
        BrowserConfigurationOptions bco = new BrowserConfigurationOptions();
       
        BrowserSessionFactory factory = new BrowserSessionFactory(blf) {
          @Override
          protected FrameGroupCommandQueueSet makeQueueSet(String sessionId,
              int port, RemoteControlConfiguration configuration) {
            return createMock(FrameGroupCommandQueueSet.class);
          }
         
          @Override
          protected FrameGroupCommandQueueSet getQueueSet(String sessionId) {
            return createMock(FrameGroupCommandQueueSet.class);
          }
        };
       
        expect(blf.getBrowserLauncher(isA(String.class), isA(String.class),
                isA(RemoteControlConfiguration.class), isA(BrowserConfigurationOptions.class))).andReturn(launcherMock);
        launcherMock.launchRemoteSession("");
        expectLastCall().once();
        replay(launcherMock);
        replay(blf);
        factory.createNewRemoteSession("", "", "", bco, true, configuration);
        String expected = ((BrowserSessionInfo)(factory.activeSessions.toArray()[0])).sessionId;
View Full Code Here


        infos.add(info2);
        return infos;
    }

    private BrowserSessionInfo getTestSession1() {
        DummyLauncher mockLauncher1 = new DummyLauncher();
        return new BrowserSessionInfo(
                SESSION_ID_1, BROWSER_1, BASEURL1, mockLauncher1, null);
    }
View Full Code Here

        return new 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

    public void testBrowserSessionFactorySetsLastSessionIdOfSeleniumDriverResourceHandler() throws Exception {

        final RemoteControlConfiguration configuration;
       
        BrowserLauncherFactory blf = createMock(BrowserLauncherFactory.class);
        DummyLauncher launcherMock = createMock(DummyLauncher.class);
       
        configuration = new RemoteControlConfiguration();
        configuration.setTimeoutInSeconds(1);
       
        BrowserConfigurationOptions bco = new BrowserConfigurationOptions();
       
        BrowserSessionFactory factory = new BrowserSessionFactory(blf) {
          @Override
          protected FrameGroupCommandQueueSet makeQueueSet(String sessionId,
              int port, RemoteControlConfiguration configuration) {
            return createMock(FrameGroupCommandQueueSet.class);
          }
         
          @Override
          protected FrameGroupCommandQueueSet getQueueSet(String sessionId) {
            return createMock(FrameGroupCommandQueueSet.class);
          }
        };
       
        expect(blf.getBrowserLauncher(isA(String.class), isA(String.class), isA(RemoteControlConfiguration.class))).andReturn(launcherMock);
        launcherMock.launchRemoteSession("",true, bco);
        expectLastCall().once();
        replay(launcherMock);
        replay(blf);
        factory.createNewRemoteSession("", "", "", bco, true, configuration);
        String expected = ((BrowserSessionInfo)(factory.activeSessions.toArray()[0])).sessionId;
View Full Code Here

        infos.add(info2);
        return infos;
    }

    private BrowserSessionInfo getTestSession1() {
        DummyLauncher mockLauncher1 = new DummyLauncher();
        return new BrowserSessionInfo(
                SESSION_ID_1, BROWSER_1, BASEURL1, mockLauncher1, null);
    }
View Full Code Here

        return new 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

TOP

Related Classes of org.openqa.selenium.server.browserlaunchers.DummyLauncher

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.