Class BaseOptions<T extends BaseOptions<T>>
java.lang.Object
org.openqa.selenium.MutableCapabilities
io.appium.java_client.remote.options.BaseOptions<T>
- Type Parameters:
T- The child class for a proper chaining.
- All Implemented Interfaces:
CanSetCapability<T>,SupportsAutomationNameOption<T>,SupportsBrowserNameOption<T>,SupportsEventTimingsOption<T>,SupportsFullResetOption<T>,SupportsNewCommandTimeoutOption<T>,SupportsNoResetOption<T>,SupportsPlatformVersionOption<T>,SupportsPrintPageSourceOnFindFailureOption<T>,SupportsWebSocketUrlOption<T>,Serializable,org.openqa.selenium.Capabilities
- Direct Known Subclasses:
ChromiumOptions,EspressoOptions,FlutterDriverOptions,GeckoOptions,Mac2Options,SafariOptions,UiAutomator2Options,WindowsOptions,XCUITestOptions
public class BaseOptions<T extends BaseOptions<T>>
extends org.openqa.selenium.MutableCapabilities
implements CanSetCapability<T>, SupportsAutomationNameOption<T>, SupportsEventTimingsOption<T>, SupportsPrintPageSourceOnFindFailureOption<T>, SupportsNoResetOption<T>, SupportsFullResetOption<T>, SupportsNewCommandTimeoutOption<T>, SupportsBrowserNameOption<T>, SupportsPlatformVersionOption<T>, SupportsWebSocketUrlOption<T>
This class represents capabilities that are available in the base driver,
e.g. are acceptable by any Appium driver
- See Also:
-
Field Summary
Fields inherited from interface io.appium.java_client.remote.options.SupportsAutomationNameOption
AUTOMATION_NAME_OPTIONFields inherited from interface io.appium.java_client.remote.options.SupportsBrowserNameOption
BROWSER_NAME_OPTIONFields inherited from interface io.appium.java_client.remote.options.SupportsEventTimingsOption
EVENT_TIMINGS_OPTIONFields inherited from interface io.appium.java_client.remote.options.SupportsFullResetOption
FULL_RESET_OPTIONFields inherited from interface io.appium.java_client.remote.options.SupportsNewCommandTimeoutOption
NEW_COMMAND_TIMEOUT_OPTIONFields inherited from interface io.appium.java_client.remote.options.SupportsNoResetOption
NO_RESET_OPTIONFields inherited from interface io.appium.java_client.remote.options.SupportsPlatformVersionOption
PLATFORM_VERSION_OPTIONFields inherited from interface io.appium.java_client.remote.options.SupportsPrintPageSourceOnFindFailureOption
PRINT_PAGE_SOURCE_ON_FIND_FAILURE_OPTIONFields inherited from interface io.appium.java_client.remote.options.SupportsWebSocketUrlOption
WEB_SOCKET_URL -
Constructor Summary
ConstructorsConstructorDescriptionCreates new instance with no preset capabilities.BaseOptions(Map<String, ?> source) Creates new instance with provided capabilities.BaseOptions(org.openqa.selenium.Capabilities source) Creates new instance with provided capabilities. -
Method Summary
Modifier and TypeMethodDescriptionasMap()clone()Makes a deep clone of the current Options instance.@Nullable ObjectgetCapability(String capabilityName) @Nullable org.openqa.selenium.Platformmerge(org.openqa.selenium.Capabilities extraCapabilities) voidsetCapability(String key, @Nullable Object value) setPlatformName(String platform) Set the kind of mobile device or emulator to use.static StringAdds the 'appium:' prefix to the given capability name if necessary.Methods inherited from class org.openqa.selenium.MutableCapabilities
equals, getCapabilityNames, hashCode, setCapability, setCapability, setCapability, toJson, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.appium.java_client.remote.options.CanSetCapability
amendMethods inherited from interface org.openqa.selenium.Capabilities
get, getBrowserName, getBrowserVersion, getCapabilityNames, is, requiredMethods inherited from interface io.appium.java_client.remote.options.SupportsAutomationNameOption
getAutomationName, setAutomationNameMethods inherited from interface io.appium.java_client.remote.options.SupportsBrowserNameOption
withBrowserNameMethods inherited from interface io.appium.java_client.remote.options.SupportsEventTimingsOption
doesEventTimings, eventTimings, setEventTimingsMethods inherited from interface io.appium.java_client.remote.options.SupportsFullResetOption
doesFullReset, fullReset, setFullResetMethods inherited from interface io.appium.java_client.remote.options.SupportsNewCommandTimeoutOption
getNewCommandTimeout, setNewCommandTimeoutMethods inherited from interface io.appium.java_client.remote.options.SupportsNoResetOption
doesNoReset, noReset, setNoResetMethods inherited from interface io.appium.java_client.remote.options.SupportsPlatformVersionOption
getPlatformVersion, setPlatformVersionMethods inherited from interface io.appium.java_client.remote.options.SupportsPrintPageSourceOnFindFailureOption
doesPrintPageSourceOnFindFailure, printPageSourceOnFindFailure, setPrintPageSourceOnFindFailureMethods inherited from interface io.appium.java_client.remote.options.SupportsWebSocketUrlOption
enableBiDi, getWebSocketUrl, setWebSocketUrl
-
Constructor Details
-
BaseOptions
public BaseOptions()Creates new instance with no preset capabilities. -
BaseOptions
Creates new instance with provided capabilities.- Parameters:
source- Capabilities map to merge into new instance
-
BaseOptions
public BaseOptions(org.openqa.selenium.Capabilities source) Creates new instance with provided capabilities.- Parameters:
source- is Capabilities instance to merge into new instance
-
-
Method Details
-
setPlatformName
Set the kind of mobile device or emulator to use.- Parameters:
platform- the kind of mobile device or emulator to use.- Returns:
- self instance for chaining.
- See Also:
-
CapabilityType.PLATFORM_NAME
-
getPlatformName
public @Nullable org.openqa.selenium.Platform getPlatformName()- Specified by:
getPlatformNamein interfaceorg.openqa.selenium.Capabilities
-
asMap
- Specified by:
asMapin interfaceorg.openqa.selenium.Capabilities- Overrides:
asMapin classorg.openqa.selenium.MutableCapabilities
-
merge
- Specified by:
mergein interfaceorg.openqa.selenium.Capabilities- Overrides:
mergein classorg.openqa.selenium.MutableCapabilities
-
clone
Makes a deep clone of the current Options instance. -
setCapability
- Specified by:
setCapabilityin interfaceCanSetCapability<T extends BaseOptions<T>>- Overrides:
setCapabilityin classorg.openqa.selenium.MutableCapabilities
-
getCapability
- Specified by:
getCapabilityin interfaceorg.openqa.selenium.Capabilities- Overrides:
getCapabilityin classorg.openqa.selenium.MutableCapabilities
-
toW3cName
Adds the 'appium:' prefix to the given capability name if necessary.- Parameters:
capName- the original capability name.- Returns:
- The preformatted W3C-compatible capability name.
-