Silk Mobile

Table of Contents (Homepage)

SetProperty

SetProperty (Property, Value)

Description

This command can change configuration on the device during runtime. It will set the given property to the given value.

Parameters

  • Property: Property (See below the supported properties)

  • Value: The value to be set

Supported Properties:

  • hybridClick
    When hybridClick is enabled, click method will be executed using java-script.
    Value: enable/disable or true/false (default mode = disable/false).

    images/images/os-icons/os_ios_150x150.png

    images/images/os-icons/os_android_150x150.png

    images/images/os-icons/os_windows_150x150.png

  • report.image.width
    Defines the size,in pixels, of the generated images in the report.
    Value: size in pixels (default size = 500).

    images/images/os-icons/os_ios_150x150.png

    images/images/os-icons/os_android_150x150.png

    images/images/os-icons/os_windows_150x150.png

  • screen.latency: Some commands, for instance, Click, result in two screenshots in report: a pre-action shot, which is taken right before the command execution starts, and a post-action shot. The value of screen.latency is used in calculation of the time when the latter screenshot is taken. Namely, Silk Mobile holds on during screen.latency since the action of the current step is forwarded to a physical device, and then grabs its post-action screenshot. Thus if you notice that the post-action screenshot is taken too early, you can tune the latency of its taking by updating the value of screen.latency. As a trade-off, however, this will slow down the execution of the test. The value unit is milliseconds.

    images/images/os-icons/os_ios_150x1500.png

    images/images/os-icons/os_android_150x1500.png

    images/images/os-icons/os_windows_150x1500.png

    images/images/os-icons/os_blackberry_150x1500.png

    images/images/os-icons/os_symbian02_150x1500.png

    images/images/os-icons/os_windows_mobile_150x1500.png

  • screen.quality : Possible values: 1-100 (percentages)
    Function: To change the quality of the image received from the device.

    images/images/os-icons/os_ios_150x1500.png

    images/images/os-icons/os_android_150x1500.png

    images/images/os-icons/os_windows_150x1500.png

  • screen.refresh: Possible values > 0 (miliseconds)
    Function: To control the refresh rate time gap to get new image from the device.

    images/images/os-icons/os_ios_150x1500.png

    images/images/os-icons/os_android_150x1500.png

    images/images/os-icons/os_windows_150x1500.png

  • ignore.ocr.recomendation: Possible values - true/ false
    Function: To enable/disable OCR recognition.

    images/images/os-icons/os_ios_150x1500.png

    images/images/os-icons/os_android_150x1500.png

    images/images/os-icons/os_windows_150x1500.png

  • android.instrumentation.security
    Function: To disable the android LayoutParams FLAG_SECURE .
    Values: none, smart , hard (Default: smart) .

none - will not disable the security flag.
smart - will disable the security flag on the activity resume.
Hard - will disable the security flag on the activity resume and in a repeated sequence (every few sec).

images/images/os-icons/os_android_150x1500.png

  • e.ocr.recomendation: Possible values - true/ false
    Function: To enable/disable OCR recognition.

    images/images/os-icons/os_android_150x1500.png

  • on.device.xpath: possible values - true/ false
    Function: If it is set to true, it causes any web command that is using xpath to be calculated on the device itself. This enables faster response. As part of the properties shown in the objects spy are derivative it will not work on the device. So, if the xpath contains one of the followings tags, it will not be executed on the device (even if the property set to true):
    @onScreen, @top, @css, @width, @height, @x, @y, @hidden, @text or @nodeName

    images/images/os-icons/os_ios_150x1500.png

    images/images/os-icons/os_android_150x1500.png

  • adbPortForward: possible values - selected port number/ -1
    Function: To enable specifying which adb port number you wish to search a connected android device from. If set to -1, it will forward to all adb ports.

    images/images/os-icons/os_android_150x150.png

  • WPDevice.nonInstrumented.objects (WP only): possible values – enable/disable or true/false (Default value is enable/true)
    Function:If set false/disable, it will not take the non-instrumented dump.

    images/images/os-icons/os_windows_150x1500.png

  • ios.native.nonInstrumented (iOS only): possible values – true/ false
    Function:If set false, it will not take the non-instrumented dump.

    images/images/os-icons/os_ios_150x150.png


  • iosDevice.nonInstrumented (iOS only): possible values – enable/disable (Default value is enable)
    Function:To switch between instrumented/non-instrumented modes while working with an iOS device.

    images/images/os-icons/os_ios_150x150.png

  • ios.elementsendtext.action.fire: possible values - true/ false (Default mode is false)
    Function: When the user uses the ElementSendText command and the ios.elementsendtext.action.fire property is enabled, it will trigger the event that should has been triggered by the keyboard.

    images/images/os-icons/os_ios_150x150.png

  • ios.atomic.sendText (iOS only): possible value – true/ false
    When set to true, SendText command will ensure sending the text key by key, atomically.

    images/images/os-icons/os_ios_150x150.png


  • ios.non-instrumented.dump.escape.attributes (iOS only): possible value – true/ false. default value: false.
    Function:When set to true, it will escape properties (hidden, knownSuperClass) from the non-instrumented dump. Uses for big pages with lot of elements.

    Note

    This property is available also as an 'app-property', which can be declared and set on/off in the app.properties file.

    images/images/os-icons/os_ios_150x150.png

  • js.max.string.size: possible values >0.
    Function: Set the maximum text attribute length in the object properties.
    Default: 255.

    images/images/os-icons/os_ios_150x150.png

    images/images/os-icons/os_android_150x150.png

    images/images/os-icons/os_windows_150x150.png