Capabilities
This page lists various capabilities used and implemented by the XCUITest driver. To learn more about capabilities, refer to the Appium documentation.
General¶
Capability |
Description |
---|---|
platformName |
Could be set to ios . Appium itself is not strict about this capability value if automationName is provided, so feel free to assign it to any supported platform name if this is needed, for example, to make Selenium Grid working. |
browserName |
The name of the browser to run the test on. If this capability is provided then the driver will try to start the test in Web context mode (Native mode is applied by default). Read Automating hybrid apps for more details. Usually equals to safari . |
appium:automationName |
Must always be set to xcuitest . Values of automationName are compared case-insensitively. |
appium:deviceName |
The name of the device under test. Consider setting udid for real devices and use this one for Simulator selection instead |
appium:platformVersion |
The platform version of an emulator or a real device. This capability is used for device autodetection if udid is not provided |
appium:udid |
UDID of the device to be tested. Could be retrieved from Xcode->Window->Devices and Simulators window. Always set this capability if you run parallel tests or use a real device to run your tests. |
appium:noReset |
Prevents the device to be reset before the session startup if set to true . This means that the application under test is not going to be terminated neither its data cleaned. false by default |
appium:fullReset |
Being set to true always enforces the application under test to be fully uninstalled before starting a new session. The application data might be cached on real devices under particular circumstances. Please check troubleshooting for more details regarding obsolete application data cleanup on real devices. false by default |
appium:printPageSourceOnFindFailure |
Enforces the server to dump the actual XML page source into the log if any error happens. false by default. |
appium:includeDeviceCapsToSessionInfo |
Whether to include screen information as the result of Get Session Capabilities. It includes pixelRatio , statBarHeight and viewportRect , but it causes an extra API call to WDA which may increase the response time like this issue. Defaults to true . This capability has no effect since driver version 5 |
appium:resetLocationService |
Whether reset the location service in the session deletion on real device. Defaults to false . |
appium:customSSLCert |
Adds a root SSL certificate to IOS Simulators and real devices. Real devices only work if py-ios-device tool is available on the server machine. The certificate content must be provided in PEM format, e.g. -----BEGIN CERTIFICATE-----MIIFWjCCBEKg...-----END CERTIFICATE----- |
App¶
Capability |
Description |
---|---|
appium:bundleId |
Bundle identifier of the app under test, for example com.mycompany.myapp . The capability value is calculated automatically if app is provided. If neither app or bundleId capability is provided then XCUITest driver starts from the Home screen. |
appium:initialDeeplinkUrl |
A deeplink URL used to run either the application assigned to appium:bundleId , or the default application assigned to handle the particular deeplink protocol if appium:bundleId is not set. If provided in combination with browserName=safari then makes Safari to start with the given URL preloaded, which speeds up the session startup. The value of appium:initialSafariUrl capability is ignored in such case. An error is thrown on session init if either the value of the capability is not a valid URL, or XCTest was not able to associate it with any existing app, or the actual iOS version is below 16.4 |
appium:app |
Full path to the application to be tested (the app must be located on the same machine where the server is running). .ipa and .app application extensions are supported. Zipped .app bundles are supported as well. Could also be an URL to a remote location. If neither of the app or bundleId capabilities are provided then the driver starts from the Home screen and expects the test to know what to do next. Do not provide both app and browserName capabilities at once. |
appium:enforceAppInstall |
If set to false it will make xcuitest driver to verify whether the app version currently installed on the device under test is older than the one, which is provided as appium:app value. No app reinstall is going to happen if the candidate app has the same or older version number than the already installed copy of it. The version number used for comparison must be provided as CFBundleVersion Semantic Versioning-compatible value in the application's Info.plist. No validation is performed by default, e.g. the provided app is always (re)installed, which could potentially slow down your test suites. The application data might be cached on real devices under particular circumstances when appium:enforceAppInstall is true if the application under test remained on the device under a certain situation. Please check troubleshooting for more details regarding obsolete application data cleanup on real devices. Available since XCUITest driver 4.19.0. |
appium:localizableStringsDir |
Where to look for localizable strings in the application bundle. Defaults to en.lproj |
appium:otherApps |
App or list of apps (as a JSON array) to install prior to running tests. For example: ["http://appium.github.io/appium/assets/TestApp9.4.app.zip", "/path/to/app-b.app"] |
appium:language |
Language to set for iOS app, for example fr . Please read Language IDs to get more details about available values for this capability. If a test is executed on a Simulator then UI language is changed as well. You can also change Simulator language in runtime using mobile: configureLocalization extension. |
appium:locale |
Locale to set for iOS app, for example fr_CA . Please read Locale IDs to get more details about available values for this capability. If a test is executed on a Simulator then UI locale is changed as well. You can also change Simulator locale in runtime using mobile: configureLocalization extension. |
appium:calendarFormat |
Calendar format to set for iOS Simulator, for example gregorian or persian . Can only be set in conjunction with appium:locale . |
appium:appPushTimeout |
The timeout for an application install/upgrade in milliseconds. Works for real devices only. The default value is 480000 ms (8 minutes) |
Deprecated Not used since v7.15.0 appium:appInstallStrategy |
Select application installation strategy for real devices. The following strategies are supported:serial (default) - pushes app files to the device in a sequential order; this is the least performant strategy, although the most reliableparallel - pushes app files simultaneously; this is usually the the most performant strategy, but sometimes could not be very stableios-deploy - tells the driver to use a third-party tool ios-deploy to install the app; obviously the tool must be installed separately first and must be present in PATH before it could be used. |
appium:appTimeZone |
Defines the custom time zone override for the application under test. You can use UTC, PST, EST, as well as place-based timezone names such as America/Los_Angeles. The application must be (re)launched for the capability to take effect. See the List of tz database time zones for more details. The same behavior could be achieved by providing a custom value to the TZ environment variable via the appium:processArguments capability |
WebDriverAgent¶
Capability |
Description | Example |
---|---|---|
appium:xcodeOrgId |
Apple developer team identifier string. Must be used in conjunction with xcodeSigningId to take effect. |
JWL241K123 |
appium:xcodeSigningId |
String representing a signing certificate. Must be used in conjunction with xcodeOrgId . This is usually just Apple Development or iPhone Developer , so the default (if not included) is iPhone Developer |
Apple Developer |
appium:xcodeConfigFile |
Full path to an optional Xcode configuration file that specifies the code signing identity and team for running the WebDriverAgent on the real device. |
/path/to/myconfig.xcconfig |
appium:updatedWDABundleId |
Bundle id to update WDA to before building and launching it. This bundle id must be associated with a valid provisioning profile. The default value is com.facebook.WebDriverAgentRunner . |
io.appium.WebDriverAgentRunner |
appium:keychainPath |
Full path to the private development key exported from the system keychain. Used in conjunction with keychainPassword when testing on real devices. |
/path/to/MyPrivateKey.p12 |
appium:keychainPassword |
Password for unlocking keychain specified in keychainPath . |
super awesome password |
appium:derivedDataPath |
Overrides the folder that should be used for derived data when performing a source building with xCode. xCode stores all build and test artifacts under this file system root. Use this capability to set a unique path while running parallel tests or to have more control over built artifacts, for example if you'd like to use preinstalled or prebuilt WDA to reduce the session startup time. If the capability is not set then Xcode will store the derived data in the default root taken from preferences (usually a subfolder of /Users/<username>/Library/Developer/Xcode/DerivedData ). |
/tmp/wda-861563ec |
appium:webDriverAgentUrl |
If provided, Appium will connect to an existing WebDriverAgent instance at this URL instead of starting a new one. |
http://localhost:8100 |
appium:useNewWDA |
If true , forces uninstall of any existing WebDriverAgent app on device. Set it to true if you want to apply different startup options for WebDriverAgent for each session. Although, it is only guaranteed to work stable on Simulator. Real devices require WebDriverAgent client to run for as long as possible without reinstall/restart to avoid issues like https://github.com/facebook/WebDriverAgent/issues/507. The false value (the default behaviour since driver version 2.35.0) will try to detect currently running WDA listener executed by previous testing session(s) and reuse it if possible, which is highly recommended for real device testing and to speed up suites of multiple tests in general. A new WDA session will be triggered at the default URL (http://localhost:8100) if WDA is not listening and webDriverAgentUrl capability is not set. The negative/unset value of useNewWDA capability has no effect prior to xcuitest driver version 2.35.0. |
true |
appium:wdaLaunchTimeout |
Time, in ms, to wait for WebDriverAgent to be pingable. Defaults to 60000ms. |
30000 |
appium:wdaConnectionTimeout |
Timeout, in ms, for waiting for a response from WebDriverAgent . Defaults to 240000ms. |
1000 |
appium:wdaStartupRetries |
Number of times to try to build and launch WebDriverAgent onto the device by xcodebuild . It does not work for webDriverAgentUrl and usePreinstalledWDA capabilities since they handle WebDriverAgent without the xcodebuild . Defaults to 2 for simulators and 1 for real devices. |
4 |
appium:wdaStartupRetryInterval |
Time, in ms, to wait between tries to build and launch WebDriverAgent . Defaults to 10000ms. |
20000 |
appium:wdaLocalPort |
This value if specified, will be used to forward traffic from Mac host to real ios devices over USB. Default value is same as port number used by WDA on device. | 8100 |
appium:wdaRemotePort |
This value if specified, will be used as the port number to start WDA HTTP server on the remote device. This is only relevant for real devices, because Simulator shares ports with its host. If webDriverAgentUrl is provided then it might be used to provide a hint for the remote port number if it differs from the default one. Default value is 8100. |
8100 |
appium:wdaBaseUrl |
This value if specified, will be used as a prefix to build a custom WebDriverAgent url. It is different from webDriverAgentUrl , because if the latter is set then it expects WebDriverAgent to be already listening and skips the building phase. Defaults to http://localhost |
http://192.168.1.100 |
appium:showXcodeLog |
Whether to display the output of the Xcode command used to run the tests. If this is true , there will be lots of extra logging at startup. Defaults to false |
true |
appium:iosInstallPause |
Time in milliseconds to pause between installing the application and starting WebDriverAgent on the device. Used particularly for larger applications. Defaults to 0 |
8000 |
appium:prebuildWDA |
Enables prebuilding if the WebDriverAgentRunner application before running the WDA app. With this capability, XCUITest driver builds the WDA project first, then it handles the session as appium:usePrebuiltWDA true behavior. Defaults to false . |
true |
appium:usePrebuiltWDA |
Skips the build phase of running the WDA app. Building is then the responsibility of the user. appium:derivedDataPath let the session use the path as -derivedDataPath argument for xcodebuild command. Defaults to false . |
true |
appium:prebuiltWDAPath |
The full path to the prebuilt WebDriverAgent-Runner application package to be installed if appium:usePreinstalledWDA capability is enabled. The package's bundle identifier could be customized via appium:updatedWDABundleId capability. |
/path/to/WebDriverAgentRunner-Runner.app |
appium:usePreinstalledWDA |
Whether to launch a preinstalled WebDriverAgentRunner application using a custom XCTest API client (via com.apple.instruments service) instead of running xcodebuild for real devices or simulators via simctl tool (since driver version 7.4.0). If appium:prebuiltWDAPath is provided, XCUITest driver will install WebDriverAgent-Runner app from the given path before launching the application. The preinstalled WebDriverAgent package must be built by Xcode 12+. The default target bundle identifier is com.facebook.WebDriverAgentRunner.xctrunner , although it could be customized by providing the appium:updatedWDABundleId capability value (the .xctrunner suffix is added automatically). Please read Run Preinstalled WebDriverAgentRunner for more details. Defaults to false . |
true or false |
appium:updatedWDABundleIdSuffix |
Add suffix for the bundle id provided by the appium:updatedWDABundleId capability value in appium:usePreinstalledWDA capability usage since XCUITest driver v7.6.0. This is for an advanced usage that sets an arbitrary CFBundleIdentifier for prebuilt WebDriverAgent package to sign with the bundle identifier's certificate. For example, if you would need to sign a WebDriverAgent package with io.appium.wda bundle identifier's certificate, the WebDriverAgent's package must have the same bundle identifier as CFBundleIdentifier . Then, the WebDriverAgent package can be launched by io.appium.wda , which does not have .xctrunner . Then "appium:updatedWDABundleIdSuffix": "" (an empty string) helps. Please read Run Preinstalled WebDriverAgentRunner for more details. Defaults to .xctrunner . |
"" , ".customsuffix" |
appium:shouldUseSingletonTestManager |
Use default proxy for test management within WebDriverAgent . Setting this to false sometimes helps with socket hangup problems. Defaults to true . |
false |
appium:waitForIdleTimeout |
The amount of time in float seconds to wait until the application under test is idling. XCTest requires the app's main thread to be idling in order to execute any action on it, so WDA might not even start/freeze if the app under test is constantly hogging the main thread. The default value is 10 (seconds). Setting it to zero disables idling checks completely (not recommended) and has the same effect as setting waitForQuiescence to false . Available since Appium 1.20.0. |
1 |
appium:useXctestrunFile |
Use Xctestrun file to launch WDA. It will search for such file in bootstrapPath . Expected name of file is WebDriverAgentRunner_iphoneos<sdkVersion>-arm64.xctestrun for real device and WebDriverAgentRunner_iphonesimulator<sdkVersion>-x86_64.xctestrun for simulator. One can do build-for-testing for WebDriverAgent project for simulator and real device and then you will see Product Folder like this and you need to copy content of this folder at bootstrapPath location. Since this capability expects that you have already built WDA project, it neither checks whether you have necessary dependencies to build WDA nor will it try to build project. Defaults to false . Tips: Xcodebuild builds for the target platform version. We'd recommend you to build with minimal OS version which you'd like to run as the original WDA module. e.g. If you build WDA for 12.2, the module cannot run on iOS 11.4 because of loading some module error on simulator. A module built with 11.4 can work on iOS 12.2. (This is xcodebuild's expected behaviour.) |
true |
Deprecated appium:useSimpleBuildTest |
Build with build and run test with test in xcodebuild for all Xcode version if this is true , or build with build-for-testing and run tests with test-without-building for over Xcode 8 if this is false . Defaults to false . |
true or false |
appium:wdaEventloopIdleDelay |
Delays the invocation of -[XCUIApplicationProcess setEventLoopHasIdled:] by the number of seconds specified with this capability. This can help quiescence apps that fail to do so for no obvious reason (and creating a session fails for that reason). This increases the time for session creation because -[XCUIApplicationProcess setEventLoopHasIdled:] is called multiple times. If you enable this capability start with at least 3 seconds and try increasing it, if creating the session still fails. Defaults to 0 . |
5 |
appium:processArguments |
Process arguments and environment which will be sent to the WebDriverAgent server in a new session request. Please use mobile: launchApp to launch an application with process arguments in the middle of a session. |
{ args: ["a", "b", "c"] , env: { "a": "b", "c": "d" } } or '{"args": ["a", "b", "c"], "env": { "a": "b", "c": "d" }}' |
appium:autoLaunch |
When set to false , prevents the application under test from being launched automatically as a part of the new session startup process. The launch become the responsibility of the user. Defaults to true . |
true or false |
appium:allowProvisioningDeviceRegistration |
Allow xcodebuild to register your destination device on the developer portal if necessary. Requires a developer account to have been added in Xcode's Accounts preference pane. Defaults to false . |
true or false |
appium:resultBundlePath |
Specify the path to the result bundle path as xcodebuild argument for WebDriverAgent build under a security flag (Please check Opt-in Features section below). WebDriverAgent process must start/stop every time to pick up changed value of this property. Specifying useNewWDA to true may help there. Please read man xcodebuild for more details. |
/path/to/resultbundle |
appium:resultBundleVersion |
Specify the version of result bundle as xcodebuild argument for WebDriverAgent build. The default value depends on your Xcode version. Please read man xcodebuild for more details. |
/path/to/resultbundle |
appium:maxTypingFrequency |
Maximum frequency of keystrokes for typing and clear. If your tests are failing because of typing errors, you may want to adjust this. Defaults to 60 keystrokes per minute. | 30 |
appium:simpleIsVisibleCheck |
Use native methods for determining visibility of elements. In some cases this takes a long time. Setting this capability to false will cause the system to use the position and size of elements to make sure they are visible on the screen. This can, however, lead to false results in some situations. Defaults to false . |
true , false |
Deprecated appium:waitForQuiescence |
It allows to turn on/off waiting for application quiescence in WebDriverAgent , while performing queries. The default value is true . You can avoid this kind of issues if you turn it off. Consider using waitForIdleTimeout capability instead for this purpose since Appium 1.20.0 |
false |
appium:mjpegServerPort |
The port number on which WDA broadcasts screenshots stream encoded into MJPEG format from the device under test. It might be necessary to change this value if the default port is busy because of other tests running in parallel. Default value: 9100 |
12000 |
appium:mjpegScreenshotUrl |
The URL of a service that provides realtime device screenshots in MJPEG format. If provided then the actual command to retrieve a screenshot will be requesting pictures from this service rather than directly from the server. Appium does not handle port forward etc to the URL. | http://<ip address to the device>:9100 |
appium:screenshotQuality |
Changes the initial quality of display screenshots. This capability affects the screenshoting speed and the actual quality of resulting screenshots. Before version 5.4.0 of WebDriverAgent possible values were: 0 , 1 (default), 2 , where 0 abbreviates lossless PNG, 1 is a high-quality JPEG and 2 is a low-quality JPEG. In the version 5.4.0 one more mode has been added (3 ), which is now the default one. It abbreviates lossless HEIC with fallback to PNG if the device does not support hardware-accelerated HEIC encoding. You can also change the value of screenshotQuality in settings. |
2 |
appium:autoAcceptAlerts |
Accept all iOS alerts automatically if they pop up. This includes privacy access permission alerts (location, contacts, photos). Default is false . |
true or false |
appium:autoDismissAlerts |
Dismiss all iOS alerts automatically if they pop up. This includes privacy access permission alerts (location, contacts, photos). Default is false . |
true or false |
appium:disableAutomaticScreenshots |
Disable automatic screenshots taken by XCTest at every interaction. Default is up to WebDriverAgent 's config to decide, which currently defaults to true . |
true or false |
appium:shouldTerminateApp |
Specify if the app should be terminated on session end. This capability only has an effect if an application identifier has been passed to the test session (either explicitly, by setting bundleId, or implicitly, by providing app). Default is true unless noReset capability is set to true . |
true or false |
appium:forceAppLaunch |
Specify if the app should be forcefully restarted if it is already running on session startup. This capability only has an effect if an application identifier has been passed to the test session (either explicitly, by setting bundleId, or implicitly, by providing app). Default is true unless noReset capability is set to true . |
true or false |
appium:useNativeCachingStrategy |
Set this capability to false in order to use the custom elements caching strategy. This might help to avoid stale element exception on property change. By default the native XCTest cache resolution is used (true ) for all native locators (e.g. all, but xpath). Check the corresponding WebDriverAgent pull request for more details. |
true or false |
appium:appLaunchStateTimeoutSec |
Allows to set the timeout in float seconds for the application state change on the session startup in range (0, 240) exclusively. The default value for it in XCTest is 60 seconds, which means WDA would throw an exception if the application under test is not ready for accessibility interactions in 60s after its process has started. Important: The fact the application's user interface is visible does not necessarily mean it could be immediately interacted with by XCTest. The latter must ensure the app's main thread is also idling. Setting this capability to a lower value might help to avoid prolonged test startup with problematic apps taking too much time to be ready and fail fast. It is not advised to increase the capability value above 60 seconds, rather consider fixing the affected application itself. Too low values though may cause unexpected app startup failures. The capability does not have an effect if the app under test is not (re)started at the beginning of the session. | 10.5 |
Simulator¶
Capability |
Description | Example |
---|---|---|
appium:orientation |
Start a test session in a certain orientation. Note, that Simulator may ignore this capability if the simulated device itself does not support orientation change in its current state. For example, iPhones only allow orientation change to landscape if an app that declares landscape support in its manifest is running. Thus changing the orientation from portrait to something else being on home screen won't have any effect. | LANDSCAPE or PORTRAIT |
appium:scaleFactor |
Simulator scale factor. This is useful to have if the default resolution of simulated device is greater than the actual display resolution, so you can scale the simulator to see the whole device screen without scrolling. Must be a string containing a positive float value. | '2.0' |
appium:connectHardwareKeyboard |
Set this option to true in order to enable hardware keyboard in Simulator. The preference works only when XCUITest driver launches a simulator instance with this value. It is set to false by default, because this helps to workaround some XCTest bugs. connectHardwareKeyboard: true makes forceSimulatorSoftwareKeyboardPresence: false if no explicit value is set for forceSimulatorSoftwareKeyboardPresence capability since Appium 1.22.0. |
true or false |
appium:forceSimulatorSoftwareKeyboardPresence |
Set this option to true in order to turn software keyboard on and turn hardware keyboard off in Simulator since Appium 1.22.0. This option helps to avoid Keyboard is not present error. It is set to true by default. XCUITest driver respects preset simulator software/hardware keyboard preference when this value is false , so connectHardwareKeyboard: false and forceSimulatorSoftwareKeyboardPresence: false means for XCUITest driver to keep the current Simulator keyboard preferences. This option has priority over connectHardwareKeyboard . |
true or false |
appium:skipSyncUiDialogTranslation |
Set this option to true in order to skip synchronizing UI dialogs translation. While this option might leave some system UI alerts untranslated, it helps to avoid unexpected side effects (see this issue for more details). It is set to false by default. |
true or false |
Deprecated appium:calendarAccessAuthorized |
This capability is obsolete. Please use appium:permissions one instead with the calendar key. |
true or false |
appium:isHeadless |
Set this capability to true if automated tests are running on Simulator and the device display is not needed to be visible. This only has an effect since Xcode9 and only for simulators. All running instances of Simulator UI are going to be automatically terminated if headless test is started. false is the default value. |
true |
appium:simulatorWindowCenter |
Allows to explicitly set the coordinates of Simulator window center for Xcode9+ SDK. This capability only has an effect if Simulator window has not been opened yet for the current session before it started. Must be a tuple containing floats or integers, with no spaces. | {-100.0,100.0} |
appium:simulatorStartupTimeout |
Allows to change the default timeout for Simulator startup. By default this value is set to 120000ms (2 minutes), although the startup could take longer on a weak hardware or if other concurrent processes use much system resources during the boot up procedure. | 300000 |
appium:simulatorTracePointer |
Whether to highlight pointer moves in the Simulator window. The Simulator UI client must be shut down before the session startup in order for this capability to be applied properly. false by default. |
true |
appium:shutdownOtherSimulators |
If this capability set to true and the current device under test is an iOS Simulator then Appium will try to shutdown all the other running Simulators before to start a new session. This might be useful while executing webview tests on different devices, since only one device can be debugged remotely at once due to an Apple bug. The capability only has an effect if --relaxed-security command line argument is provided to the server. Defaults to false . |
true |
appium:enforceFreshSimulatorCreation |
Creates a new simulator in session creation and deletes it in session deletion. Defaults to false . |
true or false |
appium:keepKeyChains |
Set the capability to true in order to preserve Simulator keychains folder after full reset. This feature has no effect on real devices. Defaults to false |
true |
appium:keychainsExcludePatterns |
This capability accepts comma-separated path patterns, which are going to be excluded from keychains restore while full reset is being performed on Simulator. It might be useful if you want to exclude only particular keychain types from being restored, like the applications keychain. This feature has no effect on real devices. | *keychain*.db* |
appium:reduceMotion |
It allows to turn on/off reduce motion accessibility preference. Setting reduceMotion on helps to reduce flakiness during tests. Only on simulators |
true |
appium:reduceTransparency |
It allows you to turn on/off reduce transparency accessibility preference. Setting reduceTransparency on helps to reduce screenshot image distortion during tests. Only on simulators |
true |
appium:autoFillPasswords |
It allows you to turn on/off autofill passwords function when text field is foccused. Works only with iOS16.4+ simulators | true |
appium:permissions |
Allows to set permissions for the specified application bundle on Simulator only. The capability value is expected to be a valid JSON string with {"<bundleId1>": {"<serviceName1>": "<serviceStatus1>", ...}, ...} format. Since Xcode SDK 11.4 Apple provides native APIs to interact with application settings. Check the output of xcrun simctl privacy booted command to get the list of available permission names. Use yes , no and unset as values in order to grant , revoke or reset the corresponding permission. Below Xcode SDK 11.4 it is required that applesimutils package is installed and available in PATH. The list of available service names and statuses can be found at https://github.com/wix/AppleSimulatorUtils. |
{"com.apple.mobilecal": {"calendar": "YES"}} |
appium:iosSimulatorLogsPredicate |
Set the --predicate flag in the ios simulator logs |
'process != "locationd" AND process != "DTServiceHub"' AND process != "mobileassetd" |
appium:simulatorPasteboardAutomaticSync |
Handle the -PasteboardAutomaticSync flag when simulator process launches. It could improve launching simulator performance not to sync pasteboard with the system when this value is off . on forces the flag enabled. system does not provide the flag to the launching command. on , off , or system is available. They are case insensitive. Defaults to off |
system |
appium:simulatorDevicesSetPath |
This capability allows to set an alternative path to the simulator devices set in case you have multiple sets deployed on your local system. Such feature could be useful if you, for example, would like to save disk space on the main system volume. | /MyVolume/Devices |
appium:safariGlobalPreferences |
Allows changing of Mobile Safari's preferences at the session startup. Check the documentation on arguments of mobile: updateSafariPreferences extension to get more details on the value type requirements. Only available on real devices since driver version 7.9.0. A new Safari instance must be launched upon test startup for this capability to take effect on real devices. | { ShowTabBar: 0, WarnAboutFraudulentWebsites: 0 } |
Web Context¶
Capability |
Description | Example |
---|---|---|
pageLoadStrategy |
One of the available page load strategies. See https://www.w3.org/TR/webdriver/#capabilities. Default normal . |
eager |
appium:absoluteWebLocations |
This capability will direct the Get Element Location command, when used within webviews, to return coordinates which are relative to the origin of the page, rather than relative to the current scroll offset. This capability has no effect outside of webviews. Default false . |
true |
appium:safariGarbageCollect |
Turns on/off Web Inspector garbage collection when executing scripts on Safari. Turning on may improve performance. Defaults to false . |
true or false |
appium:includeSafariInWebviews |
Add Safari web contexts to the list of contexts available during a native/webview app test. This is useful if the test opens Safari and needs to be able to interact with it. Defaults to false . |
true or false |
appium:safariLogAllCommunication |
Log all plists sent to and received from the Web Inspector, as plain text. For some operations this can be a lot of data, so it is recommended to be used only when necessary. Defaults to false . |
true or false |
appium:safariLogAllCommunicationHexDump |
Log all communication sent to and received from the Web Inspector, as raw hex dump and printable characters. This logging is done before any data manipulation, and so can elucidate some communication issues. Like appium:safariLogAllCommunication , this can produce a lot of data in some cases, so it is recommended to be used only when necessary. Defaults to false . |
true or false |
appium:safariSocketChunkSize |
The size, in bytes, of the data to be sent to the Web Inspector on iOS 11+ real devices. Some devices hang when sending large amounts of data to the Web Inspector, and breaking them into smaller parts can be helpful in those cases. Defaults to 16384 (also the maximum possible) |
1000 |
appium:safariWebInspectorMaxFrameLength |
The maximum size in bytes of a single data frame for the Web Inspector. Too high values could introduce slowness and/or memory leaks. Too low values could introduce possible buffer overflow exceptions. Defaults to 20MB (20*1024*1024 ) |
1024 , 100*1024*1024 |
appium:additionalWebviewBundleIds |
Array (or JSON array) of possible bundle identifiers for webviews. This is sometimes necessary if the Web Inspector is found to be returning a modified bundle identifier for the app. If the value includes * , XCUITest driver will return all available webview contexts on the device. Defaults to [] |
["io.appium.modifiedId', 'ABCDEF"] , ["*"] |
appium:webviewAtomWaitTimeout |
The time to wait, in ms , for each atom execution timeout of webviews in MobileSafari or hybrid apps. Defaults to 120000 . If the value was zero or less, the timeout keeps the default value. |
20000 |
appium:safariIgnoreWebHostnames |
Provide a list of hostnames (comma-separated) that the Safari automation tools should ignore. This is to provide a workaround to prevent a webkit bug where the web context is unintentionally changed to a 3rd party website and the test gets stuck. The common culprits are search engines (yahoo, bing, google) and about:blank |
'www.yahoo.com, www.bing.com, www.google.com, about:blank' |
appium:nativeWebTap |
Enable native, non-javascript-based taps being in web context mode. Defaults to false . Warning: sometimes the preciseness of native taps could be broken, because there is no reliable way to map web element coordinates to native ones. |
true |
appium:nativeWebTapStrict |
Enabling this capability would skip the additional logic that tries to match web view elements to native ones by using their textual descriptions. Depending on the actual web view content this algorithm might sometimes be not very reliable and will slow down each click as we anyway fallback to the usual coordinates transformation flow if it fails. It is advised to enable strict tap if you use mobile: calibrateWebToRealCoordinatesTranslation extension. Only applicable if nativeWebTap is enabled. false by default |
true |
appium:safariInitialUrl |
Initial safari url, default is a local welcome page. Setting it to an empty string will skip the initial navigation. | https://www.github.com |
appium:safariAllowPopups |
Allow javascript to open new windows in Safari. Default keeps the current setting. Only available on real devices since driver version 7.9.0. A new Safari instance must be launched upon test startup on real devices for this capability to take effect. | true or false |
appium:safariIgnoreFraudWarning |
Prevent Safari from showing a fraudulent website warning. Default keeps the current setting. Only available on real devices since driver version 7.9.0. A new Safari instance must be launched upon test startup on real devices for this capability to take effect. | true or false |
appium:safariOpenLinksInBackground |
Whether Safari should allow links to open in new windows. Default keeps the current sim setting. Only available on real devices since driver version 7.9.0. A new Safari instance must be launched upon test startup on real devices for this capability to take effect. | true or false |
appium:webviewConnectRetries |
The maximum number of retries before giving up on web view pages detection. Under the hood the remote debugger waits until webkit delivers the list of connected applications pages (_rpc_applicationSentListing ). The delay between each retry is 500ms, which creates a minimum 10s of waiting time with the default retries amount of 20 . |
10 |
appium:webviewConnectTimeout |
The time to wait, in ms , for the presence of webviews in MobileSafari or hybrid apps. Under the hood the remote debugger waits until webkit delivers the list of connected applications (_rpc_reportConnectedApplicationList ) after sending a request for setting the connection key (_rpc_reportIdentifier ). For better stability it might be necessary to increase this value if you run tests on Simulator and the host does not perform fast enough, for example in the continuous integration environment. 5000 ms by default. |
10000 |
appium:enableAsyncExecuteFromHttps |
Capability to allow simulators to execute asynchronous JavaScript on pages using HTTPS. Defaults to false |
true or false |
appium:fullContextList |
Returns the detailed information on contexts for the Get Contexts command. If this capability is enabled, then each item in the returned contexts list would additionally include WebView title, full URL and the bundle identifier. Defaults to false . |
true or false |
appium:enablePerformanceLogging |
Enable Safari's performance logging (default false ) |
true , false |
appium:autoWebview |
Move directly into Webview context if available. Default false |
true , false |
appium:skipTriggerInputEventAfterSendkeys |
If this capability is set to true , then whenever you call the Send Keys method in a web context, the driver will not fire an additional input event on the input field used for the call. This event, turned on by default, helps in situations where JS frameworks (like React) do not respond to the input events that occur by default when the underlying Selenium atom is executed. Default false |
true , false |
appium:sendKeyStrategy |
If this capability is set to oneByOne , then whenever you call the Send Keys method in a web context, the driver will type each character the given string consists of in serial order to the element. This strategy helps in situations where JS frameworks (like React) update the view for each input. If appium:skipTriggerInputEventAfterSendkeys capability is true , it will affect every type. For example, when you are going to type the word appium with oneByOne strategy and appium:skipTriggerInputEventAfterSendkeys is enabled, the appium:skipTriggerInputEventAfterSendkeys option affects each typing action: a , p , p ,i , u and m . Suppose any other value or no value has been provided to the appium:sendKeyStrategy capability. In that case, the driver types the given string in the destination input element. appium Send Keys input types appium if oneByOne was not set. |
oneByOne |
appium:showSafariConsoleLog |
Adds Safari JavaScript console events to Appium server logs (true ) and writes fully serialized events into the safariConsole logs bucket (both true and false ). If unset then no console events are being collected, which helps to save CPU and memory resources. Before the driver version 7.22 the default behavior was to always collect console logs if the capability is not set. Setting the value to false mimics that legacy behavior. |
true , false |
appium:showSafariNetworkLog |
Adds Safari network events to Appium server logs (true ) and writes fully serialized events into the safariNetwork logs bucket (both true and false ). If unset then no network events are being collected, which helps to save CPU and memory resources. Before the driver version 7.22 the default behavior was to always collect network logs if the capability is not set. Setting the value to false mimics that legacy behavior. |
true , false |
Other¶
Capability |
Description | Example |
---|---|---|
appium:resetOnSessionStartOnly |
Whether to perform reset on test session finish (false ) or not (true ). Keeping this variable set to true and Simulator running (the default behaviour since version 1.6.4) may significantly shorten the duration of test session initialization. Defaults to true |
true or false |
appium:commandTimeouts |
Custom timeout(s) in milliseconds for WDA backend commands execution. This might be useful if WDA backend freezes unexpectedly or requires too much time to fail and blocks automated test execution. The value is expected to be of type string and can either contain max milliseconds to wait for each WDA command to be executed before terminating the session forcefully or a valid JSON string, where keys are internal Appium command names (you can find these in logs, look for "Executing command 'command_name'" records) and values are timeouts in milliseconds. You can also set the 'default' key to assign the timeout for all other commands not explicitly enumerated as JSON keys. | '120000' , '{"findElement": 40000, "findElements": 40000, "setValue": 20000, "default": 120000}' |
appium:useJSONSource |
Get JSON source from WDA and transform it to XML on the Appium server side. Defaults to false . |
true |
appium:skipLogCapture |
Skips to start capturing logs such as crash, system, safari console and safari network. It might improve performance such as network. Log related commands will not work. Defaults to false . |
true or false |
appium:launchWithIDB |
Launch WebDriverAgentRunner with idb instead of xcodebuild. This could save a significant amout of time by skiping the xcodebuild process, although the idb might not be very reliable, especially with fresh Xcode SDKs. Check the idb repository for more details on possible compatibility issues. Defaults to false |
true or false |
appium:showIOSLog |
Whether to show any logs captured from a device in the appium logs. Default false |
true or false |
appium:clearSystemFiles |
Whether to clean temporary XCTest files (for example logs) when a testing session is closed. false by default |
true or false |
appium:newCommandTimeout |
How long (in seconds) the driver should wait for a new command from the client before assuming the client has stopped sending requests. After the timeout the session is going to be deleted. 60 seconds by default. Setting it to zero disables the timer. |
100 |