Class CommandTimeouts
- java.lang.Object
-
- io.appium.java_client.remote.options.BaseMapOptionData<CommandTimeouts>
-
- io.appium.java_client.ios.options.other.CommandTimeouts
-
public class CommandTimeouts extends BaseMapOptionData<CommandTimeouts>
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_COMMAND
-
Constructor Summary
Constructors Constructor Description CommandTimeouts()
CommandTimeouts(java.lang.String json)
CommandTimeouts(java.util.Map<java.lang.String,java.lang.Object> timeouts)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<java.time.Duration>
getCommandTimeout(java.lang.String commandName)
Get the command timeout.CommandTimeouts
withCommandTimeout(java.lang.String commandName, java.time.Duration timeout)
Sets the timeout for the particular Appium command that is proxied to WDA.CommandTimeouts
withDefaultCommandTimeout(java.time.Duration timeout)
Sets the default timeout for all Appium commands that are proxied to WDA.-
Methods inherited from class io.appium.java_client.remote.options.BaseMapOptionData
assignOptionValue, getOptionValue, toJson, toMap, toString
-
-
-
-
Field Detail
-
DEFAULT_COMMAND
public static final java.lang.String DEFAULT_COMMAND
- See Also:
- Constant Field Values
-
-
Method Detail
-
withCommandTimeout
public CommandTimeouts withCommandTimeout(java.lang.String commandName, java.time.Duration timeout)
Sets the timeout for the particular Appium command that is proxied to WDA. Command names you can find in logs, look for "Executing command 'command_name'" records. Timeout value is expected to contain max milliseconds to wait for the given WDA command to be executed before terminating the session forcefully.- Parameters:
commandName
- The command name.timeout
- Command timeout.- Returns:
- self instance for chaining.
-
withDefaultCommandTimeout
public CommandTimeouts withDefaultCommandTimeout(java.time.Duration timeout)
Sets the default timeout for all Appium commands that are proxied to WDA.- Parameters:
timeout
- Commands timeout.- Returns:
- self instance for chaining.
-
getCommandTimeout
public java.util.Optional<java.time.Duration> getCommandTimeout(java.lang.String commandName)
Get the command timeout.- Parameters:
commandName
- The command name- Returns:
- Timeout value.
-
-