Class FlexDataItem
- Namespace
- Ranorex
- Assembly
- Ranorex.Plugin.Flex.dll
The element is a part of a flex data provider collection.
public class FlexDataItem : Adapter, IAdapter
- Inheritance
-
FlexDataItem
- Implements
- Inherited Members
Constructors
FlexDataItem()
Creates a new FlexDataItem adapter instance. This constructor is used internally by the Ranorex Core Framework for performance issues!
protected FlexDataItem()
FlexDataItem(Element)
Creates a new FlexDataItem adapter instance.
public FlexDataItem(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
DataItemType
The full type name of the flex data item.
public virtual string DataItemType { get; }
Property Value
Expandable
True if the item is expandable.
public virtual bool Expandable { get; }
Property Value
Expanded
True if the item is currently expanded.
public virtual bool Expanded { get; set; }
Property Value
Exceptions
- SetAttributeFailedException
Thrown if setting the attribute value failed.
RequiredCapabilities
Capabilities required by the adapter implementation.
protected override string[] RequiredCapabilities { get; }
Property Value
- string[]
Methods
FromElement(Element)
Converts an Element to an instance of this class.
public static FlexDataItem FromElement(Element element)
Parameters
elementElementThe element to convert.
Returns
- FlexDataItem
The FlexDataItem.
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 FlexDataItem FromPath(string path)
Parameters
pathstringThe search path.
Returns
- FlexDataItem
The FlexDataItem.
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 item property.
public virtual 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.
SetPropertyValue(string, string)
Sets the value of the specified item property.
public virtual void SetPropertyValue(string name, string value)
Parameters
Exceptions
- ActionFailedException
Thrown if invoking the action failed.
Operators
implicit operator FlexDataItem(Element)
Implicitly converts an Element to an instance of this class.
public static implicit operator FlexDataItem(Element element)
Parameters
elementElementThe element to convert.
Returns
- FlexDataItem
The FlexDataItem.
Exceptions
- ArgumentNullException
If
elementisnull.- CapabilityNotSupportedException
If the element does not support the capabilities required by this adapter.
implicit operator FlexDataItem(string)
Implicitly converts a string to an instance of this class by searching the root.
public static implicit operator FlexDataItem(string path)
Parameters
pathstringThe search path.
Returns
- FlexDataItem
The FlexDataItem.
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.