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>
,java.io.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:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface io.appium.java_client.remote.options.SupportsAutomationNameOption
AUTOMATION_NAME_OPTION
-
Fields inherited from interface io.appium.java_client.remote.options.SupportsBrowserNameOption
BROWSER_NAME_OPTION
-
Fields inherited from interface io.appium.java_client.remote.options.SupportsEventTimingsOption
EVENT_TIMINGS_OPTION
-
Fields inherited from interface io.appium.java_client.remote.options.SupportsFullResetOption
FULL_RESET_OPTION
-
Fields inherited from interface io.appium.java_client.remote.options.SupportsNewCommandTimeoutOption
NEW_COMMAND_TIMEOUT_OPTION
-
Fields inherited from interface io.appium.java_client.remote.options.SupportsNoResetOption
NO_RESET_OPTION
-
Fields inherited from interface io.appium.java_client.remote.options.SupportsPlatformVersionOption
PLATFORM_VERSION_OPTION
-
Fields inherited from interface io.appium.java_client.remote.options.SupportsPrintPageSourceOnFindFailureOption
PRINT_PAGE_SOURCE_ON_FIND_FAILURE_OPTION
-
Fields inherited from interface io.appium.java_client.remote.options.SupportsWebSocketUrlOption
WEB_SOCKET_URL
-
-
Constructor Summary
Constructors Constructor Description BaseOptions()
Creates new instance with no preset capabilities.BaseOptions(java.util.Map<java.lang.String,?> source)
Creates new instance with provided capabilities.BaseOptions(org.openqa.selenium.Capabilities source)
Creates new instance with provided capabilities.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.Object>
asMap()
T
clone()
Makes a deep clone of the current Options instance.java.lang.Object
getCapability(java.lang.String capabilityName)
org.openqa.selenium.Platform
getPlatformName()
T
merge(org.openqa.selenium.Capabilities extraCapabilities)
void
setCapability(java.lang.String key, java.lang.Object value)
T
setPlatformName(java.lang.String platform)
Set the kind of mobile device or emulator to use.static java.lang.String
toW3cName(java.lang.String capName)
Adds 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, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.appium.java_client.remote.options.CanSetCapability
amend
-
Methods inherited from interface org.openqa.selenium.Capabilities
getBrowserName, getBrowserVersion, getCapabilityNames, is
-
Methods inherited from interface io.appium.java_client.remote.options.SupportsAutomationNameOption
getAutomationName, setAutomationName
-
Methods inherited from interface io.appium.java_client.remote.options.SupportsBrowserNameOption
withBrowserName
-
Methods inherited from interface io.appium.java_client.remote.options.SupportsEventTimingsOption
doesEventTimings, eventTimings, setEventTimings
-
Methods inherited from interface io.appium.java_client.remote.options.SupportsFullResetOption
doesFullReset, fullReset, setFullReset
-
Methods inherited from interface io.appium.java_client.remote.options.SupportsNewCommandTimeoutOption
getNewCommandTimeout, setNewCommandTimeout
-
Methods inherited from interface io.appium.java_client.remote.options.SupportsNoResetOption
doesNoReset, noReset, setNoReset
-
Methods inherited from interface io.appium.java_client.remote.options.SupportsPlatformVersionOption
getPlatformVersion, setPlatformVersion
-
Methods inherited from interface io.appium.java_client.remote.options.SupportsPrintPageSourceOnFindFailureOption
doesPrintPageSourceOnFindFailure, printPageSourceOnFindFailure, setPrintPageSourceOnFindFailure
-
Methods inherited from interface io.appium.java_client.remote.options.SupportsWebSocketUrlOption
enableBiDi, getWebSocketUrl, setWebSocketUrl
-
-
-
-
Constructor Detail
-
BaseOptions
public BaseOptions()
Creates new instance with no preset capabilities.
-
BaseOptions
public BaseOptions(java.util.Map<java.lang.String,?> source)
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 Detail
-
setPlatformName
public T setPlatformName(java.lang.String platform)
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
@Nullable public org.openqa.selenium.Platform getPlatformName()
- Specified by:
getPlatformName
in interfaceorg.openqa.selenium.Capabilities
-
asMap
public java.util.Map<java.lang.String,java.lang.Object> asMap()
- Specified by:
asMap
in interfaceorg.openqa.selenium.Capabilities
- Overrides:
asMap
in classorg.openqa.selenium.MutableCapabilities
-
merge
public T merge(org.openqa.selenium.Capabilities extraCapabilities)
- Specified by:
merge
in interfaceorg.openqa.selenium.Capabilities
- Overrides:
merge
in classorg.openqa.selenium.MutableCapabilities
-
clone
public T clone()
Makes a deep clone of the current Options instance.- Overrides:
clone
in classjava.lang.Object
- Returns:
- A deep instance clone.
-
setCapability
public void setCapability(java.lang.String key, @Nullable java.lang.Object value)
- Specified by:
setCapability
in interfaceCanSetCapability<T extends BaseOptions<T>>
- Overrides:
setCapability
in classorg.openqa.selenium.MutableCapabilities
-
getCapability
@Nullable public java.lang.Object getCapability(java.lang.String capabilityName)
- Specified by:
getCapability
in interfaceorg.openqa.selenium.Capabilities
- Overrides:
getCapability
in classorg.openqa.selenium.MutableCapabilities
-
toW3cName
public static java.lang.String toW3cName(java.lang.String capName)
Adds the 'appium:' prefix to the given capability name if necessary.- Parameters:
capName
- the original capability name.- Returns:
- The preformatted W3C-compatible capability name.
-
-