Package io.appium.java_client.remote
Class AppiumCommandExecutor
java.lang.Object
org.openqa.selenium.remote.HttpCommandExecutor
io.appium.java_client.remote.AppiumCommandExecutor
- All Implemented Interfaces:
org.openqa.selenium.logging.NeedsLocalLogs,org.openqa.selenium.remote.CommandExecutor
@NullMarked
public class AppiumCommandExecutor
extends org.openqa.selenium.remote.HttpCommandExecutor
-
Field Summary
Fields inherited from class org.openqa.selenium.remote.HttpCommandExecutor
additionalCommands, client, commandCodec, httpClientFactory, responseCodec -
Constructor Summary
ConstructorsConstructorDescriptionAppiumCommandExecutor(Map<String, org.openqa.selenium.remote.CommandInfo> additionalCommands, @Nullable org.openqa.selenium.remote.service.DriverService service, @Nullable org.openqa.selenium.remote.http.HttpClient.Factory httpClientFactory, AppiumClientConfig appiumClientConfig) Create an AppiumCommandExecutor instance.AppiumCommandExecutor(Map<String, org.openqa.selenium.remote.CommandInfo> additionalCommands, AppiumClientConfig appiumClientConfig) AppiumCommandExecutor(Map<String, org.openqa.selenium.remote.CommandInfo> additionalCommands, URL addressOfRemoteServer) AppiumCommandExecutor(Map<String, org.openqa.selenium.remote.CommandInfo> additionalCommands, URL addressOfRemoteServer, @Nullable org.openqa.selenium.remote.http.HttpClient.Factory httpClientFactory) AppiumCommandExecutor(Map<String, org.openqa.selenium.remote.CommandInfo> additionalCommands, URL addressOfRemoteServer, AppiumClientConfig appiumClientConfig) AppiumCommandExecutor(Map<String, org.openqa.selenium.remote.CommandInfo> additionalCommands, org.openqa.selenium.remote.service.DriverService service) AppiumCommandExecutor(Map<String, org.openqa.selenium.remote.CommandInfo> additionalCommands, org.openqa.selenium.remote.service.DriverService service, @Nullable org.openqa.selenium.remote.http.HttpClient.Factory httpClientFactory) AppiumCommandExecutor(Map<String, org.openqa.selenium.remote.CommandInfo> additionalCommands, org.openqa.selenium.remote.service.DriverService service, AppiumClientConfig appiumClientConfig) -
Method Summary
Modifier and TypeMethodDescriptionvoiddefineCommand(String commandName, org.openqa.selenium.remote.CommandInfo info) org.openqa.selenium.remote.Responseexecute(org.openqa.selenium.remote.Command command) protected org.openqa.selenium.remote.http.HttpClientprotected @Nullable org.openqa.selenium.remote.CommandCodec<org.openqa.selenium.remote.http.HttpRequest>org.openqa.selenium.remote.http.HttpClient.Factoryprotected voidoverrideServerUrl(URL serverUrl) Override the http client in the HttpCommandExecutor class with a new http client instance with the given URL.voidvoidsetCommandCodec(org.openqa.selenium.remote.CommandCodec<org.openqa.selenium.remote.http.HttpRequest> newCodec) protected voidsetPrivateFieldValue(Class<? extends org.openqa.selenium.remote.CommandExecutor> cls, String fieldName, Object newValue) Deprecated.voidsetResponseCodec(org.openqa.selenium.remote.ResponseCodec<org.openqa.selenium.remote.http.HttpResponse> codec) Methods inherited from class org.openqa.selenium.remote.HttpCommandExecutor
addAdditionalCommand, getAddressOfRemoteServer, getDefaultClientFactory, setLocalLogs
-
Constructor Details
-
AppiumCommandExecutor
public AppiumCommandExecutor(Map<String, org.openqa.selenium.remote.CommandInfo> additionalCommands, @Nullable org.openqa.selenium.remote.service.DriverService service, @Nullable org.openqa.selenium.remote.http.HttpClient.Factory httpClientFactory, AppiumClientConfig appiumClientConfig) Create an AppiumCommandExecutor instance.- Parameters:
additionalCommands- is the map of Appium commandsservice- take a look atDriverServicehttpClientFactory- take a look atHttpClient.FactoryappiumClientConfig- take a look atAppiumClientConfig
-
AppiumCommandExecutor
-
AppiumCommandExecutor
-
AppiumCommandExecutor
public AppiumCommandExecutor(Map<String, org.openqa.selenium.remote.CommandInfo> additionalCommands, AppiumClientConfig appiumClientConfig) -
AppiumCommandExecutor
-
AppiumCommandExecutor
public AppiumCommandExecutor(Map<String, org.openqa.selenium.remote.CommandInfo> additionalCommands, URL addressOfRemoteServer, AppiumClientConfig appiumClientConfig) -
AppiumCommandExecutor
-
AppiumCommandExecutor
public AppiumCommandExecutor(Map<String, org.openqa.selenium.remote.CommandInfo> additionalCommands, org.openqa.selenium.remote.service.DriverService service, AppiumClientConfig appiumClientConfig)
-
-
Method Details
-
setPrivateFieldValue
@Deprecated protected void setPrivateFieldValue(Class<? extends org.openqa.selenium.remote.CommandExecutor> cls, String fieldName, Object newValue) Deprecated. -
getAdditionalCommands
- Overrides:
getAdditionalCommandsin classorg.openqa.selenium.remote.HttpCommandExecutor
-
getHttpClientFactory
public org.openqa.selenium.remote.http.HttpClient.Factory getHttpClientFactory() -
getCommandCodec
protected @Nullable org.openqa.selenium.remote.CommandCodec<org.openqa.selenium.remote.http.HttpRequest> getCommandCodec() -
setCommandCodec
public void setCommandCodec(org.openqa.selenium.remote.CommandCodec<org.openqa.selenium.remote.http.HttpRequest> newCodec) -
setResponseCodec
public void setResponseCodec(org.openqa.selenium.remote.ResponseCodec<org.openqa.selenium.remote.http.HttpResponse> codec) -
getClient
protected org.openqa.selenium.remote.http.HttpClient getClient() -
overrideServerUrl
Override the http client in the HttpCommandExecutor class with a new http client instance with the given URL. It uses the same http client factory and client config for the new http client instance if the constructor got them.- Parameters:
serverUrl- URL to use for subsequent HTTP requests. Before switching clients, the host is resolved and the override is refused if any resolved address is loopback, link-local (including IPv4 link-local such as metadata-service ranges), unspecified (0.0.0.0/::), or multicast. Private (RFC 1918), carrier-grade NAT (100.64.0.0/10), IPv6 unique-local (fc00::/7), and other non-special addresses are not rejected by this check.
-
refreshAdditionalCommands
public void refreshAdditionalCommands() -
defineCommand
- Overrides:
defineCommandin classorg.openqa.selenium.remote.HttpCommandExecutor
-
execute
public org.openqa.selenium.remote.Response execute(org.openqa.selenium.remote.Command command) throws org.openqa.selenium.WebDriverException - Specified by:
executein interfaceorg.openqa.selenium.remote.CommandExecutor- Overrides:
executein classorg.openqa.selenium.remote.HttpCommandExecutor- Throws:
org.openqa.selenium.WebDriverException
-