Skip to end of metadata
Go to start of metadata

These are the desired capabilities that you must include in your Appium and Selenium test scripts to configure the basic testing environment. You can also use the Platform Configurator to set the desired capabilities for your test in the scripting language of your choice. Test Configuration Options includes a complete list of all the Selenium, Appium, and Sauce Labs testing options.

Required Selenium Test Configuration Settings

SettingDescriptionKeyValue TypeExample

Browser Name

The name of the browser test against. See the Platform Configurator for available options.

browserName string "browserName": "firefox"

Browser Version

The version of the browser you want to use in your test.version string 

"version": "45.0"

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 "version": "latest". You can also use "version": "latest-1" or "version": "latest-2", etc. to request the next most recent versions of a browser. For example, if the latest stable version of Chrome is 48, you can request "latest-2" to use Chrome 46. 

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 September 2017 has the browser application version 40.15063 and the EdgeHTML version 15.15063. The Wikipedia page on Microsoft Edge covers this in more detail: https://en.wikipedia.org/wiki/Microsoft_Edge
It is the EdgeHTML version that should be specified here, such as "version": "15" or "version": "15.15063".

Platform

Which operating system the browser should be running on. See the Platform Configurator for available options.

platform string "platform": "OS X 10.9"

Required Appium Test Configuration Settings

SettingDescriptionKeyValue TypeExample
Appium VersionThe version of Appium that you want to run your tests with.appiumVersionstring

"appiumVersion": "1.5.3"

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 appiumVersion capability. You can find the release notes for each Appium version at the Appium GitHub repositotry. 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.browserNamestring

"browserName": "Safari"

Empty String for Mobile Native and Hybrid Apps

If you're testing a mobile native application or a mobile hybrid application, the value for this capability should be an empty string. Check out Native and Hybrid Applications: What's the Difference? for more information. 

Device Name

The name of the simulator, emulator, or device you want to use in the test.deviceNamestring

"deviceName": "Google Nexus 7 HD Emulator"

Generic Android Emulator

For an Android emulator test you can request a generic Android emulator by using the option "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".

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 Platforms Configurator to get a list of the available Android emulator skins for the various Android emulator versions. Supported Android Emulators describes the qualities for each type of emulator that Sauce Labs supports.

Platform Version

The mobile operating system version that you want to use in your test. platformVersionstring"platformVersion": "9.1"

Platform Name

The mobile operating system platform you want to use in your test.platformNamestring"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 the Temporary Sauce Storage, for example, sauce-storage:myapp.zip, or the URL to a remote location where your app is located, for example http://myappurl.zip/.appstring

"app": "sauce-storage:my_app.zip"

Required for Mobile Native and Hybrid Apps Only

This capability is required only for testing mobile native or mobile hybrid applications. See Native and Hybrid Applications: What's the Difference? for more information

Not Required for Android

 This capability is not required for Android if you specify the appPackage and appActivity capabilities.


  • No labels

2 Comments

  1. 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.

  2. 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");