Class HttpCommandExecutor

java.lang.Object
org.openqa.selenium.remote.HttpCommandExecutor
All Implemented Interfaces:
NeedsLocalLogs, CommandExecutor
Direct Known Subclasses:
DriverCommandExecutor

public class HttpCommandExecutor extends Object implements CommandExecutor, NeedsLocalLogs
  • Constructor Details

    • HttpCommandExecutor

      public HttpCommandExecutor(URL addressOfRemoteServer)
    • HttpCommandExecutor

      public HttpCommandExecutor(ClientConfig config)
    • HttpCommandExecutor

      public HttpCommandExecutor(Map<String,CommandInfo> additionalCommands, URL addressOfRemoteServer)
      Creates an HttpCommandExecutor that supports non-standard additionalCommands in addition to the standard.
      Parameters:
      additionalCommands - additional commands to allow the command executor to process
      addressOfRemoteServer - URL of remote end Selenium server
    • HttpCommandExecutor

      public HttpCommandExecutor(Map<String,CommandInfo> additionalCommands, URL addressOfRemoteServer, ClientConfig config)
    • HttpCommandExecutor

      public HttpCommandExecutor(Map<String,CommandInfo> additionalCommands, URL addressOfRemoteServer, HttpClient.Factory httpClientFactory)
    • HttpCommandExecutor

      public HttpCommandExecutor(Map<String,CommandInfo> additionalCommands, ClientConfig config, HttpClient.Factory httpClientFactory)
  • Method Details

    • getDefaultClientFactory

      public static HttpClient.Factory getDefaultClientFactory()
    • defineCommand

      protected void defineCommand(String commandName, CommandInfo info)
      It may be useful to extend the commands understood by this HttpCommandExecutor at run time, and this can be achieved via this method. Note, this is protected, and expected usage is for subclasses only to call this.
      Parameters:
      commandName - The name of the command to use.
      info - CommandInfo for the command name provided
    • setLocalLogs

      public void setLocalLogs(LocalLogs logs)
      Specified by:
      setLocalLogs in interface NeedsLocalLogs
    • getAddressOfRemoteServer

      public URL getAddressOfRemoteServer()
    • execute

      public Response execute(Command command) throws IOException
      Specified by:
      execute in interface CommandExecutor
      Throws:
      IOException