Hi-
Is there any way to get a list of all the properties of a given FlexElement? I know I can call the GetPropertyValue function to get a specific property by name. But is there any way to get a list of all the properties so I can loop thru each one?
FlexElement Properties
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: FlexElement Properties
Hello,
You could use the following code to get all properties of an element:
Markus (T)
You could use the following code to get all properties of an element:
Element myButton = "/dom[@domain='www.ranorex.com']/body/flexobject/container[@caption='PopUpButton Control']/button"; foreach (var attr in myButton.Role.Attributes) { Report.Info("Attribute: " + attr); Report.Info("Value: " + myButton.GetAttributeValueText(attr.Value.ToString())); } foreach (var cap in myButton.Capabilities) { foreach (var attr in cap.Attributes) { Report.Info("Attribute: " + attr.Value.ToString()); Report.Info("Value: " + myButton.GetAttributeValueText(attr.Value.ToString())); } } foreach (var attr in myButton.DynamicCapability.Attributes) { Report.Info("Attribute: " + attr); Report.Info("Value: " + myButton.GetAttributeValueText(attr.Value.ToString())); }Regards,
Markus (T)