Class FlexElement
- Namespace
- Ranorex
- Assembly
- Ranorex.Plugin.Flex.dll
The element is a part of a flash application.
public class FlexElement : Adapter, IAdapter
- Inheritance
-
FlexElement
- Implements
- Inherited Members
Constructors
FlexElement()
Creates a new FlexElement adapter instance. This constructor is used internally by the Ranorex Core Framework for performance issues!
protected FlexElement()
FlexElement(Element)
Creates a new FlexElement adapter instance.
public FlexElement(Element element)
Parameters
elementElementThe element to create the adapter for.
Exceptions
- NullReferenceException
If
elementisnull.- CapabilityNotSupportedException
If the element does not support the capabilities required by this adapter.
Properties
AutomationName
The automation name of the flex element, if available.
public virtual string AutomationName { get; }
Property Value
AutomationValue
The automation value of the flex element, if available.
public virtual string AutomationValue { get; }
Property Value
BaseType
The full type name of the internal base class of the flex element.
public virtual string BaseType { get; }
Property Value
DisplayName
The instance name for non-flex objects.
public virtual string DisplayName { get; }
Property Value
FlexUid
The unique identifier of the flex element, if available.
public virtual string FlexUid { get; }
Property Value
FullType
The full type name of the flex element.
public virtual string FullType { get; }
Property Value
Id
The identifier of the flex element used in MXML, if available.
public virtual string Id { get; }
Property Value
this[string]
Gets the attribute with the specified name.
public string this[string attributeName] { get; set; }
Parameters
attributeNamestring
Property Value
- string
The attribute value or null if nothing was found for that name.
Remarks
When setting an attribute, an explicit type can be specified by enclosing the value in a <stringgt; or <numbergt; tag. For booleans use <truegt; or <falsegt;
RequiredCapabilities
Capabilities required by the adapter implementation.
protected override string[] RequiredCapabilities { get; }
Property Value
- string[]
Type
The type name of the flex element.
public virtual string Type { get; }
Property Value
Methods
FromElement(Element)
Converts an Element to an instance of this class.
public static FlexElement FromElement(Element element)
Parameters
elementElementThe element to convert.
Returns
- FlexElement
The FlexElement.
Exceptions
- ArgumentNullException
If
elementisnull.- CapabilityNotSupportedException
If the element does not support the capabilities required by this adapter.
FromPath(string)
Converts a string to an instance of this class by searching the root.
public static FlexElement FromPath(string path)
Parameters
pathstringThe search path.
Returns
- FlexElement
The FlexElement.
Remarks
The DefaultSearchTimeout is used to search for the specified path.
Exceptions
- ArgumentNullException
If
pathisnull.- RxPathException
If the specified
pathis not valid.- ElementNotFoundException
If no element is found.
- CapabilityNotSupportedException
If the element does not support the capabilities required by this adapter.
GetPropertyValue(string)
Gets the string value of the specified UIComponent property.
public string GetPropertyValue(string name)
Parameters
namestringThe name of the property.
Returns
- string
The value of the property.
Exceptions
- ActionFailedException
Thrown if invoking the action failed.
GetPropertyValue(string, string)
Gets the string value of the specified UIComponent property.
public virtual string GetPropertyValue(string name, string propertyname)
Parameters
namestringThe name of the property.
propertynamestringThe name of the sub-property, can be null.
Returns
- string
The value of the property.
Exceptions
- ActionFailedException
Thrown if invoking the action failed.
GetStyle(string)
Gets the string value of the specified UIComponent style.
public string GetStyle(string name)
Parameters
namestringThe name of the style.
Returns
- string
The contents of the requested style.
Exceptions
- ActionFailedException
Thrown if invoking the action failed.
GetStyle(string, string)
Gets the string value of the specified UIComponent style.
public virtual string GetStyle(string name, string propertyname)
Parameters
Returns
- string
The contents of the requested style.
Exceptions
- ActionFailedException
Thrown if invoking the action failed.
SetPropertyValue(string, string)
Sets the value of the specified UIComponent property.
public virtual void SetPropertyValue(string name, string value)
Parameters
Exceptions
- ActionFailedException
Thrown if invoking the action failed.
SetStyle(string, string)
Sets the string value of the specified UIComponent style.
public virtual void SetStyle(string name, string value)
Parameters
Exceptions
- ActionFailedException
Thrown if invoking the action failed.
Operators
implicit operator FlexElement(Element)
Implicitly converts an Element to an instance of this class.
public static implicit operator FlexElement(Element element)
Parameters
elementElementThe element to convert.
Returns
- FlexElement
The FlexElement.
Exceptions
- ArgumentNullException
If
elementisnull.- CapabilityNotSupportedException
If the element does not support the capabilities required by this adapter.
implicit operator FlexElement(string)
Implicitly converts a string to an instance of this class by searching the root.
public static implicit operator FlexElement(string path)
Parameters
pathstringThe search path.
Returns
- FlexElement
The FlexElement.
Remarks
The DefaultSearchTimeout is used to search for the specified path.
Exceptions
- ArgumentNullException
If
pathisnull.- RxPathException
If the specified
pathis not valid.- ElementNotFoundException
If no element is found.
- CapabilityNotSupportedException
If the element does not support the capabilities required by this adapter.