Package org.openqa.selenium.server

Examples of org.openqa.selenium.server.RemoteControlConfiguration


* {@link FirefoxChromeLauncher} integration test class.
*/
public class FirefoxChromeLauncherIntegrationTest extends LauncherFunctionalTestCase {

    public void testLauncherWithDefaultConfiguration() throws Exception {
        launchBrowser(new FirefoxChromeLauncher(new RemoteControlConfiguration(), "CUSTFFCHROME"));
    }
View Full Code Here


    public void testLauncherWithDefaultConfiguration() throws Exception {
        launchBrowser(new FirefoxChromeLauncher(new RemoteControlConfiguration(), "CUSTFFCHROME"));
    }

    public void testLaunchTwoBrowsersInARowWithDefaultConfiguration() throws Exception {
        final RemoteControlConfiguration configuration = new RemoteControlConfiguration();

        launchBrowser(new FirefoxChromeLauncher(configuration, "CUSTFFCHROME"));
        launchBrowser(new FirefoxChromeLauncher(configuration, "CUSTFFCHROME"));
    }
View Full Code Here

* {@link org.openqa.selenium.server.browserlaunchers.AbstractBrowserLauncher} unit test class.
*/
public class AbstractBrowserLauncherUnitTest extends TestCase {

    public void testGetConfigurationReturnsConfigurationProvidedInConstructor() {
        final RemoteControlConfiguration theConfiguration;

        theConfiguration = new RemoteControlConfiguration();
        AbstractBrowserLauncher launcher = new AbstractBrowserLauncher(null, theConfiguration) {
            protected void launch(String url) {
                throw new UnsupportedOperationException("Should never be called");
            }

View Full Code Here

    private static final int WAIT_TIME = 15 * SECONDS;

    public void testLauncherWithDefaultConfiguration() throws Exception {
        final SafariCustomProfileLauncher launcher;

        launcher = new SafariCustomProfileLauncher(new RemoteControlConfiguration(), "CUST");
        launcher.launch("http://www.google.com");
        int seconds = 15;
        LOGGER.info("Killing browser in " + Integer.toString(seconds) + " seconds");
        AsyncExecute.sleepTight(WAIT_TIME);
        launcher.close();
View Full Code Here

        LOGGER.info("He's dead now, right?");
    }

    public void testLauncherWithHonorSystemProxyEnabled() throws Exception {
        final SafariCustomProfileLauncher launcher;
        final RemoteControlConfiguration configuration;

        configuration = new RemoteControlConfiguration();
        configuration.setHonorSystemProxy(true);
       
        launcher = new SafariCustomProfileLauncher(configuration, "CUST");
        launcher.launch("http://www.google.com");
        int seconds = 15;
        LOGGER.info("Killing browser in " + Integer.toString(seconds) + " seconds");
View Full Code Here

* {@link SafariCustomProfileLauncher} integration test class.
*/
public class SafariCustomProfileLauncherFunctionalTest extends LauncherFunctionalTestCase {

    public void testLauncherWithDefaultConfiguration() throws Exception {
        launchBrowser(new SafariCustomProfileLauncher(new RemoteControlConfiguration(), "CUST"));
    }
View Full Code Here

    public void testLauncherWithDefaultConfiguration() throws Exception {
        launchBrowser(new SafariCustomProfileLauncher(new RemoteControlConfiguration(), "CUST"));
    }

    public void testLauncherWithHonorSystemProxyEnabled() throws Exception {
        final RemoteControlConfiguration configuration;

        configuration = new RemoteControlConfiguration();
        configuration.setHonorSystemProxy(true);
        launchBrowser(new SafariCustomProfileLauncher(configuration, "CUST"));
    }
View Full Code Here

        configuration.setHonorSystemProxy(true);
        launchBrowser(new SafariCustomProfileLauncher(configuration, "CUST"));
    }

    public void testLaunchTwoBrowsersInARowWithDefaultConfiguration() throws Exception {
        final RemoteControlConfiguration configuration = new RemoteControlConfiguration();

        launchBrowser(new SafariCustomProfileLauncher(configuration, "CUST"));
        launchBrowser(new SafariCustomProfileLauncher(configuration, "CUST"));
    }
View Full Code Here

            throw new RuntimeException("Unable to start Selenium Server", e);
        }
    }

    private RemoteControlConfiguration configure(SeleniumServerConfiguration configuration) {
        RemoteControlConfiguration rcc = new RemoteControlConfiguration();

        rcc.setAvoidProxy(configuration.isAvoidProxy());
        rcc.setBrowserSideLogEnabled(configuration.isBrowserSideLog());
        rcc.setDebugMode(configuration.isDebug());
        rcc.setDontTouchLogging(configuration.isDontTouchLogging());
        SecurityActions.setProperty("selenium.loglevel", configuration.isDebug() ? "DEBUG" : "INFO");

        rcc.setEnsureCleanSession(configuration.isEnsureCleanSession());

        // set firefox profile
        String ffProfile = configuration.getFirefoxProfileTemplate();
        if (Validate.isNotNullOrEmpty(ffProfile)) {
            Validate.isValidFile(ffProfile, "Firefox profile must point to a readable directory: " + ffProfile);
            rcc.setFirefoxProfileTemplate(new File(ffProfile));
        }

        // force browser type
        String forcedMode = configuration.getForcedBrowserMode();
        if (Validate.isNotNullOrEmpty(forcedMode)) {
            rcc.setForcedBrowserMode(forcedMode);
        }

        rcc.setHonorSystemProxy(configuration.isHonorSystemProxy());

        // log file
        String logFile = configuration.getLogFile();
        if (Validate.isNotNullOrEmpty(logFile)) {
            Validate.isInReadableDirectory(logFile, "Log file cannot be created: " + logFile);
            rcc.setLogOutFile(new File(logFile));
        }

        rcc.setPort(configuration.getPort());

        // set profile location
        String profiles = configuration.getProfilesLocation();
        if (Validate.isNotNullOrEmpty(profiles)) {
            Validate.isValidFile(profiles, "Profiles location must point to a readable directory: " + profiles);
            rcc.setProfilesLocation(new File(profiles));
        }

        rcc.setProxyInjectionModeArg(configuration.isProxyInjectionMode());
        rcc.setReuseBrowserSessions(configuration.isBrowserSessionReuse());
        rcc.setRetryTimeoutInSeconds(configuration.getRetryTimeoutInSeconds());
        rcc.setSingleWindow(configuration.isSingleWindow());
        rcc.setTimeoutInSeconds(configuration.getTimeoutInSeconds());
        rcc.setTrustAllSSLCertificates(configuration.isTrustAllSSLCertificates());

        String userExtensions = configuration.getUserExtensions();
        if (Validate.isNotNullOrEmpty(userExtensions)) {
            Validate.isValidFile(userExtensions, "User extensions must point to a valid file");
            rcc.setUserExtensions(new File(userExtensions));
        }

        return rcc;
    }
View Full Code Here

    public Process getProcess() {
        return process;
    }

    public static void main(String[] args) {
        InternetExplorerCustomProxyLauncher l = new InternetExplorerCustomProxyLauncher(new RemoteControlConfiguration(), "CUSTIE");
        l.launch("http://www.google.com/");
        int seconds = 5;
        System.out.println("Killing browser in " + Integer.toString(seconds) + " seconds");
        AsyncExecute.sleepTight(seconds * 1000);
        l.close();
View Full Code Here

TOP

Related Classes of org.openqa.selenium.server.RemoteControlConfiguration

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.