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
Name | Value | Description |
---|---|---|
Zone |
| Zones which define the way the element will be identified. |
Element | String which identifies the Element | Identification of Element in the device screen. Example: Button, Text Box. |
Element index | Integer representing index of the Element | |
Property | String value of the Element Property | Property of Element. Example : Text |
Usage:
This command can be used get any property element.
Set Experitest Url
Please make sure you replace <EXPERITEST_URL> with appropriate URL in the code snippet below.
- For SeeTest cloud, EXPERITEST_URL needs to be https://cloud.seetest.io:443/wd/hub
- For Dedicated Experitest Lab, EXPERITEST_URL needs to be your own domain. e.g - https://company.experitest.com
Example
ElementGetProperty
DesiredCapabilities dc = new DesiredCapabilities(); driver = new AndroidDriver(new URL("<EXPERITEST_URL>"), 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"));