Package org.openqa.selenium.server

Examples of org.openqa.selenium.server.SeleniumServer


    @BeforeClass(alwaysRun = true)
    public void setup() throws Exception
    {
        _jettyRunner = new JettyRunner("/", JETTY_PORT, _webappRoot);

        _server = new SeleniumServer();

        _server.start();

        CommandProcessor cp = new HttpCommandProcessor("localhost", SeleniumServer.DEFAULT_PORT,
                "*firefox", BASE_URL);
View Full Code Here


        if (args.length == 0) {
            throw new IllegalArgumentException("Please pass a directory argument on the command line");
        }
        File dir = new File(args[0]);
        dir.mkdirs();
        SeleniumServer server = new SeleniumServer();
        boolean result = false;
        try {
            server.start();
            result = new HTMLLauncher(server).runSelfTests(dir);
        } finally {
            server.stop();
        }
        return result ? 0 : 1;
    }
View Full Code Here

                "  browserStart: " + browserStartCommand + sep +
                "       baseURL: " + baseURL);

        final Runnable stopWebServer = launchWebServer(container, webAppFolder, contextPath, port, sslPort);

        final SeleniumServer seleniumServer = new SeleniumServer();

        File ffProfileTemplate = new File(TapestryRunnerConstants.MODULE_BASE_DIR, "src/test/conf/ff_profile_template");

        if (ffProfileTemplate.isDirectory())
        {
            seleniumServer.getConfiguration().setFirefoxProfileTemplate(ffProfileTemplate);
        }

        seleniumServer.start();


        CommandProcessor httpCommandProcessor = new HttpCommandProcessor("localhost",
                seleniumServer.getPort(), browserStartCommand, baseURL);

        final ErrorReporterImpl errorReporter = new ErrorReporterImpl(httpCommandProcessor, testContext);

        ErrorReportingCommandProcessor commandProcessor = new ErrorReportingCommandProcessor(httpCommandProcessor,
                errorReporter);

        final Selenium selenium = new DefaultSelenium(commandProcessor);

        selenium.start();

        testContext.setAttribute(TapestryTestConstants.BASE_URL_ATTRIBUTE, baseURL);
        testContext.setAttribute(TapestryTestConstants.SELENIUM_ATTRIBUTE, selenium);
        testContext.setAttribute(TapestryTestConstants.ERROR_REPORTER_ATTRIBUTE, errorReporter);
        testContext.setAttribute(TapestryTestConstants.COMMAND_PROCESSOR_ATTRIBUTE, commandProcessor);

        testContext.setAttribute(TapestryTestConstants.SHUTDOWN_ATTRIBUTE, new Runnable()
        {
            public void run()
            {
                try
                {
                    LOGGER.info("Shutting down selenium client ...");

                    try
                    {
                        selenium.stop();
                    } catch (RuntimeException e)
                    {
                        LOGGER.error("Selenium client shutdown failure.", e);
                    }

                    LOGGER.info("Shutting down selenium server ...");

                    try
                    {
                        seleniumServer.stop();
                    } catch (RuntimeException e)
                    {
                        LOGGER.error("Selenium server shutdown failure.", e);
                    }
View Full Code Here

        if (configuration == null || configuration.isSkip()) {
            return;
        }

        try {
            SeleniumServer server = new SeleniumServer(configure(configuration));
            SystemEnvHolder sysEnv = new SystemEnvHolder();
            sysEnv.modifyEnvBy(configuration);
            server.boot();
            sysEnv.restore();

            seleniumServer.set(server);
            afterStart.fire(new SeleniumServerStarted());
        } catch (Exception e) {
View Full Code Here

    @BeforeClass
    public static void setUp() throws Exception {
        System.out.println("*** Starting selenium ... ***");
        RemoteControlConfiguration seleniumConfig = new RemoteControlConfiguration();
        seleniumConfig.setPort(4444);
        seleniumServer = new SeleniumServer(seleniumConfig);
        seleniumServer.start();

        String host = System.getProperty("myParam", "localhost");
        selenium = createSeleniumClient("http://" + host + ":" + "8080/client/");
        selenium.start();
View Full Code Here

    @BeforeClass
    public void startupBackground() throws Exception
    {
        _jettyRunner = new JettyRunner("/", JETTY_PORT, "src/test-data/i18n");
       
        _server = new SeleniumServer();

        _server.start();

        _selenium = new DefaultSelenium("localhost", SeleniumServer.DEFAULT_PORT, "*firefox",
                BASE_URL);
View Full Code Here

    @BeforeClass
    public void startupBackground() throws Exception
    {
        _jettyRunner = new JettyRunner("/", JETTY_PORT, "src/test-data/app1");

        _server = new SeleniumServer();

        _server.start();

        _selenium = new DefaultSelenium("localhost", SeleniumServer.DEFAULT_PORT, "*firefox",
                BASE_URL);
View Full Code Here

    @BeforeClass
    public void startupBackground() throws Exception
    {
        _jettyRunner = new JettyRunner("/", JETTY_PORT, "src/test-data/app1");

        _server = new SeleniumServer();
       
        _server.start();

        _selenium = new DefaultSelenium("localhost", SeleniumServer.DEFAULT_PORT, "*firefox", BASE_URL);

View Full Code Here

    @BeforeClass
    public void startupBackground() throws Exception
    {
        _jettyRunner = new JettyRunner("/", JETTY_PORT, "src/test/app1");

        _server = new SeleniumServer();

        _server.start();

        _selenium = new DefaultSelenium("localhost", SeleniumServer.DEFAULT_PORT, "*firefox",
                BASE_URL);
View Full Code Here

    public void run() throws Exception {
        try {
            BrowserLauncherFactory.addBrowserLauncher("EclipseBrowser", EclipseBrowserLauncher.class);
            SeleniumServer.setDebugMode (true);
            server = new SeleniumServer();
            server.start();
        } catch (Throwable th) {
            th.printStackTrace();
            Exception e = new Exception("unable to start Selenium server");
            e.initCause(th);
View Full Code Here

TOP

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

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.