Skip to main content

SetProperty

Description

Use this command to change the configuration on the device during runtime. It sets the given property to the given value.

Parameters

NameValue
PropertyProperty
ValueValue to be set

Supported Properties

PropertyValuesDescriptionSupported in
hybridClickEnable/disable or true/false (Default = disable/false)When hybrid Click is enabled**,** the click method is executed using javascript.Android



iOS
report.image.widthSize in pixels (default value: 500)Defines the size, in pixels, of the generated images in the report.Android



iOS
screen.latencyUnit in millisecondsThe value of screen.latency is used in the calculation of the time when the latter screenshot is taken.Android



iOS
screen.quality1-100 (percentages)To change the quality of the image received from the device.Android



iOS
screen.refreshGreater than 0 in millisecondsTo control the refresh rate time gap to get a new image from the device.Android



iOS
ignore.ocr.recommendationtrue/falseTo enable/disable OCR recognition.Android



iOS
Android .instrumentation.securitynone, smart, hard (default value: smart)Disable the Android LayoutParams FLAG_SECURE.



* none - Do not disable the security flag.

* smart - Disable the security flag when activity resumes.

* hard - Disable the security flag on the activity resume and in a repeated sequence (every few secs).
Android
on.device.xpathtrue/falseIf it is set to true, it causes any web command that is using XPath to be calculated on the device itself. This enables a faster response. As part of the properties shown in the object 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 is set to true): 



@onScreen, @top, @css, @width, @height, @x, @y, @hidden, @text or @nodeName
Android



iOS
assert.element.idletrue/ false. (default: false)This property is used to control SeeTest verification behavior regarding busy elements. When the property is set to true, SeeTest will fail a command if the element in question is found on screen but in a busy state. Otherwise, the verification will ignore its busy state.



Usage examples:



* To identify a toast which generally is a busy element, use: assert.element.idle=false.

* To click on an element, use: assert.element.idle=true (because clicks do not work on busy elements).



> [!INFO]

> Note

> This property is available also as an 'app-property', which can be declared and set on/off in the app.properties file.
Android
element.visibility.levelfull/center/none/legacy_mode default value:  legacy_mode.This is an app property used to define the desired visibility level of elements on the device's screen for the testing flow.



These visibility levels are supported:





* full: Fully contained. This mode defines the element visibility based on whether the element rectangle is fully contained within the screen rectangle.

* center: Center contained. This mode defines the element visibility based on whether the center of the element (click point) is visible on the screen.

* none: No visibility constraints. This mode does not verify element visibility on the screen once the element is found in Dump

* legacy_mode: Maintains old legacy, meaning the current default mode.







For example:



Running isElementFound() on an element that is completely hidden by the devices navigation bar will retrieve the following based on each mode:



* Full: false

* center: false

* none: true
Android



iOS
chrome.load.timeoutinteger>=0 (time in milliseconds). Default value: 10,000 ms for local devices and 15000 ms for cloud devices.This is a device property used to control the timeout of the operation on chrome.  



For example:   





* When executing ' launch(chrome:...)', the requested website tries to load on the current tab. This process requires first loading the last website opened on this tab and if the loading process got timed-out. Chrome will load the new URL in a new tab.  



 



* Under bad network conditions, chrome might exhibit a performance deterioration. This property allows you to adjust chrome operations timeout under different network conditions.
Android
adbPortForwardselected port number/ -1To enable specifying which adb port number to search a connected Android device from. If set to -1, it will forward to all adb ports.Android
Android .native .nonInstrumentedtrue/falseEnable the user to switch between working under-instrumented/non-instrumented mode during test execution.Android
WPDevice .nonInstrumented.objectsenable/disable, true/false (default value is enable/true) or short/thinIf set false/disable, it will not take the non-instrumented dump. 



If set short/thin, it will take a non-instrumented dump only for the application bar.
ios.native.nonInstrumentedtrue/falseFor Native dump only. If set to true, it will take the non-instrumented dump.iOS
iosDevice.nonInstrumentedenable/disable (default value: enable)To switch between instrumented/non-instrumented modes while working with an iOS device.iOS
ios.elementsendtext.action.firetrue/ false (default value: false)When the user uses the ElementSendText  command and the ios.elementsendtext.action.fire property is enabled, it will trigger the event that should have been triggered by the keyboard.iOS
ios.non-instrumented.dump.escape.attributestrue/false (default value: false)When set to true, it will escape properties (hidden, knownSuperClass) from the non-instrumented dump. Uses for big pages with a lot of elements. 



> [!INFO]

> Note:

> This property is available also as an 'app-property', which can be declared and set on/off in the app.properties file.
iOS
js.max.string.sizeinteger values  > 0 (default value: 255)Set the maximum text attribute length in the object properties.Android



iOS
clicks.time.gapInteger values  > 0 (default value: 0)iOS: Milliseconds between clicks in case simulation of a triple-click (or above) is desired. Set this property and make sure the number of clicks is 3 or above. This will simulate a fast repetitive click in the same spot (recommended values are 50 ms and up).



Default: 0.
Android



iOS
Android.instrumentation.cameratrue/ false or enable/disable. (default value: false)This property enables you to support camera instrumentation on-the-fly. When set to true, the next time you use the install command with instrument=true, your application will be instrumented with the camera support.



This ability is intended especially for test automation on applications with the camera. For further information, see SimulateCapture.



Note: This property is available also as an 'app-property', which can be declared and set on/off in the app.properties file.
Android
Android.instrumentation.camera2true/ false or enable/disable. (default value: false)This property enables you to support camera Api2 instrumentation on-the-fly. When set to true, the next time you use the install command with instrument=true, your application will be instrumented with the camera support.



This ability is intended especially for test automation on applications with the camera. For further information, please see SimulateCapture.



Notes:



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



* To use camera2 Api, should both property Android.instrumentation.camera and Android.instrumentation.camera2 set to true

* This property is supported in devices with Android version greater than 6.1.
Android
ios.auto.accept.alertstrue/falseIf set to true, system alerts aree accepted automatically when they appear on the screen. The click will happen during the next command that will use XPath queries.iOS
ios.auto.dismiss.alerts



> [!INFO]

> It only works with iOS 9 and above.
true/falseIf set to true, system alerts will be dismissed automatically when they appear on the screen.  The click will happen during the next command that will use XPath queries.



* Dismiss

* Don't allow

* Close

* Cancel

* Not now



* "...Later"
iOS
android.install.grant.permissionstrue/falseGrants the permissions your app requires on install. Defaults to falseAndroid
attach.crash.log.to.reporttrue/falseSaves crash logs that were created on the device during the test to the report folderiOS
ios.dump.focus.processprocess_name:<name> or



bundle_id: <bundleId> or



process_id:<pid>
Getting dump from a specific process, identified by process_name / bundle_id or process_id.



For example, getting a dump from assistiveTouch:



<br/><br/>ios.dump.focus.process=process_name:AssistiveTouchd<br/><br/>
iOS
ios.dump.non.instrumented.include.attributesattribute name



(currently, only the 'visible' attribute is supported).
Used only on iOS for getting dump non-instrumented included the attributes.



For example: ios.dump.non.instrumented.include.attributes=visible
iOS
battery.report.percentagetrue/falseChange the presented data units for battery monitoring from the default unit which is mAh to a percentageAndroid
ios.keyboard.close.by.dumptrue/falseClose keyboard with simulated user action based on the keyboard in useiOS
location.service.gps



location.service.network
true/falseToggle GPS off by setting both properties to false.



Toggle GPS on by using one of these properties to true:



* for GPS with 'device only' mode: use 'location.service.gps=true'



'location.service.network=false'

* for GPS with 'battery saving' mode: use 'location.service.gps=false'



'location.service.network=true'

* for GPS with 'High accuracy' mode: use 'location.service.gps=true'



'location.service.network=true'
Android
ios.element-send-text.use.xcautomationtrue/falseUse XCAutomation for elementSendText, by default is true, if set to false, then elementSendText operation rather than being atomically executing on the device will be executing in multiple steps.iOS
ios.dump.fetch.toptrue / false(default)Instead of calculating the "top" property with the legacy heuristics, this property makes the "top" property being queried from the OS. Use this only if you have problems with the existing property, as it is a costly operation.iOS
disable.reportertrueWhen running a grid test on the cloud with a configured reporter, set this to true to save the test results locally.Android



iOS
ios.instrumentation.log.levelnone,fatal,error,warn,info,debug,allSets the desired log level to the iOS instrumentation.iOS
safari.webview.includetrue / false(default)When fetching a native dump, this property will include the UI elements of the safari WebView will be seen in the dump.iOS
ios.element.top.bounds.contained.in.parenttrue / false(default)Sets top=false for elements that their rectangle bounds are not inside their parent's bounds.iOS
ios.waiting.element.polling.intervalInteger values  >= 0 (default value:0)Used for stabilizing click operations.



Sets the interval between polling the element location in milliseconds, waiting for the element to be in the same location.
iOS
ios.11.use.old.monitoring.servicetrue / false(default)Used only for iOS 11 to choose the service which uses for monitoring CPU / Memory (the old service monitors only debug applications).iOS
ios.request.location.permissiontrue / false (default)Request location permission. Required for getLocation to work on iOS.



Supported on iOS 11 and above
iOS
controller.idle.timeoutInteger values >= 10000 milliseconds



(default: 10000)
Set the idle controller timeout, how long will the controller remain alive after stopping the test execution.Android



iOS
split.view.dump.iostrue / false (default)Enforces getting instrumented dump first.iOS
ios.dump.grid.sampling.params<SamplesX>,<SamplesY>,<Depth>,<Hybrid(optional default=true)>,<FrontMostAppFocused(optional default=false)> or



default
Create dump by sampling grid of points, SamplesX refers to how many samples on X-Axis when the device is in portrait orientation when in Landscape the samples on each axis will switch.



We recommend first trying the default value which is 5,12,5, and if it does not create the expected dump only then try other values.



Setting this property with empty parameters will remove it, and take a regular dump.
iOS
ios.dump.active.applicationstrue / false (default)Get dumps from all active applications. 







This is useful in iOS 13, whose dump doesn't include Springboard elements by default when another application is in the foreground.
iOS
ios.allow.orientation.correctiontrue / false (default value: true)Allow iOS non-instrumented dump orientation to be corrected.



This property is useful for backward compatibility in case of devices oriented in Landscape Left, a set up that has not been supported till 12.10. If your code depends on the wrong element location, set this to "false" to get the old behavior back.
iOS
listener.max.recovery.attemptsInteger values >= 1When using mobile listeners, this property sets how many times in a row recovery would be attempted. If not set, the number of recovery attempts would be equal to the number of mobile listeners set times 2.Android



iOS
ios.dump.uielements.only.paramstrue/falseCreate a dump by collecting native UI elements. This can help to avoid crashes in case of a large web dump and improve overall performance.iOS
android.upgrade.uninstalltrue/false (default value: true)By default, when installing an application and an old version is already installed on the device, the old application is uninstalled before installing the new version. When keeping the application data, some of the application data will be lost, for example, application widgets that were placed on the Home Screen. Set this property to ‘false’ to override this behavior.Android
android.noninstrumented.webviewtrue/false (default value: false)Get dumps from webview for instrumented and non-instrumented applications.



WebView debugging must be enabled from within the application: https://developer.chrome.com/docs/devtools/remote-debugging/webviews/

This feature should work if only one debuggable webview is running in parallel. Supported for Android 6 devices and above.
Android
enable.appium.grid.cachetrue/false (default value: true)Default behavior**:** Appium Grid caches element, if the same element is asked again it just retrieves from the cache. in case the attribute of that element changes after it's cached, then when asked for that element, the cached element with old attribute values will be returned. 



In case we need the elements after they are changed, then set the property to false.
Android



iOS
android.chrome.avoid.first.launch.experiencetrue/false (default value: false)By default, when restarting Chrome, e.g., by a launch command with the parameter stopIfRunning=true, then a UI script is automatically handling Chrome's Welcome page if it appears.



When setting this property to true, a different mechanism will be used to prevent the Welcome page from appearing.



Note if you are using the Chrome command-line file:when set to "true", Chrome will be set as a debug application and any existing chrome command-line file will be overridden.
Android
ios.instrumentation.fix.scaletrue/false (default value: false)Should fix the scaling of applications in instrumented dump. Mostly used when application has hosted frames or in stage manager state (the application isn't in full screen and need to be scaled).iOS
ios.safari.launch.timeout0 (default value: 40)When set to 0, the tests will not wait for the timeout of page to load instead it will move to the next command immediately. Use this in situations where the URL will present a pop-up upon launching in safari and not the actual page itself.iOS

Usage

info

Replace <server> with the appropriate URL.

Example

SetProperty

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

...
...
// this command can be used to set the screen refresh rate.
seetest.setProperty("screen.refresh", "10");