Package com.thoughtworks.selenium
Class HttpCommandProcessor
- java.lang.Object
 - 
- com.thoughtworks.selenium.HttpCommandProcessor
 
 
- 
- All Implemented Interfaces:
 CommandProcessor
@Deprecated public class HttpCommandProcessor extends java.lang.Object implements CommandProcessor
Deprecated.The RC interface will be removed in Selenium 3.0. Please migrate to using WebDriver.Sends commands and retrieves results via HTTP. 
- 
- 
Constructor Summary
Constructors Constructor Description HttpCommandProcessor(java.lang.String serverHost, int serverPort, java.lang.String browserStartCommand, java.lang.String browserURL)Deprecated.Specifies a server host/port, a command to launch the browser, and a starting URL for the browser.HttpCommandProcessor(java.lang.String pathToServlet, java.lang.String browserStartCommand, java.lang.String browserURL)Deprecated.Specifies the URL to the CommandBridge servlet, a command to launch the browser, and a starting URL for the browser. 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidcloseResources(java.net.HttpURLConnection conn, java.io.Writer wr, java.io.Reader rdr)Deprecated.java.lang.StringdoCommand(java.lang.String commandName, java.lang.String[] args)Deprecated.Send the specified remote command to the browser to be performedjava.lang.StringexecuteCommandOnServlet(java.lang.String command)Deprecated.Sends the specified command string to the bridge servletbooleangetBoolean(java.lang.String commandName, java.lang.String[] args)Deprecated.boolean[]getBooleanArray(java.lang.String commandName, java.lang.String[] args)Deprecated.protected java.lang.StringgetCommandResponseAsString(java.lang.String command)Deprecated.protected java.net.HttpURLConnectiongetHttpUrlConnection(java.net.URL urlForServlet)Deprecated.protected java.io.ReadergetInputStreamReader(java.net.HttpURLConnection conn)Deprecated.java.lang.NumbergetNumber(java.lang.String commandName, java.lang.String[] args)Deprecated.java.lang.Number[]getNumberArray(java.lang.String commandName, java.lang.String[] args)Deprecated.protected java.io.WritergetOutputStreamWriter(java.net.HttpURLConnection conn)Deprecated.java.lang.StringgetRemoteControlServerLocation()Deprecated.The URL that the RemoteControl instance is allegedly running onprotected intgetResponseCode(java.net.HttpURLConnection conn)Deprecated.java.lang.StringgetString(java.lang.String commandName, java.lang.String[] args)Deprecated.java.lang.String[]getStringArray(java.lang.String commandName, java.lang.String[] args)Deprecated.booleanhasSessionInProgress()Deprecated.static java.lang.String[]parseCSV(java.lang.String input)Deprecated.Convert backslash-escaped comma-delimited string into String array.voidsetExtensionJs(java.lang.String extensionJs)Deprecated.This should be invoked before start().protected voidsetSessionInProgress(java.lang.String result)Deprecated.voidstart()Deprecated.Starts a new Selenium testing sessionvoidstart(java.lang.Object optionsObject)Deprecated.Wraps the version of start() that takes a String parameter, sending it the result of calling toString() on optionsObject, which will likely be a BrowserConfigurationOptions instance.voidstart(java.lang.String optionsString)Deprecated.Starts a new Selenium testing session with a String, representing a configurationvoidstop()Deprecated.Ends the current Selenium testing session (normally killing the browser)protected java.lang.StringthrowAssertionFailureExceptionOrError(java.lang.String message)Deprecated. 
 - 
 
- 
- 
Constructor Detail
- 
HttpCommandProcessor
public HttpCommandProcessor(java.lang.String serverHost, int serverPort, java.lang.String browserStartCommand, java.lang.String browserURL)Deprecated.Specifies a server host/port, a command to launch the browser, and a starting URL for the browser.- Parameters:
 serverHost- - the host name on which the Selenium Server residesserverPort- - the port on which the Selenium Server is listeningbrowserStartCommand- - the command string used to launch the browser, e.g. "*firefox" or "c:\\program files\\internet explorer\\iexplore.exe"browserURL- - the starting URL including just a domain name. We'll start the browser pointing at the Selenium resources on this URL,
 
- 
HttpCommandProcessor
public HttpCommandProcessor(java.lang.String pathToServlet, java.lang.String browserStartCommand, java.lang.String browserURL)Deprecated.Specifies the URL to the CommandBridge servlet, a command to launch the browser, and a starting URL for the browser.- Parameters:
 pathToServlet- - the URL of the Selenium Server Driver, e.g. "http://localhost:4444/selenium-server/driver/" (don't forget the final slash!)browserStartCommand- - the command string used to launch the browser, e.g. "*firefox" or "c:\\program files\\internet explorer\\iexplore.exe"browserURL- - the starting URL including just a domain name. We'll start the browser pointing at the Selenium resources on this URL,
 
 - 
 
- 
Method Detail
- 
getRemoteControlServerLocation
public java.lang.String getRemoteControlServerLocation()
Deprecated.Description copied from interface:CommandProcessorThe URL that the RemoteControl instance is allegedly running on- Specified by:
 getRemoteControlServerLocationin interfaceCommandProcessor- Returns:
 - the URL
 
 
- 
doCommand
public java.lang.String doCommand(java.lang.String commandName, java.lang.String[] args)Deprecated.Description copied from interface:CommandProcessorSend the specified remote command to the browser to be performed- Specified by:
 doCommandin interfaceCommandProcessor- Parameters:
 commandName- - the remote command verbargs- - the arguments to the remote command (depends on the verb)- Returns:
 - - the command result, defined by the remote JavaScript. "getX" style commands may return data from the browser; other "doX" style commands may just return "OK" or an error message.
 
 
- 
throwAssertionFailureExceptionOrError
protected java.lang.String throwAssertionFailureExceptionOrError(java.lang.String message)
Deprecated. 
- 
executeCommandOnServlet
public java.lang.String executeCommandOnServlet(java.lang.String command)
Deprecated.Sends the specified command string to the bridge servlet- Parameters:
 command- command to execute- Returns:
 - response from the command execution
 
 
- 
getHttpUrlConnection
protected java.net.HttpURLConnection getHttpUrlConnection(java.net.URL urlForServlet) throws java.io.IOExceptionDeprecated.- Throws:
 java.io.IOException
 
- 
getOutputStreamWriter
protected java.io.Writer getOutputStreamWriter(java.net.HttpURLConnection conn) throws java.io.IOExceptionDeprecated.- Throws:
 java.io.IOException
 
- 
getInputStreamReader
protected java.io.Reader getInputStreamReader(java.net.HttpURLConnection conn) throws java.io.IOExceptionDeprecated.- Throws:
 java.io.IOException
 
- 
getResponseCode
protected int getResponseCode(java.net.HttpURLConnection conn) throws java.io.IOExceptionDeprecated.- Throws:
 java.io.IOException
 
- 
getCommandResponseAsString
protected java.lang.String getCommandResponseAsString(java.lang.String command) throws java.io.IOExceptionDeprecated.- Throws:
 java.io.IOException
 
- 
closeResources
protected void closeResources(java.net.HttpURLConnection conn, java.io.Writer wr, java.io.Reader rdr)Deprecated. 
- 
setExtensionJs
public void setExtensionJs(java.lang.String extensionJs)
Deprecated.This should be invoked before start().- Specified by:
 setExtensionJsin interfaceCommandProcessor- Parameters:
 extensionJs- the extra extension Javascript to include in this browser session.
 
- 
start
public void start()
Deprecated.Description copied from interface:CommandProcessorStarts a new Selenium testing session- Specified by:
 startin interfaceCommandProcessor
 
- 
start
public void start(java.lang.String optionsString)
Deprecated.Description copied from interface:CommandProcessorStarts a new Selenium testing session with a String, representing a configuration- Specified by:
 startin interfaceCommandProcessor- Parameters:
 optionsString- option string
 
- 
start
public void start(java.lang.Object optionsObject)
Deprecated.Wraps the version of start() that takes a String parameter, sending it the result of calling toString() on optionsObject, which will likely be a BrowserConfigurationOptions instance.- Specified by:
 startin interfaceCommandProcessor- Parameters:
 optionsObject- start options
 
- 
setSessionInProgress
protected void setSessionInProgress(java.lang.String result)
Deprecated. 
- 
stop
public void stop()
Deprecated.Description copied from interface:CommandProcessorEnds the current Selenium testing session (normally killing the browser)- Specified by:
 stopin interfaceCommandProcessor
 
- 
hasSessionInProgress
public boolean hasSessionInProgress()
Deprecated. 
- 
getString
public java.lang.String getString(java.lang.String commandName, java.lang.String[] args)Deprecated.- Specified by:
 getStringin interfaceCommandProcessor
 
- 
getStringArray
public java.lang.String[] getStringArray(java.lang.String commandName, java.lang.String[] args)Deprecated.- Specified by:
 getStringArrayin interfaceCommandProcessor
 
- 
parseCSV
public static java.lang.String[] parseCSV(java.lang.String input)
Deprecated.Convert backslash-escaped comma-delimited string into String array. As described in SRC-CDP spec section 5.2.1.2, these strings are comma-delimited, but commas can be escaped with a backslash "\". Backslashes can also be escaped as a double-backslash.- Parameters:
 input- the unparsed string, e.g. "veni\, vidi\, vici,c:\\foo\\bar,c:\\I came\, I \\saw\\\, I conquered"- Returns:
 - the string array resulting from parsing this string
 
 
- 
getNumber
public java.lang.Number getNumber(java.lang.String commandName, java.lang.String[] args)Deprecated.- Specified by:
 getNumberin interfaceCommandProcessor
 
- 
getNumberArray
public java.lang.Number[] getNumberArray(java.lang.String commandName, java.lang.String[] args)Deprecated.- Specified by:
 getNumberArrayin interfaceCommandProcessor
 
- 
getBoolean
public boolean getBoolean(java.lang.String commandName, java.lang.String[] args)Deprecated.- Specified by:
 getBooleanin interfaceCommandProcessor
 
- 
getBooleanArray
public boolean[] getBooleanArray(java.lang.String commandName, java.lang.String[] args)Deprecated.- Specified by:
 getBooleanArrayin interfaceCommandProcessor
 
 - 
 
 -