private void start() throws Exception { RemoteControlConfiguration config = new RemoteControlConfiguration(); int seleniumPort = getFreePort(); LOG.debug("configured selenium port: " + seleniumPort); config.setPort(seleniumPort); this.seleniumServer = new SeleniumServer(config); this.seleniumServer.start(); // int seleniumPort = this.seleniumServer.getPort(); LOG.debug("selenium port: " + this.seleniumServer.getPort()); String browserStartCommand = "*firefox"; this.selenium = new DefaultSelenium("localhost", seleniumPort, browserStartCommand, "http://www.google.be"); LOG.debug("starting selenium..."); this.selenium.start(); LOG.debug("selenium started."); this.selenium.setBrowserLogLevel(SeleniumLogLevels.INFO); }
@Override protected void setUp() throws Exception { super.setUp(); RemoteControlConfiguration configuration = new RemoteControlConfiguration(); configuration.setPort(4433); seleniumServer = new SeleniumServer(configuration); seleniumServer.start(); }
private static void startSeleniumServer() throws Exception { if (isWebDriverLocal()) { try { ServerSocket serverSocket = new ServerSocket(RemoteControlConfiguration.DEFAULT_PORT); serverSocket.close(); seleniumServer = new SeleniumServer(); seleniumServer.boot(); seleniumServer.start(); } catch (BindException e) { System.out.println("Selenium server already up, will reuse..."); } } }
protected static void startJettyProxy(int port) throws Exception { RemoteControlConfiguration config = new RemoteControlConfiguration(); config.setPort(port); config.setEnsureCleanSession(true); jettyProxyInstance = new SeleniumServer(config); jettyProxyInstance.start(); }
public void startServer() throws Exception { RemoteControlConfiguration configuration = new RemoteControlConfiguration(); configuration.setProxyInjectionModeArg(true); configuration.setPort(4444); remoteControl = new SeleniumServer(configuration); remoteControl.start(); }
@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(); System.out.println("*** Started selenium ***"); }
private RemoteControlConfiguration getRemoteControlConfiguration() { RemoteControlConfiguration configuration = new RemoteControlConfiguration(); configuration.setPort(4343); return configuration; }