Skip to main content

ElementSetProperty

Description

Designed command to set values of controllers such as date pickers, sliders, switches etc.

Parameters

NameValueDescription
Zone* NATIVE

* WEB

* TEXT
Zones which define the way the element will be identified.
ElementElement Identifier as StringIdentification of Element in the device screen.



Identification can be XPATH or any other Appium Element Identifier.
IndexElement indexIndex of Element
PropertyProperty name as StringProperty Name
ValueValue of the property name as StringProperty 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.

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.