ElementSetProperty
Description
Designed command to set values of controllers such as date pickers, sliders, switches etc.
Parameters
Name | Value | Description |
---|---|---|
Zone | * NATIVE * WEB * TEXT | Zones which define the way the element will be identified. |
Element | Element Identifier as String | Identification of Element in the device screen. Identification can be XPATH or any other Appium Element Identifier. |
Index | Element index | Index of Element |
Property | Property name as String | Property Name |
Value | Value of the property name as String | Property Value |
Usage
Command is used to set value for a property of an Element in the device screen.
info
Replace <server> with the appropriate URL.
- Public Continuous Testing Cloud - https://cloud.seetest.io/wd/hub/.
- Dedicated Continuous Testing Cloud environment - Your own domain. For example: https://company.experitest.com/wd/hub/
- On-premises Continuous Testing Cloud environment - Your designated URL. For example: https://company.com/wd/hub
Example
ElementSetProperty
DesiredCapabilities dc = new DesiredCapabilities();
driver = new AndroidDriver(new URL("<server>"), dc);
seetest = new SeeTestClient(driver);
dc.setCapability(MobileCapabilityType.UDID, "<deviceid>");
...
...
// Sets the property "text" of the element identified by XPATH "//*[@class='UIAPickerWheel']" to 19.
seetest.elementSetProperty("NATIVE", "//*[@class='UIAPickerWheel']", 1, "text", "19");
The above code will work if you have the iOS native date and time running in foreground as shown in image below.