Hi,
I would like to know if it is possible to get the items of a property grid by index instead of by name.
Thanks.
Property Grid: Get items by index
We have no function for this, but you can do this easily as follows:
Jenö
Ranorex Team
Code: Select all
print ' Reading all property names and values'
element=Ranorex.ControlGetElement(propertyGrid)
itemCount = Ranorex.ElementFindChildren(element, Ranorex.ROLE_SYSTEM_ROW)
for index in range(0,itemCount):
property = Ranorex.ElementGetChildFieldItem(index)
if property == None:
print 'Cannot read property' + str(index)
continue;
print ' Index = ' + str(index),
print ' name = ' + Ranorex.ElementGetName(property),
print ' value = ', Ranorex.ElementGetValue(property)
Ranorex Team