org.openqa.selenium.chrome
Class ChromeCommandExecutor

java.lang.Object
  extended by org.openqa.selenium.chrome.ChromeCommandExecutor
All Implemented Interfaces:
CommandExecutor

public class ChromeCommandExecutor
extends java.lang.Object
implements CommandExecutor


Constructor Summary
ChromeCommandExecutor(ChromeBinary binary)
          Creates a new ChromeCommandExecutor which listens on a free TCP port.
 
Method Summary
 Response execute(Command command)
          Executes the passed command
 ChromeBinary getBinary()
           
 int getPort()
          Returns the port being listened on
 void start()
          Starts a new instanceof Chrome and waits for a TCP port connection from it.
 void stop()
          Shuts down Chrome and stops listening for new socket connections.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChromeCommandExecutor

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

Parameters:
binary - The binary to use when starting a new Chrome instance.
Method Detail

getBinary

public ChromeBinary getBinary()

getPort

public int getPort()
Returns the port being listened on

Returns:
the port being listened on

execute

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

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

start

public void start()
Starts a new instanceof Chrome and waits for a TCP port connection from it.


stop

public void stop()
Shuts down Chrome and stops listening for new socket connections.



Copyright © 2010. All Rights Reserved.