com.hp.lft.sdk.mobile

Class DeviceDescription

  • All Implemented Interfaces:
    CloneableObject, Description, com.hp.lft.sdk.internal.MapHolder, java.lang.Cloneable


    public class DeviceDescription
    extends PropertiesDescription
    implements com.hp.lft.sdk.internal.MapHolder
    The description of a mobile Device test object.
    • Field Summary

      • Fields inherited from class com.hp.lft.sdk.internal.PropertiesDescriptionBase

        properties
    • Constructor Summary

      Constructor and Description
      DeviceDescription()
      Initializes a new instance of the DeviceDescription class.
    • Method Summary

      Modifier and TypeMethod and Description
      static DeviceDescriptionfromMap(java.util.Map<java.lang.String,java.lang.Object> props)
      This method creates a new instance of DeviceDescription and initializes it with the given props map.
      java.lang.Objectget(java.lang.String capability)
      Returns the current value of a DeviceDescription capability.
      java.lang.StringgetId()
      Returns the device ID used by UFT Mobile.
      java.lang.StringgetManufacturer()
      Returns the manufacturer name that UFT Mobile uses to identify the device.
      java.util.Map<java.lang.String,java.lang.Object>getMap()
      For internal use only.
      java.lang.StringgetModel()
      Returns the device model that UFT Mobile uses to identify the device.
      java.lang.StringgetName()
      Returns the logical name that UFT Mobile uses to identify the device.
      java.lang.StringgetOsType()
      Returns the OS type of the emulated device.
      java.lang.StringgetOsVersion()
      Returns the OS version of the emulated device.
      voidset(java.lang.String capability, java.lang.Object value)
      Sets a DeviceDescription capability to the given value.
      voidsetId(java.lang.String id)
      Sets the device ID used by UFT Mobile.
      voidsetManufacturer(java.lang.String manufacturer)
      Sets the manufacturer name that UFT Mobile uses to identify the device.
      voidsetModel(java.lang.String model)
      Sets the device model that UFT Mobile uses to identify the device.
      voidsetName(java.lang.String name)
      Sets the logical name that UFT Mobile uses to identify the device.
      voidsetOsType(java.lang.String osType)
      Sets the OS type of the emulated device.
      voidsetOsVersion(java.lang.String version)
      Sets the OS version of the emulated device.
      • Methods inherited from class com.hp.lft.sdk.internal.PropertiesDescriptionBase

        cloneTo, getValueAs, getValueAsStringProperty, insertValue
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DeviceDescription

        public DeviceDescription()
        Initializes a new instance of the DeviceDescription class.
    • Method Detail

      • setId

        public void setId(java.lang.String id)
        Sets the device ID used by UFT Mobile.
        Parameters:
        id - the device ID used by UFT Mobile.
      • getId

        public java.lang.String getId()
        Returns the device ID used by UFT Mobile.
        Returns:
        the device ID used by UFT Mobile.
      • setName

        public void setName(java.lang.String name)
        Sets the logical name that UFT Mobile uses to identify the device.
        Parameters:
        name - logical name that UFT Mobile uses to identify the device.
      • getName

        public java.lang.String getName()
        Returns the logical name that UFT Mobile uses to identify the device.
        Returns:
        the logical name that UFT Mobile uses to identify the device.
      • setOsType

        public void setOsType(java.lang.String osType)
        Sets the OS type of the emulated device.
        Parameters:
        osType - the OS type of the emulated device.
      • getOsType

        public java.lang.String getOsType()
        Returns the OS type of the emulated device.
        Returns:
        the OS type of the emulated device.
      • setOsVersion

        public void setOsVersion(java.lang.String version)
        Sets the OS version of the emulated device. The following symbols are supported:

        >, >=, <, <=

        For example:

        setOsVersion(">4.0")

        setOsVersion(">=4.1")

        Parameters:
        version - the OS version of the emulated device.
      • getOsVersion

        public java.lang.String getOsVersion()
        Returns the OS version of the emulated device.
        Returns:
        the OS version of the emulated device.
      • setManufacturer

        public void setManufacturer(java.lang.String manufacturer)
        Sets the manufacturer name that UFT Mobile uses to identify the device.
        Parameters:
        manufacturer - the manufacturer name of the device.
      • getManufacturer

        public java.lang.String getManufacturer()
        Returns the manufacturer name that UFT Mobile uses to identify the device.
        Returns:
        the manufacturer name that UFT Mobile uses to identify the device.
      • setModel

        public void setModel(java.lang.String model)
        Sets the device model that UFT Mobile uses to identify the device.
        Parameters:
        model - the device model of the device.
      • getModel

        public java.lang.String getModel()
        Returns the device model that UFT Mobile uses to identify the device.
        Returns:
        the device model that UFT Mobile uses to identify the device.
      • set

        public void set(java.lang.String capability,
                        java.lang.Object value)
                 throws GeneralLeanFtException
        Sets a DeviceDescription capability to the given value.
        Parameters:
        capability - the name of the capability to set value for.
        value - the new value of the capability.
        Throws:
        GeneralLeanFtException - if the set operation fails.
      • getMap

        public java.util.Map<java.lang.String,java.lang.Object> getMap()
        For internal use only.
        Specified by:
        getMap in interface com.hp.lft.sdk.internal.MapHolder
        Returns:
        for internal use only.