Class WpfElement
- Namespace
- Ranorex
- Assembly
- Ranorex.Plugin.Wpf.dll
Capability of a WPF element.
public class WpfElement : Adapter, IAdapter
- Inheritance
-
WpfElement
- Implements
- Inherited Members
Constructors
WpfElement()
Creates a new WpfElement adapter instance. This constructor is used internally by the Ranorex Core Framework for performance issues!
protected WpfElement()
WpfElement(Element)
Creates a new WpfElement adapter instance.
public WpfElement(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
AutomationId
Identifies the System.Windows.Automation.AutomationProperties.AutomationId attached property
public virtual string AutomationId { get; }
Property Value
AutomationProperties_AcceleratorKey
Identifies the System.Windows.Automation.AutomationProperties.AcceleratorKey attached property
public virtual string AutomationProperties_AcceleratorKey { get; }
Property Value
AutomationProperties_AccessKey
Identifies the System.Windows.Automation.AutomationProperties.AccessKey attached property
public virtual string AutomationProperties_AccessKey { get; }
Property Value
AutomationProperties_HelpText
Identifies the System.Windows.Automation.AutomationProperties.HelpText attached property
public virtual string AutomationProperties_HelpText { get; }
Property Value
AutomationProperties_IsColumnHeader
Identifies the System.Windows.Automation.AutomationProperties.IsColumnHeader attached property
public virtual bool AutomationProperties_IsColumnHeader { get; }
Property Value
AutomationProperties_IsRequiredForForm
Identifies the System.Windows.Automation.AutomationProperties.IsRequiredForForm attached property
public virtual bool AutomationProperties_IsRequiredForForm { get; }
Property Value
AutomationProperties_IsRowHeader
The identifier for the System.Windows.Automation.AutomationProperties.IsRowHeader dependency property
public virtual bool AutomationProperties_IsRowHeader { get; }
Property Value
AutomationProperties_ItemStatus
Identifies the System.Windows.Automation.AutomationProperties.ItemStatus attached property
public virtual string AutomationProperties_ItemStatus { get; }
Property Value
AutomationProperties_ItemType
The identifier for the System.Windows.Automation.AutomationProperties.ItemType dependency property
public virtual string AutomationProperties_ItemType { get; }
Property Value
AutomationProperties_LabeledBy
Identifies the System.Windows.Automation.AutomationProperties.LabeledBy attached property
public virtual object AutomationProperties_LabeledBy { get; }
Property Value
AutomationProperties_Name
Identifies the System.Windows.Automation.AutomationProperties.Name attached property
public virtual string AutomationProperties_Name { get; }
Property Value
BaseType
FQTN of first known WPF type of DependencyObject instance's base-types
public virtual string BaseType { get; }
Property Value
FullType
FQTN of DependencyObject instance
public virtual string FullType { get; }
Property Value
Name
Name of the instance
public virtual string Name { get; }
Property Value
RequiredCapabilities
Capabilities required by the adapter implementation.
protected override string[] RequiredCapabilities { get; }
Property Value
- string[]
Type
Short type-name of DependencyObject instance
public virtual string Type { get; }
Property Value
Methods
FromElement(Element)
Converts an Element to an instance of this class.
public static WpfElement FromElement(Element element)
Parameters
elementElementThe element to convert.
Returns
- WpfElement
The WpfElement.
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 WpfElement FromPath(string path)
Parameters
pathstringThe search path.
Returns
- WpfElement
The WpfElement.
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 WpfElement(Element)
Implicitly converts an Element to an instance of this class.
public static implicit operator WpfElement(Element element)
Parameters
elementElementThe element to convert.
Returns
- WpfElement
The WpfElement.
Exceptions
- ArgumentNullException
If
elementisnull.- CapabilityNotSupportedException
If the element does not support the capabilities required by this adapter.
implicit operator WpfElement(string)
Implicitly converts a string to an instance of this class by searching the root.
public static implicit operator WpfElement(string path)
Parameters
pathstringThe search path.
Returns
- WpfElement
The WpfElement.
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.