Class UIAutomationValue
- Namespace
- Ranorex
- Assembly
- Ranorex.Plugin.Uia.dll
Capability for the UIA Value pattern.
public class UIAutomationValue : Adapter, IAdapter
- Inheritance
-
UIAutomationValue
- Implements
- Inherited Members
Constructors
UIAutomationValue()
Creates a new UIAutomationValue adapter instance. This constructor is used internally by the Ranorex Core Framework for performance issues!
protected UIAutomationValue()
UIAutomationValue(Element)
Creates a new UIAutomationValue adapter instance.
public UIAutomationValue(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
IsReadOnly
A value that specifies whether the value attribute is read-only.
[OriginalDisplayName("UIAutomationValueIsReadOnly")]
public virtual bool IsReadOnly { get; }
Property Value
RequiredCapabilities
Capabilities required by the adapter implementation.
protected override string[] RequiredCapabilities { get; }
Property Value
- string[]
Value
The value of the element.
[OriginalDisplayName("UIAutomationValueValue")]
public virtual string Value { get; set; }
Property Value
Exceptions
- SetAttributeFailedException
Thrown if setting the attribute value failed.
Methods
FromElement(Element)
Converts an Element to an instance of this class.
public static UIAutomationValue FromElement(Element element)
Parameters
elementElementThe element to convert.
Returns
- UIAutomationValue
The UIAutomationValue.
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 UIAutomationValue FromPath(string path)
Parameters
pathstringThe search path.
Returns
- UIAutomationValue
The UIAutomationValue.
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.
Operators
implicit operator UIAutomationValue(Element)
Implicitly converts an Element to an instance of this class.
public static implicit operator UIAutomationValue(Element element)
Parameters
elementElementThe element to convert.
Returns
- UIAutomationValue
The UIAutomationValue.
Exceptions
- ArgumentNullException
If
elementisnull.- CapabilityNotSupportedException
If the element does not support the capabilities required by this adapter.
implicit operator UIAutomationValue(string)
Implicitly converts a string to an instance of this class by searching the root.
public static implicit operator UIAutomationValue(string path)
Parameters
pathstringThe search path.
Returns
- UIAutomationValue
The UIAutomationValue.
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.