Skip to main content

ElementGetProperty

Description

Command to get a property of an element. It can retrieve all properties of the elements that are showing on the object spy as also controllers.

Parameters

NameValueDescription
Zone* NATIVE

* WEB

* TEXT
Zones which define the way the element will be identified.
ElementString which identifies the ElementIdentification of Element in the device screen.



Example: Button, Text Box.
Element indexInteger representing index of the Element
PropertyString value of the Element PropertyProperty of Element.



Example : Text

Usage:

This command can be used get any property element.

info

Replace <server> with the appropriate URL.

Example

ElementGetProperty

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

...
...
// Command will fetch the "enabled" property of Element "Contacts" if the Android Contacts App is opened and
// displayed in the Device screen
System.out.println(seetest.elementGetProperty("NATIVE", "//*[@text='Contacts']", 0, "enabled"));