You can configure the environment for your Appium and Selenium tests by specifying a set of desired capabilities. Our Platform Configurator can set desired capabilities for testing in the scripting language of your choice. Test Configuration Options provides a complete list of all Selenium, Appium, and Sauce Labs testing capabilities.
See the following sections for more information.
Required Selenium Test Configuration Settings
The name of the browser test against. Default to Latest Version of Chrome or Firefox If you want to use the latest stable version of Google Chrome or Firefox that Sauce supports, you can use Microsoft Edge versions Microsoft Edge has two version numbers, the browser application version and the EdgeHTML rendering engine version. For example, the current stable release of Edge as of November 2019 has the browser application version 44.17763 and the EdgeHTML version 18.17763. The Wikipedia page on Microsoft Edge covers this in more detail: https://en.wikipedia.org/wiki/Microsoft_Edge Which operating system the browser should be running on.Setting Description Key Value Type Example Browser Name
browserName
string "browserName": "firefox"
Browser Version
The version of the browser you want to use in your test. browserVersion
string "browserVersion": "latest"
"browserVersion": "latest".
You can also use "browserVersion": "latest-1"
or "browserVersion": "latest-2"
, etc. to request the next most recent versions of a browser. For example, if the latest stable version of Chrome is 73, you can request "latest-2"
to use Chrome 71.
It is the EdgeHTML version that should be specified here, such as "browserVersion": "18.17763"
.Platform Name
platformName
string "platformName": "macOS 10.13"
Required Appium Test Configuration Settings
Default Appium Version If you don’t select an Appium Version for your test in the Platform Configurator, this capability will automatically default to the latest version of Appium that is compatible with your selected OS. If you prefer to use a different version of Appium for your test, enter the version number you want as the value for the For Web Apps If you're running a test on an Android emulator, you'll need to specify For iOS simulators, you'll need to specify For Mobile Native and Hybrid Apps If you're testing a mobile native or hybrid app, the value for this capability should be an empty string. Generic Android Emulator For an Android emulator test you can request a generic Android emulator by using the option Emulator Skins and Configurations Each Android emulator skin will have a different configuration depending on the phone or tablet that it emulates. For example, all the skins have different resolutions, screen dimensions, pixel densities, memory, etc. You can use the Platform Configurator to get a list of the available Android emulator skins for the various Android emulator versions. Required for Mobile Native and Hybrid Apps Only This capability is required only for testing mobile native or web applications.Setting Description Key Value Type Example Appium Version The version of Appium that you want to run your tests with. appiumVersion
string "appiumVersion": "1.5.3"
appiumVersion
capability. You can find the release notes for each Appium version at the Appium GitHub repository. In order for you to have a window of time to check the compatibility of your test suites with the latest Appium version, it won't be set as the default version on Sauce until one week after the version release. Browser Name
The mobile web browser that will be automated in the simulator, emulator or device. browserName
string "browserName": "Safari"
"Browser"
(the Android stock browser for older Android versions) and "Chrome"
(for newer Android versions)."Safari"
.Device Name
The name of the simulator, emulator, or device you want to use in the test. deviceName
string "deviceName": "Google Nexus 7 HD Emulator"
"deviceName":"Android Emulator"
. If you want to use an Android emulator that looks and feels like a specific Android phone or tablet, for example a Google Nexus 7 HD Emulator or a Samsung Galaxy S4, then instead of "deviceName":"Android Emulator",
you need to specify the exact Android emulator skin to use, for example "deviceName":"Samsung Galaxy S4 Emulator"
.Platform Version
The mobile operating system version that you want to use in your test. platformVersion
string "platformVersion": "9.1"
Platform Name
The mobile operating system platform you want to use in your test. platformName
string "platformName": "iOS"
Application Path
The path to a .ipa
, .apk
or .zip
file containing the app to test. This could be the location of your app in Sauce App Storage (e.g., storage:filename=myapp.zip
) or the URL to a remote location where your app is located (e.g., http://myappurl.zip
).app
string "app": "storage:filename=my_app.zip"
2 Comments
Anonymous
How do I simulate clicking on a link opens in a new tab?? How to I set the desired capabilities to open a link in new tab? I tried to set safariOpenLinksInBackground to true and to false. But it just opens the link in the same page.
Anonymous
I am getting the error The Sauce VMs failed to start the browser or device.
I am using the following desired capabilities generated by the Platform configurator
DesiredCapabilities caps = DesiredCapabilities.android();
caps.setCapability("appiumVersion", "1.5.3");
caps.setCapability("deviceName","Samsung Galaxy S4 Emulator");
caps.setCapability("deviceOrientation", "portrait");
caps.setCapability("browserName", "");
caps.setCapability("platformVersion","4.4");
caps.setCapability("platformName","Android");
caps.setCapability("app","sauce-storage:com.google.android.youtube_11.35.60-113560130.apk");