org.openqa.selenium.chrome
Class ChromeCommandExecutor

java.lang.Object
  extended by org.openqa.selenium.chrome.ChromeCommandExecutor

public class ChromeCommandExecutor
extends java.lang.Object


Constructor Summary
ChromeCommandExecutor()
          Creates a new ChromeCommandExecutor which listens on a free TCP port.
ChromeCommandExecutor(int port)
          Creates a new ChromeCommandExecutor which listens on the passed TCP port.
 
Method Summary
 ChromeResponse execute(Command command)
          Executes the passed command
 int getPort()
          Returns the port being listened on
 void startListening()
          Starts listening for new socket connections from Chrome.
 void stopListening()
          Stops listening from for new sockets from Chrome
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChromeCommandExecutor

public ChromeCommandExecutor()
Creates a new ChromeCommandExecutor which listens on a free TCP port. Doesn't return until the TCP port is connected to.

Throws:
WebDriverException - if could not bind to any port

ChromeCommandExecutor

public ChromeCommandExecutor(int port)
Creates a new ChromeCommandExecutor which listens on the passed TCP port. Doesn't return until the TCP port is connected to.

Parameters:
port - port on which to listen for the initial connection, and dispatch commands
Throws:
WebDriverException - if could not bind to port
Method Detail

getPort

public int getPort()
Returns the port being listened on

Returns:
the port being listened on

execute

public ChromeResponse execute(Command command)
                       throws java.io.IOException
Executes the passed command

Parameters:
command - command to execute
Returns:
response to command
Throws:
java.lang.IllegalStateException - if no socket was present
java.io.IOException

startListening

public void startListening()
Starts listening for new socket connections from Chrome. Does not return until the TCP port is connected to.


stopListening

public void stopListening()
Stops listening from for new sockets from Chrome



Copyright © 2010. All Rights Reserved.