Package io.appium.java_client.ios
Class IOSDriver
- java.lang.Object
-
- org.openqa.selenium.remote.RemoteWebDriver
-
- io.appium.java_client.AppiumDriver
-
- io.appium.java_client.ios.IOSDriver
-
- All Implemented Interfaces:
HasBattery<IOSBatteryInfo>
,HasClipboard
,ComparesImages
,ExecutesDriverScript
,ExecutesMethod
,HasAppStrings
,HasBrowserCheck
,HasDeviceTime
,HasOnScreenKeyboard
,HasSettings
,HidesKeyboard
,HidesKeyboardWithKeyName
,InteractsWithApps
,HasIOSClipboard
,ListensToSyslogMessages
,PerformsTouchID
,ShakesDevice
,LocksDevice
,LogsEvents
,PerformsTouchActions
,PullsFiles
,PushesFiles
,SupportsContextSwitching
,SupportsLocation
,SupportsRotation
,CanRecordScreen
,SupportsLegacyAppManagement
,org.openqa.selenium.ContextAware
,org.openqa.selenium.HasCapabilities
,org.openqa.selenium.html5.LocationContext
,org.openqa.selenium.interactions.HasInputDevices
,org.openqa.selenium.interactions.Interactive
,org.openqa.selenium.JavascriptExecutor
,org.openqa.selenium.PrintsPage
,org.openqa.selenium.Rotatable
,org.openqa.selenium.SearchContext
,org.openqa.selenium.TakesScreenshot
,org.openqa.selenium.virtualauthenticator.HasVirtualAuthenticator
,org.openqa.selenium.WebDriver
public class IOSDriver extends AppiumDriver implements SupportsContextSwitching, SupportsRotation, SupportsLocation, HidesKeyboard, HasDeviceTime, PullsFiles, InteractsWithApps, SupportsLegacyAppManagement, HasAppStrings, PerformsTouchActions, HidesKeyboardWithKeyName, ShakesDevice, HasOnScreenKeyboard, LocksDevice, PerformsTouchID, PushesFiles, CanRecordScreen, HasIOSClipboard, ListensToSyslogMessages, HasBattery<IOSBatteryInfo>
iOS driver implementation.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openqa.selenium.remote.RemoteWebDriver
org.openqa.selenium.remote.RemoteWebDriver.RemoteTargetLocator, org.openqa.selenium.remote.RemoteWebDriver.RemoteWebDriverOptions, org.openqa.selenium.remote.RemoteWebDriver.When
-
Nested classes/interfaces inherited from interface org.openqa.selenium.WebDriver
org.openqa.selenium.WebDriver.ImeHandler, org.openqa.selenium.WebDriver.Navigation, org.openqa.selenium.WebDriver.Options, org.openqa.selenium.WebDriver.TargetLocator, org.openqa.selenium.WebDriver.Timeouts, org.openqa.selenium.WebDriver.Window
-
-
Field Summary
-
Fields inherited from class io.appium.java_client.AppiumDriver
locationContext
-
-
Constructor Summary
Constructors Constructor Description IOSDriver(AppiumDriverLocalService service, org.openqa.selenium.Capabilities capabilities)
Creates a new instance based on Appium driver local service andcapabilities
.IOSDriver(AppiumDriverLocalService service, org.openqa.selenium.remote.http.HttpClient.Factory httpClientFactory, org.openqa.selenium.Capabilities capabilities)
Creates a new instance based on Appium driver local service, HTTP client factory andcapabilities
.IOSDriver(AppiumServiceBuilder builder, org.openqa.selenium.Capabilities capabilities)
Creates a new instance based on Appium service builder andcapabilities
.IOSDriver(AppiumServiceBuilder builder, org.openqa.selenium.remote.http.HttpClient.Factory httpClientFactory, org.openqa.selenium.Capabilities capabilities)
Creates a new instance based on Appium service builder, HTTP client factory andcapabilities
.IOSDriver(java.net.URL remoteAddress, org.openqa.selenium.Capabilities capabilities)
Creates a new instance based on Appium server URL andcapabilities
.IOSDriver(java.net.URL remoteAddress, org.openqa.selenium.remote.http.HttpClient.Factory httpClientFactory, org.openqa.selenium.Capabilities capabilities)
Creates a new instance based on Appium server URL, HTTP client factory andcapabilities
.IOSDriver(org.openqa.selenium.Capabilities capabilities)
Creates a new instance based oncapabilities
.IOSDriver(org.openqa.selenium.remote.http.HttpClient.Factory httpClientFactory, org.openqa.selenium.Capabilities capabilities)
Creates a new instance based on HTTP client factory andcapabilities
.IOSDriver(org.openqa.selenium.remote.HttpCommandExecutor executor, org.openqa.selenium.Capabilities capabilities)
Creates a new instance based on commandexecutor
andcapabilities
.
-
Method Summary
All Methods Instance Methods Concrete Methods Default Methods Modifier and Type Method Description IOSBatteryInfo
getBatteryInfo()
Retrieves battery info from the device under test.org.openqa.selenium.remote.html5.RemoteLocationContext
getLocationContext()
StringWebSocketClient
getSyslogClient()
default io.appium.java_client.ios.HasIOSSettings
nativeWebTap(java.lang.Boolean enabled)
Set the `nativeWebTap` setting.default io.appium.java_client.ios.HasIOSSettings
setElementResponseAttributes(java.lang.String attrNames)
Which attributes should be returned if compact responses are disabled.default io.appium.java_client.ios.HasIOSSettings
setKeyboardAutocorrection(boolean enabled)
Changes the 'Auto-Correction' preference in Keyboards setting.default io.appium.java_client.ios.HasIOSSettings
setKeyboardPrediction(boolean enabled)
Changes the 'Predictive' preference in Keyboards setting.default io.appium.java_client.ios.HasIOSSettings
setMjpegScalingFactor(int scale)
The scale of screenshots in range 1..100.default io.appium.java_client.ios.HasIOSSettings
setMjpegServerFramerate(int framerate)
The frame rate at which the background screenshots broadcaster should broadcast screenshots in range 1..60.default io.appium.java_client.ios.HasIOSSettings
setMjpegServerScreenshotQuality(int quality)
The quality of the screenshots generated by the screenshots broadcaster, The value of 0 represents the maximum compression (or lowest quality) while the value of 100 represents the least compression (or best quality).default io.appium.java_client.ios.HasIOSSettings
setScreenshotQuality(int quality)
Changes the quality of phone display screenshots according to XCTest/XCTImageQuality enum.default io.appium.java_client.ios.HasIOSSettings
setShouldUseCompactResponses(boolean enabled)
Whether to return compact (standards-compliant) and faster responses from find element/s (the default setting).org.openqa.selenium.WebDriver.TargetLocator
switchTo()
-
Methods inherited from class io.appium.java_client.AppiumDriver
addCommand, ensureAutomationName, ensurePlatformAndAutomationNames, ensurePlatformName, execute, execute, getExecuteMethod, getRemoteAddress, getStatus, startSession
-
Methods inherited from class org.openqa.selenium.remote.RemoteWebDriver
addVirtualAuthenticator, builder, close, execute, executeAsyncScript, executeScript, findElement, findElement, findElements, findElements, findElements, get, getCapabilities, getCommandExecutor, getCurrentUrl, getElementConverter, getErrorHandler, getFileDetector, getKeyboard, getMouse, getPageSource, getScreenshotAs, getSessionId, getTitle, getWindowHandle, getWindowHandles, log, manage, navigate, perform, print, quit, removeVirtualAuthenticator, resetInputState, setCommandExecutor, setElementConverter, setErrorHandler, setFileDetector, setFoundBy, setLogLevel, setSessionId, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.appium.java_client.screenrecording.CanRecordScreen
startRecordingScreen, startRecordingScreen, stopRecordingScreen, stopRecordingScreen
-
Methods inherited from interface io.appium.java_client.ComparesImages
findImageOccurrence, findImageOccurrence, findImageOccurrence, findImageOccurrence, getImagesSimilarity, getImagesSimilarity, getImagesSimilarity, getImagesSimilarity, matchImagesFeatures, matchImagesFeatures, matchImagesFeatures, matchImagesFeatures
-
Methods inherited from interface io.appium.java_client.ExecutesDriverScript
executeDriverScript, executeDriverScript
-
Methods inherited from interface io.appium.java_client.ExecutesMethod
execute, execute
-
Methods inherited from interface io.appium.java_client.HasAppStrings
getAppStringMap, getAppStringMap, getAppStringMap
-
Methods inherited from interface io.appium.java_client.HasBrowserCheck
isBrowser
-
Methods inherited from interface io.appium.java_client.clipboard.HasClipboard
getClipboard, getClipboardText, setClipboard, setClipboardText
-
Methods inherited from interface io.appium.java_client.HasDeviceTime
getDeviceTime, getDeviceTime
-
Methods inherited from interface io.appium.java_client.ios.HasIOSClipboard
getClipboardImage, getClipboardUrl, setClipboardImage, setClipboardUrl
-
Methods inherited from interface io.appium.java_client.HasOnScreenKeyboard
isKeyboardShown
-
Methods inherited from interface io.appium.java_client.HasSettings
getSettings, setSetting, setSetting, setSettings, setSettings
-
Methods inherited from interface io.appium.java_client.HidesKeyboard
hideKeyboard
-
Methods inherited from interface io.appium.java_client.HidesKeyboardWithKeyName
hideKeyboard, hideKeyboard
-
Methods inherited from interface io.appium.java_client.InteractsWithApps
activateApp, activateApp, installApp, installApp, isAppInstalled, queryAppState, removeApp, removeApp, runAppInBackground, terminateApp, terminateApp
-
Methods inherited from interface org.openqa.selenium.JavascriptExecutor
executeScript, getPinnedScripts, pin, unpin
-
Methods inherited from interface io.appium.java_client.ios.ListensToSyslogMessages
addSyslogConnectionListener, addSyslogDisconnectionListener, addSyslogErrorsListener, addSyslogMessagesListener, removeAllSyslogListeners, startSyslogBroadcast, startSyslogBroadcast, startSyslogBroadcast, stopSyslogBroadcast
-
Methods inherited from interface io.appium.java_client.LocksDevice
isDeviceLocked, lockDevice, lockDevice, unlockDevice
-
Methods inherited from interface io.appium.java_client.LogsEvents
getEvents, logEvent
-
Methods inherited from interface io.appium.java_client.PerformsTouchActions
performMultiTouchAction, performTouchAction
-
Methods inherited from interface io.appium.java_client.ios.PerformsTouchID
performTouchID, toggleTouchIDEnrollment
-
Methods inherited from interface io.appium.java_client.PullsFiles
pullFile, pullFolder
-
Methods inherited from interface io.appium.java_client.PushesFiles
pushFile, pushFile
-
Methods inherited from interface io.appium.java_client.ios.ShakesDevice
shake
-
Methods inherited from interface io.appium.java_client.remote.SupportsContextSwitching
context, getContext, getContextHandles
-
Methods inherited from interface io.appium.java_client.SupportsLegacyAppManagement
closeApp, launchApp, resetApp
-
Methods inherited from interface io.appium.java_client.remote.SupportsLocation
location, setLocation
-
Methods inherited from interface io.appium.java_client.remote.SupportsRotation
getOrientation, rotate, rotate, rotation
-
-
-
-
Constructor Detail
-
IOSDriver
public IOSDriver(org.openqa.selenium.remote.HttpCommandExecutor executor, org.openqa.selenium.Capabilities capabilities)
Creates a new instance based on commandexecutor
andcapabilities
.- Parameters:
executor
- is an instance ofHttpCommandExecutor
or class that extends it. Default commands or another vendor-specific commands may be specified there.capabilities
- take a look atCapabilities
-
IOSDriver
public IOSDriver(java.net.URL remoteAddress, org.openqa.selenium.Capabilities capabilities)
Creates a new instance based on Appium server URL andcapabilities
.- Parameters:
remoteAddress
- is the address of remotely/locally started Appium servercapabilities
- take a look atCapabilities
-
IOSDriver
public IOSDriver(java.net.URL remoteAddress, org.openqa.selenium.remote.http.HttpClient.Factory httpClientFactory, org.openqa.selenium.Capabilities capabilities)
Creates a new instance based on Appium server URL, HTTP client factory andcapabilities
.- Parameters:
remoteAddress
- is the address of remotely/locally started Appium serverhttpClientFactory
- take a look atHttpClient.Factory
capabilities
- take a look atCapabilities
-
IOSDriver
public IOSDriver(AppiumDriverLocalService service, org.openqa.selenium.Capabilities capabilities)
Creates a new instance based on Appium driver local service andcapabilities
.- Parameters:
service
- take a look atAppiumDriverLocalService
capabilities
- take a look atCapabilities
-
IOSDriver
public IOSDriver(AppiumDriverLocalService service, org.openqa.selenium.remote.http.HttpClient.Factory httpClientFactory, org.openqa.selenium.Capabilities capabilities)
Creates a new instance based on Appium driver local service, HTTP client factory andcapabilities
.- Parameters:
service
- take a look atAppiumDriverLocalService
httpClientFactory
- take a look atHttpClient.Factory
capabilities
- take a look atCapabilities
-
IOSDriver
public IOSDriver(AppiumServiceBuilder builder, org.openqa.selenium.Capabilities capabilities)
Creates a new instance based on Appium service builder andcapabilities
.- Parameters:
builder
- take a look atAppiumServiceBuilder
capabilities
- take a look atCapabilities
-
IOSDriver
public IOSDriver(AppiumServiceBuilder builder, org.openqa.selenium.remote.http.HttpClient.Factory httpClientFactory, org.openqa.selenium.Capabilities capabilities)
Creates a new instance based on Appium service builder, HTTP client factory andcapabilities
.- Parameters:
builder
- take a look atAppiumServiceBuilder
httpClientFactory
- take a look atHttpClient.Factory
capabilities
- take a look atCapabilities
-
IOSDriver
public IOSDriver(org.openqa.selenium.remote.http.HttpClient.Factory httpClientFactory, org.openqa.selenium.Capabilities capabilities)
Creates a new instance based on HTTP client factory andcapabilities
.- Parameters:
httpClientFactory
- take a look atHttpClient.Factory
capabilities
- take a look atCapabilities
-
IOSDriver
public IOSDriver(org.openqa.selenium.Capabilities capabilities)
Creates a new instance based oncapabilities
.- Parameters:
capabilities
- take a look atCapabilities
-
-
Method Detail
-
switchTo
public org.openqa.selenium.WebDriver.TargetLocator switchTo()
- Specified by:
switchTo
in interfaceorg.openqa.selenium.WebDriver
- Overrides:
switchTo
in classorg.openqa.selenium.remote.RemoteWebDriver
-
getBatteryInfo
public IOSBatteryInfo getBatteryInfo()
Description copied from interface:HasBattery
Retrieves battery info from the device under test.- Specified by:
getBatteryInfo
in interfaceHasBattery<IOSBatteryInfo>
- Returns:
- BatteryInfo instance, containing the battery information
-
getLocationContext
public org.openqa.selenium.remote.html5.RemoteLocationContext getLocationContext()
- Specified by:
getLocationContext
in interfaceSupportsLocation
-
getSyslogClient
public StringWebSocketClient getSyslogClient()
- Specified by:
getSyslogClient
in interfaceListensToSyslogMessages
-
nativeWebTap
public default io.appium.java_client.ios.HasIOSSettings nativeWebTap(java.lang.Boolean enabled)
Set the `nativeWebTap` setting. *iOS-only method*. Sets whether Safari/webviews should convert element taps into x/y taps.- Parameters:
enabled
- turns nativeWebTap on if true, off if false- Returns:
- self instance for chaining
-
setShouldUseCompactResponses
public default io.appium.java_client.ios.HasIOSSettings setShouldUseCompactResponses(boolean enabled)
Whether to return compact (standards-compliant) and faster responses from find element/s (the default setting). If set to false then the response may also contain other available element attributes.- Parameters:
enabled
- Either true or false. The default value if true.- Returns:
- self instance for chaining
-
setElementResponseAttributes
public default io.appium.java_client.ios.HasIOSSettings setElementResponseAttributes(java.lang.String attrNames)
Which attributes should be returned if compact responses are disabled. It works only if shouldUseCompactResponses is set to false. Defaults to "type,label" string.- Parameters:
attrNames
- The comma-separated list of fields to return with each element.- Returns:
- self instance for chaining
-
setMjpegServerScreenshotQuality
public default io.appium.java_client.ios.HasIOSSettings setMjpegServerScreenshotQuality(int quality)
The quality of the screenshots generated by the screenshots broadcaster, The value of 0 represents the maximum compression (or lowest quality) while the value of 100 represents the least compression (or best quality).- Parameters:
quality
- An integer in range 0..100. The default value is 25.- Returns:
- self instance for chaining
-
setMjpegServerFramerate
public default io.appium.java_client.ios.HasIOSSettings setMjpegServerFramerate(int framerate)
The frame rate at which the background screenshots broadcaster should broadcast screenshots in range 1..60. The default value is 10 (Frames Per Second). Setting zero value will cause the frame rate to be at its maximum possible value.- Parameters:
framerate
- An integer in range 1..60. The default value is 10.- Returns:
- self instance for chaining
-
setScreenshotQuality
public default io.appium.java_client.ios.HasIOSSettings setScreenshotQuality(int quality)
Changes the quality of phone display screenshots according to XCTest/XCTImageQuality enum. Sometimes setting this value to the maximum possible quality may crash XCTest because of lack of the memory (lossless screenshot require more space).- Parameters:
quality
- An integer in range 0..2. The default value is 1.- Returns:
- self instance for chaining
-
setMjpegScalingFactor
public default io.appium.java_client.ios.HasIOSSettings setMjpegScalingFactor(int scale)
The scale of screenshots in range 1..100. The default value is 100, no scaling- Parameters:
scale
- An integer in range 1..100. The default value is 100.- Returns:
- self instance for chaining
-
setKeyboardAutocorrection
public default io.appium.java_client.ios.HasIOSSettings setKeyboardAutocorrection(boolean enabled)
Changes the 'Auto-Correction' preference in Keyboards setting.- Parameters:
enabled
- Either true or false. Defaults to false when WDA starts as xctest.- Returns:
- self instance for chaining
-
setKeyboardPrediction
public default io.appium.java_client.ios.HasIOSSettings setKeyboardPrediction(boolean enabled)
Changes the 'Predictive' preference in Keyboards setting.- Parameters:
enabled
- Either true or false. Defaults to false when WDA starts as xctest.- Returns:
- self instance for chaining
-
-