Skip to main content

GetDeviceProperty

Description

This command can be used retrieve device properties.

Parameters

NameValueDescription
Property NamePropertySet of name of the properties whose values can be queried

Supported Properties

PropertyStringComments
Namedevice.nameName of the device
Serial Numberdevice.snSerial number of the device
OSdevice.osiOS or Android
Versionos.versionfull os version
Manufacturedevice.manufactureDevice Manufacture
Modeldevice.modelDevice Model
Model Namedevice.modelnameDevice Model Name
Timedevice.timeDevice Time
Remotedevice.remoteIs the device on a remote machine? (True/False)
Device screen sizedevice.screensizeScreen Size of Device
Hostdevice.hostThe IP and port of the host machine (127.0.0.1 or USB for local devices)
Categorydevice.categoryPhone or Tablet
Application Bundle Versionapp.CFBundleVersionOnly for iOS devices, for instrumented applications - released and unreleased versions
Application Bundle Short Versionapp.CFBundleShortVersionStringOnly for iOS devices, for instrumented applications
Application versionapp.versionIn iOS - only for instrumented applications
Instrumentation versioninstrumentation.versionOnly for iOS devices, for instrumented applications
OrientationorientationLandscape or Portrait
Instrumentation log levelios.instrumentation.log.levelOnly for iOS devices, for instrumented applications

Usage

Command can be used to get the property of the device using the property name.

info

Replace <server> with the appropriate URL.

GetProperty

DesiredCapabilities dc = new DesiredCapabilities();
driver = new AndroidDriver(new URL("<server>"), dc);
seetest = new SeeTestClient(driver);
dc.setCapability(MobileCapabilityType.UDID, "deviceid");

...
...
// this command gets the given property
seetest.getDeviceProperty("device.name");s