org.openqa.selenium.remote.service
Class DriverCommandExecutor

java.lang.Object
  extended by org.openqa.selenium.remote.HttpCommandExecutor
      extended by org.openqa.selenium.remote.service.DriverCommandExecutor
All Implemented Interfaces:
NeedsLocalLogs, CommandExecutor

public class DriverCommandExecutor
extends HttpCommandExecutor

A specialized HttpCommandExecutor that will use a DriverService that lives and dies with a single WebDriver session. The service will be restarted upon each new session request and shutdown after each quit command.


Constructor Summary
DriverCommandExecutor(DriverService service)
          Creates a new DriverCommandExecutor which will communicate with the driver as configured by the given service.
 
Method Summary
 Response execute(Command command)
          Sends the command to the driver server for execution.
 
Methods inherited from class org.openqa.selenium.remote.HttpCommandExecutor
getAddressOfRemoteServer, getSessionId, setLocalLogs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DriverCommandExecutor

public DriverCommandExecutor(DriverService service)
Creates a new DriverCommandExecutor which will communicate with the driver as configured by the given service.

Parameters:
service - The DriverService to send commands to.
Method Detail

execute

public Response execute(Command command)
                 throws IOException
Sends the command to the driver server for execution. The server will be started if requesting a new session. Likewise, if terminating a session, the server will be shutdown once a response is received.

Specified by:
execute in interface CommandExecutor
Overrides:
execute in class HttpCommandExecutor
Parameters:
command - The command to execute.
Returns:
The command response.
Throws:
IOException - If an I/O error occurs while sending the command.


Copyright © 2012. All Rights Reserved.