Package org.openqa.selenium.remote
Class HttpCommandExecutor
java.lang.Object
org.openqa.selenium.remote.HttpCommandExecutor
- All Implemented Interfaces:
org.openqa.selenium.logging.NeedsLocalLogs
,CommandExecutor
- Direct Known Subclasses:
DriverCommandExecutor
public class HttpCommandExecutor
extends Object
implements CommandExecutor, org.openqa.selenium.logging.NeedsLocalLogs
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal org.openqa.selenium.remote.http.HttpClient
protected CommandCodec<org.openqa.selenium.remote.http.HttpRequest>
protected ResponseCodec<org.openqa.selenium.remote.http.HttpResponse>
-
Constructor Summary
ConstructorsConstructorDescriptionHttpCommandExecutor
(URL addressOfRemoteServer) HttpCommandExecutor
(Map<String, CommandInfo> additionalCommands, URL addressOfRemoteServer) Creates anHttpCommandExecutor
that supports non-standardadditionalCommands
in addition to the standard.HttpCommandExecutor
(Map<String, CommandInfo> additionalCommands, URL addressOfRemoteServer, org.openqa.selenium.remote.http.ClientConfig config) HttpCommandExecutor
(Map<String, CommandInfo> additionalCommands, URL addressOfRemoteServer, org.openqa.selenium.remote.http.HttpClient.Factory httpClientFactory) HttpCommandExecutor
(Map<String, CommandInfo> additionalCommands, org.openqa.selenium.remote.http.ClientConfig config, org.openqa.selenium.remote.http.HttpClient.Factory httpClientFactory) HttpCommandExecutor
(org.openqa.selenium.remote.http.ClientConfig config) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addAdditionalCommand
(String commandName, CommandInfo info) Adds or updates additional commands.protected void
defineCommand
(String commandName, CommandInfo info) It may be useful to extend the commands understood by thisHttpCommandExecutor
at run time, and this can be achieved via this method.Returns an immutable view of the additional commands.static org.openqa.selenium.remote.http.HttpClient.Factory
void
setLocalLogs
(org.openqa.selenium.logging.LocalLogs logs)
-
Field Details
-
client
public final org.openqa.selenium.remote.http.HttpClient client -
commandCodec
-
responseCodec
-
-
Constructor Details
-
HttpCommandExecutor
-
HttpCommandExecutor
public HttpCommandExecutor(org.openqa.selenium.remote.http.ClientConfig config) -
HttpCommandExecutor
Creates anHttpCommandExecutor
that supports non-standardadditionalCommands
in addition to the standard.- Parameters:
additionalCommands
- additional commands to allow the command executor to processaddressOfRemoteServer
- URL of remote end Selenium server
-
HttpCommandExecutor
public HttpCommandExecutor(Map<String, CommandInfo> additionalCommands, URL addressOfRemoteServer, org.openqa.selenium.remote.http.ClientConfig config) -
HttpCommandExecutor
public HttpCommandExecutor(Map<String, CommandInfo> additionalCommands, URL addressOfRemoteServer, org.openqa.selenium.remote.http.HttpClient.Factory httpClientFactory) -
HttpCommandExecutor
public HttpCommandExecutor(Map<String, CommandInfo> additionalCommands, org.openqa.selenium.remote.http.ClientConfig config, org.openqa.selenium.remote.http.HttpClient.Factory httpClientFactory)
-
-
Method Details
-
getDefaultClientFactory
public static org.openqa.selenium.remote.http.HttpClient.Factory getDefaultClientFactory() -
getAdditionalCommands
Returns an immutable view of the additional commands.- Returns:
- an unmodifiable map of additional commands.
-
addAdditionalCommand
Adds or updates additional commands. This method is protected to allow subclasses to define their commands.- Parameters:
commandName
- the name of the command to add or update.info
- the CommandInfo for the command.
-
defineCommand
It may be useful to extend the commands understood by thisHttpCommandExecutor
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(org.openqa.selenium.logging.LocalLogs logs) - Specified by:
setLocalLogs
in interfaceorg.openqa.selenium.logging.NeedsLocalLogs
-
getAddressOfRemoteServer
-
execute
- Specified by:
execute
in interfaceCommandExecutor
- Throws:
IOException
-