Automation Capabilities

Applies to CrossBrowserTesting SaaS, last modified on January 10, 2023

The following is a list of possible Selenium capabilities you can use when executing tests across CrossBrowserTesting’s service.

Selenium capabilities – desktops

Key Values* Capability
browserName chrome, firefox, safari, internet explorer, edge The name of the browser for your test. REQUIRED
version Ex: 60, 60x64, 59, etc. The browser version for the browser name specified above. Must be a valid version. Can be "latest", "latest-1", "latest-2"; for one of latest three versions. If not provided will default to "latest".
platform Windows 10, Windows 8.1, Windows 8, Windows 7 64-Bit, Windows 7

Mac OSX 10.12, Mac OSX 10.11, Mac OSX 10.10
Platform selected for testing. If no platform is selected, we will default to an appropriate OS for the browser chosen.

Standard selenium platforms are also supported:
Windows, XP, Vista, Win7, Win8, Win8.1, Win10
Mac, Mac Os, Os X, macOS, Mountain Lion, Mavericks, Yosemite, El Capitan, Sierra
screenResolution Ex: 1024x768, 1600x1200 The preferred resolution of the OS for the test. The default is 1366x768.

*Values are case-insensitive and spacing-independent. WINDOWS 7 or windows7 will both work.

Appium capabilities – mobile devices

Key Values* Capability
browserName chrome, safari The name of the browser for your test. REQUIRED

There is only one version of the browser per device, so no version number can or needs to be specified.
platformName iOS, Android This field is a convention for matching appium-style capabilities but is not required by our system. It is a good idea to include with scripts that may be run against different remote servers.
platformVersion Ex: 7.0, 9.3, etc The version of the mobile OS. This should match the appropriate device below. At this time we only offer one OS version per device so can be safely dropped if you are unsure.
deviceName Android Platforms: Nexus 9, Pixel 3, Pixel 2, Galaxy S8, Galaxy S7, Nexus 6

iOS Platforms: iPhone 7 Plus Simulator, iPhone 7 Simulator, iPhone 8, iPhone X, iPhone XR, iPhone 6s Plus Simulator, iPhone 6s Simulator, iPad Pro Simulator, iPad Air 2 Simulator, iPad 6th Gen
The name of the device. Should match the browserName such that Chrome is for Androids, and Safari is for iPads and iPhones. If not provided, the most recent device will be used for the browserName specified.
deviceOrientation landscape, portrait Will default to portrait for phones and landscape for tablets.

*Values are case-insensitive and spacing-independent.

CrossBrowserTesting-specific capabilities

Key Values Capability
name Ex: Login Form Test Name of your test.
build Ex: 2.4 Number of the build within your test.
record_video true, false Start a video recording of your screen during the test session (max length 10 minutes).
record_network true, false Start a recording of your network packets during the test session.
max_duration Ex. 1200 Max test length in seconds. Use to refrain from timing out during long tests. Default is 30 minutes.
idle_timeout Ex. 100 Use to end test if a command is not received in a certain amount of time. Default is 3 minutes.
timezone Ex. GMT+06:00 Timezone set on the browser. To learn all available values, see List of Timezones.

Default Selenium capabilities

Key Values Capability
javascriptEnabled true, false Whether the session supports executing user supplied JavaScript in the context of the current page (only on HTMLUnitDriver).
databaseEnabled true, false Whether the session can interact with database storage.
locationContextEnabled true, false Whether the session can set and query the browser's location context.
applicationCacheEnabled true, false Whether the session can interact with the application cache.
browserConnectionEnabled true, false Whether the session can query for the browser's connectivity and disable it if desired.
webStorageEnabled true, false Whether the session supports interactions with storage objects.
acceptSslCerts true, false Whether the session should accept all SSL certs by default.
rotatable true, false Whether the session can rotate the current page's current layout between portrait and landscape orientations (only applies to mobile platforms).
nativeEvents true, false Whether the session is capable of generating native events when simulating user input.
proxy proxy object Details of any proxy to use. If no proxy is specified, whatever the system's current or default state is used. The format is specified under Proxy JSON Object.
unexpectedAlertBehaviour accept, dismiss, ignore What the browser should do with an unhandled alert before throwing out the UnhandledAlertException.
elementScrollBehavior integer Allows the user to specify whether elements are scrolled into the viewport for interaction to align with the top (0) or bottom (1) of the viewport. The default value is to align with the top of the viewport. Supported in IE and Firefox (since 2.36).

Firefox specific capabilites

Key Values Capability
loggingPrefs LoggingPreferences object Preferences for logging.
firefox_binary string Path to firefox binary file to use.
pageLoadingStrategy string See https://w3c.github.io/webdriver/webdriver-spec.html#the-page-load-strategy.

IE specific capabilities

Key Values Capability
ignoreProtectedModeSettings true, false Whether to skip the protected mode check. If set, tests may become flaky, unresponsive, or browsers may hang. If not set, and protected mode settings are not the same for all zones, an exception will be thrown on driver construction. Only "best effort" support is provided when using this capability.
ignoreZoomSetting true, false Indicates whether to skip the check that the browser's zoom level is set to 100%. Value is set to false by default.
initialBrowserUrl string Allows the user to specify the initial URL loaded when IE starts. Intended to be used with ignoreProtectedModeSettings to allow the user to initialize IE in the proper Protected Mode zone. Using this capability may cause browser instability or flaky and unresponsive code. Only "best effort" support is provided when using this capability.
enablePersistentHover true, false Determines whether persistent hovering is enabled (true by default). Persistent hovering is achieved by continuously firing mouse over events at the last location the mouse cursor has been moved to.
enableElementCacheCleanup true, false Determines whether the driver should attempt to remove obsolete elements from the element cache on page navigation (true by default). This is to help manage the IE driver's memory footprint, removing references to invalid elements.
requireWindowFocus true, false Determines whether to require that the IE window have focus before performing any user interaction operations (mouse or keyboard events). This capability is false by default, but delivers much more accurate native events interactions.
browserAttachTimeout integer The timeout, in milliseconds, that the driver will attempt to locate and attach to a newly opened instance of Internet Explorer. The default is zero, which indicates waiting indefinitely.
ie.forceCreateProcessApi true, false Forces launching Internet Explorer using the CreateProcess API. If this option is not specified, IE is launched using the IELaunchURL, if it is available. For IE 8 and above, this option requires the TabProcGrowth registry value to be set to 0.
ie.browserCommandLineSwitches string Specifies command-line switches with which to launch Internet Explorer. This is only valid when used with the forceCreateProcess.
ie.usePerProcessProxy true, false When a proxy is specified using the proxy capability, this capability sets the proxy settings on a per-process basis when set to true. The default is false, which means the proxy capability will set the system proxy, which IE will use.
ie.ensureCleanSession true, false When set to true, this capability clears the cache, cookies, history, and saved form data. When using this capability, be aware that this clears the cache for all running instances of Internet Explorer, including those started manually.
logFile string The path to file where server should write log messages to. By default it writes to stdout.
logLevel string The log level used by the server. Valid values are TRACE, DEBUG, INFO, WARN, ERROR, and FATAL. Defaults to FATAL if not specified.
host string The address of the host adapter on which the server will listen for commands.
extractPath string The path to the directory used to extract supporting files used by the server. Defaults to the TEMP directory if not specified.
silent true, false Suppresses diagnostic output when the server is started.
ie.setProxyByServer true, false Defines used proxy setter. False means WindowsProxyManager will be used for setting proxy settings. True means IEDriverServer will be used for setting proxy settings. Currently it is False by default. In next releases it will be set to True by default and removed.

Safari specific capabilites

Key Values Capability
safari.options object A map of configuration options, as enumerated below.

See Also

Watir
CodeCeption

Highlight search results