Table of Contents

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

element Element

The element to create the adapter for.

Exceptions

NullReferenceException

If element is null.

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

string

AutomationValue

The automation value of the flex element, if available.

public virtual string AutomationValue { get; }

Property Value

string

BaseType

The full type name of the internal base class of the flex element.

public virtual string BaseType { get; }

Property Value

string

DisplayName

The instance name for non-flex objects.

public virtual string DisplayName { get; }

Property Value

string

FlexUid

The unique identifier of the flex element, if available.

public virtual string FlexUid { get; }

Property Value

string

FullType

The full type name of the flex element.

public virtual string FullType { get; }

Property Value

string

Id

The identifier of the flex element used in MXML, if available.

public virtual string Id { get; }

Property Value

string

this[string]

Gets the attribute with the specified name.

public string this[string attributeName] { get; set; }

Parameters

attributeName string

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

string

Methods

FromElement(Element)

Converts an Element to an instance of this class.

public static FlexElement FromElement(Element element)

Parameters

element Element

The element to convert.

Returns

FlexElement

The FlexElement.

Exceptions

ArgumentNullException

If element is null.

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

path string

The search path.

Returns

FlexElement

The FlexElement.

Remarks

The DefaultSearchTimeout is used to search for the specified path.

Exceptions

ArgumentNullException

If path is null.

RxPathException

If the specified path is 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

name string

The 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

name string

The name of the property.

propertyname string

The 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

name string

The 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

name string

The name of the style.

propertyname string

The name of the sub-property, can be null.

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

name string

The name of the property.

value string

The string value of the property to set.

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

name string

The name of the style.

value string

The string value of the style to set.

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

element Element

The element to convert.

Returns

FlexElement

The FlexElement.

Exceptions

ArgumentNullException

If element is null.

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

path string

The search path.

Returns

FlexElement

The FlexElement.

Remarks

The DefaultSearchTimeout is used to search for the specified path.

Exceptions

ArgumentNullException

If path is null.

RxPathException

If the specified path is not valid.

ElementNotFoundException

If no element is found.

CapabilityNotSupportedException

If the element does not support the capabilities required by this adapter.