Class DelphiControl
- Namespace
- Ranorex
- Assembly
- Ranorex.Plugin.Win32.dll
Capability of a Delphi-based control.
public class DelphiControl : Adapter, IAdapter
- Inheritance
-
DelphiControl
- Implements
- Inherited Members
Constructors
DelphiControl()
Creates a new DelphiControl adapter instance. This constructor is used internally by the Ranorex Core Framework for performance issues!
protected DelphiControl()
DelphiControl(Element)
Creates a new DelphiControl adapter instance.
public DelphiControl(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
ControlName
The name of the Delphi control.
public virtual string ControlName { get; }
Property Value
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 DelphiControl FromElement(Element element)
Parameters
elementElementThe element to convert.
Returns
- DelphiControl
The DelphiControl.
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 DelphiControl FromPath(string path)
Parameters
pathstringThe search path.
Returns
- DelphiControl
The DelphiControl.
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 DelphiControl(Element)
Implicitly converts an Element to an instance of this class.
public static implicit operator DelphiControl(Element element)
Parameters
elementElementThe element to convert.
Returns
- DelphiControl
The DelphiControl.
Exceptions
- ArgumentNullException
If
elementisnull.- CapabilityNotSupportedException
If the element does not support the capabilities required by this adapter.
implicit operator DelphiControl(string)
Implicitly converts a string to an instance of this class by searching the root.
public static implicit operator DelphiControl(string path)
Parameters
pathstringThe search path.
Returns
- DelphiControl
The DelphiControl.
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.