public class MobileOptions<T extends MobileOptions<T>>
extends org.openqa.selenium.MutableCapabilities
Constructor and Description |
---|
MobileOptions()
Creates new instance with no preset capabilities.
|
MobileOptions(org.openqa.selenium.Capabilities source)
Creates new instance with provided capabilities capabilities.
|
Modifier and Type | Method and Description |
---|---|
protected T |
amend(java.lang.String optionName,
java.lang.Object value) |
protected int |
amendHashCode() |
boolean |
doesAutoWebview()
Get whether the app moves directly into Webview context.
|
boolean |
doesClearSystemFiles()
Get whether the app deletes generated files at the end of a session.
|
boolean |
doesEventTimings()
Get whether the app reports the timings for various Appium-internal events.
|
boolean |
doesFullReset()
Get whether the app does a full reset.
|
boolean |
doesNoReset()
Get whether the app does not do a reset.
|
boolean |
doesPrintPageSourceOnFindFailure()
Get whether the app to print page source when a find operation fails.
|
java.lang.String |
getApp()
Get the app location.
|
java.lang.String |
getAutomationName()
Get the automation engine to use.
|
java.lang.String |
getDeviceName()
Get the name of the device.
|
java.lang.String |
getLanguage()
Get language abbreviation for use in session.
|
java.lang.String |
getLocale()
Get locale abbreviation for use in session.
|
java.time.Duration |
getNewCommandTimeout()
Get the timeout for new commands.
|
org.openqa.selenium.ScreenOrientation |
getOrientation()
Get the orientation of the screen.
|
java.lang.String |
getOtherApps()
Get the list of apps to install before running a test.
|
java.lang.String |
getPlatformName()
Get the kind of mobile device or emulator to use.
|
java.lang.String |
getPlatformVersion()
Get the version of the platform.
|
java.lang.String |
getUdid()
Get the id of the device.
|
boolean |
isEnablePerformanceLogging()
Get the app logs performance.
|
T |
merge(org.openqa.selenium.Capabilities extraCapabilities) |
T |
setApp(java.lang.String path)
Set the absolute local path for the location of the App.
|
T |
setApp(java.net.URL url)
Set the remote http URL for the location of the App.
|
T |
setAutomationName(java.lang.String name)
Set the automation engine to use.
|
T |
setAutoWebview()
Set the app to move directly into Webview context.
|
T |
setAutoWebview(boolean bool)
Set whether the app moves directly into Webview context.
|
T |
setClearSystemFiles()
Set the app to delete any generated files at the end of a session.
|
T |
setClearSystemFiles(boolean bool)
Set whether the app deletes generated files at the end of a session.
|
T |
setDeviceName(java.lang.String deviceName)
Set the name of the device.
|
T |
setEnablePerformanceLogging()
Set the app to enable performance logging.
|
T |
setEnablePerformanceLogging(boolean bool)
Set whether the app logs performance.
|
T |
setEventTimings()
Set the app to report the timings for various Appium-internal events.
|
T |
setEventTimings(boolean bool)
Set whether the app reports the timings for various Appium-internal events.
|
T |
setFullReset()
Set the app to do a full reset.
|
T |
setFullReset(boolean bool)
Set whether the app does a full reset.
|
T |
setLanguage(java.lang.String language)
Set language abbreviation for use in session.
|
T |
setLocale(java.lang.String locale)
Set locale abbreviation for use in session.
|
T |
setNewCommandTimeout(java.time.Duration duration)
Set the timeout for new commands.
|
T |
setNoReset()
Set the app not to do a reset.
|
T |
setNoReset(boolean bool)
Set whether the app does not do a reset.
|
T |
setOrientation(org.openqa.selenium.ScreenOrientation orientation)
Set the orientation of the screen.
|
T |
setOtherApps(java.lang.String apps)
Set the location of the app(s) to install before running a test.
|
T |
setPlatformName(java.lang.String platform)
Set the kind of mobile device or emulator to use.
|
T |
setPlatformVersion(java.lang.String version)
Set the version of the platform.
|
T |
setPrintPageSourceOnFindFailure()
Set the app to print page source when a find operation fails.
|
T |
setPrintPageSourceOnFindFailure(boolean bool)
Set whether the app to print page source when a find operation fails.
|
T |
setUdid(java.lang.String id)
Set the id of the device.
|
setCapability, setCapability, setCapability, setCapability
public MobileOptions()
public MobileOptions(org.openqa.selenium.Capabilities source)
source
- is Capabilities instance to merge into new instancepublic T setPlatformName(java.lang.String platform)
platform
- the kind of mobile device or emulator to use.CapabilityType.PLATFORM_NAME
public java.lang.String getPlatformName()
CapabilityType.PLATFORM_NAME
public T setApp(java.lang.String path)
.ipa
file (IOS),path
- is a String representing the location of the AppMobileCapabilityType.APP
public T setApp(java.net.URL url)
url
- is the URL representing the location of the AppMobileCapabilityType.APP
public java.lang.String getApp()
MobileCapabilityType.APP
public T setAutomationName(java.lang.String name)
name
- is the name of the automation engineMobileCapabilityType.AUTOMATION_NAME
public java.lang.String getAutomationName()
MobileCapabilityType.AUTOMATION_NAME
public T setAutoWebview()
MobileCapabilityType.AUTO_WEBVIEW
public T setAutoWebview(boolean bool)
bool
- is whether the app moves directly into Webview context.MobileCapabilityType.AUTO_WEBVIEW
public boolean doesAutoWebview()
MobileCapabilityType.AUTO_WEBVIEW
public T setClearSystemFiles()
MobileCapabilityType.CLEAR_SYSTEM_FILES
public T setClearSystemFiles(boolean bool)
bool
- is whether the app deletes generated files at the end of a session.MobileCapabilityType.CLEAR_SYSTEM_FILES
public boolean doesClearSystemFiles()
MobileCapabilityType.CLEAR_SYSTEM_FILES
public T setDeviceName(java.lang.String deviceName)
deviceName
- is the name of the device.MobileCapabilityType.DEVICE_NAME
public java.lang.String getDeviceName()
MobileCapabilityType.DEVICE_NAME
public T setEnablePerformanceLogging()
MobileCapabilityType.ENABLE_PERFORMANCE_LOGGING
public T setEnablePerformanceLogging(boolean bool)
bool
- is whether the app logs performance.MobileCapabilityType.ENABLE_PERFORMANCE_LOGGING
public boolean isEnablePerformanceLogging()
MobileCapabilityType.ENABLE_PERFORMANCE_LOGGING
public T setEventTimings()
MobileCapabilityType.EVENT_TIMINGS
public T setEventTimings(boolean bool)
bool
- is whether the app enables event timings.MobileCapabilityType.EVENT_TIMINGS
public boolean doesEventTimings()
MobileCapabilityType.EVENT_TIMINGS
public T setFullReset()
MobileCapabilityType.FULL_RESET
public T setFullReset(boolean bool)
bool
- is whether the app does a full reset.MobileCapabilityType.FULL_RESET
public boolean doesFullReset()
MobileCapabilityType.FULL_RESET
public T setLanguage(java.lang.String language)
language
- is the language abbreviation.MobileCapabilityType.LANGUAGE
public java.lang.String getLanguage()
MobileCapabilityType.LANGUAGE
public T setLocale(java.lang.String locale)
locale
- is the locale abbreviation.MobileCapabilityType.LOCALE
public java.lang.String getLocale()
MobileCapabilityType.LOCALE
public T setNewCommandTimeout(java.time.Duration duration)
duration
- is the allowed time before seeing a new command.MobileCapabilityType.NEW_COMMAND_TIMEOUT
public java.time.Duration getNewCommandTimeout()
MobileCapabilityType.NEW_COMMAND_TIMEOUT
public T setNoReset()
MobileCapabilityType.NO_RESET
public T setNoReset(boolean bool)
bool
- is whether the app does not do a reset.MobileCapabilityType.NO_RESET
public boolean doesNoReset()
MobileCapabilityType.NO_RESET
public T setOrientation(org.openqa.selenium.ScreenOrientation orientation)
orientation
- is the screen orientation.MobileCapabilityType.ORIENTATION
public org.openqa.selenium.ScreenOrientation getOrientation()
MobileCapabilityType.ORIENTATION
public T setOtherApps(java.lang.String apps)
apps
- is the apps to install.MobileCapabilityType.OTHER_APPS
public java.lang.String getOtherApps()
MobileCapabilityType.OTHER_APPS
public T setPlatformVersion(java.lang.String version)
version
- is the platform version.MobileCapabilityType.PLATFORM_VERSION
public java.lang.String getPlatformVersion()
MobileCapabilityType.PLATFORM_VERSION
public T setPrintPageSourceOnFindFailure()
MobileCapabilityType.PRINT_PAGE_SOURCE_ON_FIND_FAILURE
public T setPrintPageSourceOnFindFailure(boolean bool)
bool
- is whether to print page source.MobileCapabilityType.PRINT_PAGE_SOURCE_ON_FIND_FAILURE
public boolean doesPrintPageSourceOnFindFailure()
MobileCapabilityType.PRINT_PAGE_SOURCE_ON_FIND_FAILURE
public T setUdid(java.lang.String id)
id
- is the unique device identifier.MobileCapabilityType.UDID
public java.lang.String getUdid()
MobileCapabilityType.UDID
public T merge(org.openqa.selenium.Capabilities extraCapabilities)
merge
in interface org.openqa.selenium.Capabilities
merge
in class org.openqa.selenium.MutableCapabilities
protected T amend(java.lang.String optionName, java.lang.Object value)
protected int amendHashCode()