Forum Discussion

Gordian's avatar
Gordian
Occasional Contributor
11 years ago

How to get all Flex properties for an object

The TestComplete documentation shows how to get or set the value for a specific Flex property of an object.



var title = Aliases.browser.AppPage.objectOrders.FlexObject.name;

Aliases.browser.AppPage.objectOrders.FlexObject.name = "New Window Title";





  However, I want to create a way of capturing all Flex properties to a file so that I can perform before / after type comparisons.  The Stores -> Objects unfortunately does not help here because it does not deal with Flex at all.  Does anyone know how to get a list/array of all properties under FlexObject for a given object?  If I had this then I could loop through each property, ask its type and then either record its value or navigate further.





Many concepts such as "is an object visible" are rather hard to determin in Flex with TestComplete.  The initial parameters on the object and the root Flex object called "visible" actually do not reflect how the application controls visibility.   I had to use calls such as:



var wTxt = wWizard.FindChild(  ["ObjectType", "ObjectIdentifier","FlexObject.document.visible"], ["TextInput", "generalName", "True"], 5, true);



Determining that FlexObject.document.visible was the actual property is a real pain.  Does anyone know methods to make this easier?   It is taking many hours to find appropriate properties that change in a system so that I can then use that information for automation comparisons.   Certainly there must be a better way.



All help and suggestions are appreciated on this.