Package org.openqa.selenium.server.browserlaunchers

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


        return runHTMLSuite(browser, browserURL, suiteURL, outputFile,
                timeoutInSeconds, multiWindow, "info");
    }
   
    protected BrowserLauncher getBrowserLauncher(String browser, String sessionId, RemoteControlConfiguration configuration, BrowserConfigurationOptions browserOptions) {
      BrowserLauncherFactory blf = new BrowserLauncherFactory();
      return blf.getBrowserLauncher(browser, sessionId, configuration, browserOptions);
    }
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), isA(BrowserConfigurationOptions.class))).andReturn(launcherMock);
        launcherMock.launchRemoteSession("");
        expectLastCall().once();
        replay(launcherMock);
        replay(blf);
View Full Code Here

   
    public void testInvalidLauncherPreventsNewRemoteSessionCreationWithException() {
        final BrowserSessionFactory factory;
        final RemoteControlConfiguration configuration;

        factory = new BrowserSessionFactory(new BrowserLauncherFactory());
        configuration = new RemoteControlConfiguration();
        configuration.setTimeoutInSeconds(1);
        try {
          factory.createNewRemoteSession("*chrome invalid", "http://amazon.com", "", null, false, configuration);
          fail("Did not catch a RemoteCommandException when timing out on browser launch.");
View Full Code Here

    public void testBrowserIsAutomaticallyCloseWhenTimingOutOnBrowserLaunch() throws RemoteCommandException {
        final BrowserSessionFactory factory;
        final RemoteControlConfiguration configuration;
        final BrowserConfigurationOptions options = new BrowserConfigurationOptions();
       
        factory = new BrowserSessionFactory(new BrowserLauncherFactory());
        configuration = new RemoteControlConfiguration();
        configuration.setTimeoutInSeconds(1);
        try {
          factory.createNewRemoteSession("*chrome", "http://amazon.com", "", options, false, configuration);
          fail("Did not catch a RemoteCommandException when timing out on browser launch.");
View Full Code Here

        if (timeoutInMs < 0) {
            log.warn("Looks like the timeout overflowed, so resetting it to the maximum.");
            timeoutInMs = Long.MAX_VALUE;
        }
        server.handleHTMLRunnerResults(this);
        BrowserLauncherFactory blf = new BrowserLauncherFactory();
        String sessionId = Long.toString(System.currentTimeMillis() % 1000000);
        BrowserLauncher launcher = blf.getBrowserLauncher(browser, sessionId);
        BrowserSessionInfo sessionInfo = new BrowserSessionInfo(sessionId,
            browser, browserURL, launcher, null);
        server.registerBrowserSession(sessionInfo);
       
        // JB: -- aren't these URLs in the wrong order according to declaration?
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);
View Full Code Here

   
    public void testInvalidLauncherPreventsNewRemoteSessionCreationWithException() {
        final BrowserSessionFactory factory;
        final RemoteControlConfiguration configuration;

        factory = new BrowserSessionFactory(new BrowserLauncherFactory());
        configuration = new RemoteControlConfiguration();
        configuration.setTimeoutInSeconds(1);
        try {
          factory.createNewRemoteSession("*chrome invalid", "http://amazon.com", "", null, false, configuration);
          fail("Did not catch a RemoteCommandException when timing out on browser launch.");
View Full Code Here

    public void testBrowserIsAutomaticallyCloseWhenTimingOutOnBrowserLaunch() throws RemoteCommandException {
        final BrowserSessionFactory factory;
        final RemoteControlConfiguration configuration;

        factory = new BrowserSessionFactory(new BrowserLauncherFactory());
        configuration = new RemoteControlConfiguration();
        configuration.setTimeoutInSeconds(1);
        try {
          factory.createNewRemoteSession("*chrome", "http://amazon.com", "", null, false, configuration);
          fail("Did not catch a RemoteCommandException when timing out on browser launch.");
View Full Code Here

        if (timeoutInMs < 0) {
            log.warn("Looks like the timeout overflowed, so resetting it to the maximum.");
            timeoutInMs = Long.MAX_VALUE;
        }
        remoteControl.handleHTMLRunnerResults(this);
        BrowserLauncherFactory blf = new BrowserLauncherFactory();
        String sessionId = Long.toString(System.currentTimeMillis() % 1000000);
        BrowserLauncher launcher = blf.getBrowserLauncher(browser, sessionId, remoteControl.getConfiguration());
        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

        return runHTMLSuite(browser, browserURL, suiteURL, outputFile,
                timeoutInSeconds, multiWindow, "info");
    }
   
    protected BrowserLauncher getBrowserLauncher(String browser, String sessionId, RemoteControlConfiguration configuration, BrowserConfigurationOptions browserOptions) {
      BrowserLauncherFactory blf = new BrowserLauncherFactory();
      return blf.getBrowserLauncher(browser, sessionId, configuration, browserOptions);
    }
View Full Code Here

TOP

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

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.