public SeleniumTestRCRunner(String host, int port, String browserType, String browserStartUrl) { browser = new HttpCommandProcessor(host, port, browserType, browserStartUrl); }
this.commandProcessor = new HttpCommandProcessor(serverHost, serverPort, browserStartCommand, browserURL);
HttpCommandProcessor proc; proc = new HttpCommandProcessor("localhost", 4444, "*iexplore", "http://google.com/"); Selenium selenium = new DefaultSelenium(proc); string[] inputParams = {"css=input.text", "Hello World"}; proc.DoCommand("doTypeRepeated", inputParams);
/** * <p><code> * | start browser | <i>firefox</i> | on url | <i>http://localhost</i> | using remote server on host | <i>localhost</i> | on port | <i>4444</i> | * </code></p> * * @param browser * @param browserUrl * @param serverHost * @param serverPort * @deprecated This call requires a Selenium 1 server. It is advised to use WebDriver. */ public void startBrowserOnUrlUsingRemoteServerOnHostOnPort(final String browser, final String browserUrl, final String serverHost, final int serverPort) { setCommandProcessor(new HttpCommandProcessorAdapter(new HttpCommandProcessor(serverHost, serverPort, browser, removeAnchorTag(browserUrl)))); commandProcessor.start(); setTimeoutOnSelenium(); LOG.debug("Started HTML command processor"); }
public void testCanStopTheSeleneseSessionEvenIfThereIsNoCurrentSession() { final HttpCommandProcessor processor; processor = new HttpCommandProcessor("a Server", 1234, "", "a url"); processor.stop(); }
public void testCanStopTheSeleneseSessionWhenASessionIsInProgress() { final HttpCommandProcessor processor; processor = new HttpCommandProcessor("a Server", 1234, "", "a url") { public String doCommand(String commandName, String[] args) { assertEquals("testComplete", commandName); assertNull(args); return null; } }; processor.setSessionInProgress("123456789"); processor.stop(); }
@Override public Selenium get() { if (commandProcessor == null) { require(serverHost, "Selenium server host"); require(port, "Selenium server port"); require(browser, "Browser command"); require(website, "Target website"); commandProcessor = new HttpCommandProcessor(serverHost, port, browser, website); } return new DefaultSelenium(commandProcessor); } };
proc = new HttpCommandProcessor("localhost", 4444, "*firefox",
/** * Instantiates a new ajax selenium. * * @param serverHost * the server host * @param serverPort * the server port * @param browser * the browser * @param contextPathURL * the context path url */ public AjaxSeleniumImpl(String serverHost, int serverPort, Browser browser, URL contextPathURL) { CommandProcessor commandProcessor = new HttpCommandProcessor(serverHost, serverPort, browser.inSeleniumRepresentation(), contextPathURL.toString()); interceptionProxy = new CommandInterceptorProxyImpl(commandProcessor); selenium = new ExtendedSelenium(interceptionProxy.getCommandProcessorProxy()); pageExtensions = new PageExtensionsImpl(); seleniumExtensions = new SeleniumExtensionsImpl(); requestInterceptor = new RequestGuardImpl(); }
CommandProcessor httpCommandProcessor = new HttpCommandProcessor("localhost", seleniumServer.getPort(), browserStartCommand, baseURL);