Page tree
Skip to end of metadata
Go to start of metadata


In general, Capabilities describes a series of key/value pairs that can customize or configure a Device or Browser session for testing to Selenium or Appium WebDriver.

Continuous Testing extends these capabilities and introduces Device Query capability. It is a special type of capability which describes one or more capabilities in a single query like input. 

The code snippet below is used to set Device Query using Selenium\Appium Java client bindings.

Device Query settings
 * Creates an Android Driver with Desired Capabilities.
protected void createDriverWithCapabilities() {"Setting up Desired Capabilities");
    String accessKey = System.getenv(ENV_VAR_ACCESS_KEY);

    dc.setCapability(SeeTestCapabilityType.ACCESS_KEY, accessKey);
    String deviceQuery = String.format("@os=android and @dhmlocation='us-1'", "android");
    dc.setCapability(SeeTestCapabilityType.DEVICE_QUERY, deviceQuery);
    AppiumDriver driver = new AndroidDriver(SeeTestProperties.SEETEST_IO_APPIUM_URL, dc) :

Few important observations can be made from the code above,

  1. Device Query is set using the key SeeTestCapabilityType.DEVICE_QUERY.
  2. Multiple capabilities can be set in one single query input i.e. device query="@os=android and @location='US', as opposed to Appium capability which needs to be set one by one.
  3. Property os overrides MobileCapabilityType.PLATFORM_NAME as they have the same meaning.

Supported Properties

Listed below are the properties or Key and Value which Device Query supports.

Property NameProperty ValueExample or Possible Values
osOperating system.
  • iOS
  • android
serialnumberSerial Number of the device.Unique identifier of the device in the SeeTest cloud.
versionThe device's operating system version (for example 4.1.2).

Any Device version

Example: 4.1.2

versionnumberThe device's operating system version number (for example 4.1).

Any Device version number

Example: 4.1

categoryThe device category. Currently supported in android devices.
modelNameDevice marketing nameExample: Galaxy S7 Edge
modelDevice modelExample: SM-G935F
dhmlocationLocation of the host machine as set in the SeeTestCloud configuration.Example: us-1
manufactureManufacturer of the device.Example: apple
nameKind of the deviceExample: iPhone 7
tagDevice tag (that was added by Cloud / Project administrator)Example: new_device
regionRegion of the device's DHM Example: Argentina

Syntax and Examples:

Device Query is written in XPATH Syntax i.e. @<propertyname>='<propertyvalue>' [ and @<propertyname>='<propertyvalue>' .....].

Device tags are added to query without @ character: tag='new_device'

Listed below are some examples

"contains(@dhmlocation,'us') and @manufacture='Samsung' and @os='android' and @version='4.2.2'

Requesting a device,

  • US location
  • Samsung Manufacturer
  • Android Operating System
  • version 4.2.2
"@model='iphone' and @os='ios' and contains(@name, 'iPhone')"

Requesting a device,

  • iPhone model
  • ios operating system
  • name containing iPhone
"@model='iphone' and @os='ios' and starts-with(@name, 'iPhone')"

Requesting a device,

  • iPhone model
  • ios operating system
  • name starting with iPhone
@os='ios' and tag='new_device' and tag='released_2019'

Requesting a device,

  • ios operating system
  • the device has 2 tags: new_device and released_2019

  • No labels