Class WpfWin32Element
- Namespace
- Ranorex
- Assembly
- Ranorex.Plugin.Wpf.dll
Capability of a WPF window element.
public class WpfWin32Element : Adapter, IAdapter
- Inheritance
-
WpfWin32Element
- Implements
- Inherited Members
Constructors
WpfWin32Element()
Creates a new WpfWin32Element adapter instance. This constructor is used internally by the Ranorex Core Framework for performance issues!
protected WpfWin32Element()
WpfWin32Element(Element)
Creates a new WpfWin32Element adapter instance.
public WpfWin32Element(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
RequiredCapabilities
Capabilities required by the adapter implementation.
protected override string[] RequiredCapabilities { get; }
Property Value
- string[]
Win32OwnerWindowLevel
Number of owning windows
public virtual int Win32OwnerWindowLevel { get; }
Property Value
Win32ParentWindowLevel
Number of parent windows
public virtual int Win32ParentWindowLevel { get; }
Property Value
WpfNative
Indicates that the element is created by the native WPF plug-in. Used for path disambiguation when also using UIA.
public virtual bool WpfNative { get; }
Property Value
Methods
FromElement(Element)
Converts an Element to an instance of this class.
public static WpfWin32Element FromElement(Element element)
Parameters
elementElementThe element to convert.
Returns
- WpfWin32Element
The WpfWin32Element.
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 WpfWin32Element FromPath(string path)
Parameters
pathstringThe search path.
Returns
- WpfWin32Element
The WpfWin32Element.
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 WpfWin32Element(Element)
Implicitly converts an Element to an instance of this class.
public static implicit operator WpfWin32Element(Element element)
Parameters
elementElementThe element to convert.
Returns
- WpfWin32Element
The WpfWin32Element.
Exceptions
- ArgumentNullException
If
elementisnull.- CapabilityNotSupportedException
If the element does not support the capabilities required by this adapter.
implicit operator WpfWin32Element(string)
Implicitly converts a string to an instance of this class by searching the root.
public static implicit operator WpfWin32Element(string path)
Parameters
pathstringThe search path.
Returns
- WpfWin32Element
The WpfWin32Element.
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.