Class Container
- Namespace
- Ranorex
- Assembly
- Ranorex.Core.dll
Represents a logical container element, such as a panel or groupbox.
public class Container : Adapter, IAdapter
- Inheritance
-
Container
- Implements
- Inherited Members
Constructors
Container()
Creates a new Container adapter instance. This constructor is used internally by the Ranorex Core Framework for performance issues!
protected Container()
Container(Element)
Creates a new Container adapter instance.
public Container(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
Caption
The caption or title of the container.
public virtual string Caption { get; }
Property Value
RequiredCapabilities
Capabilities required by the adapter implementation.
protected override string[] RequiredCapabilities { get; }
Property Value
- string[]
Type
The type of the container.
[OriginalDisplayName("ContainerType")]
public virtual string Type { get; }
Property Value
Methods
FromElement(Element)
Converts an Element to an instance of this class.
public static Container FromElement(Element element)
Parameters
elementElementThe element to convert.
Returns
- Container
The Container.
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 Container FromPath(string path)
Parameters
pathstringThe search path.
Returns
- Container
The Container.
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 Container(Element)
Implicitly converts an Element to an instance of this class.
public static implicit operator Container(Element element)
Parameters
elementElementThe element to convert.
Returns
- Container
The Container.
Exceptions
- ArgumentNullException
If
elementisnull.- CapabilityNotSupportedException
If the element does not support the capabilities required by this adapter.
implicit operator Container(string)
Implicitly converts a string to an instance of this class by searching the root.
public static implicit operator Container(string path)
Parameters
pathstringThe search path.
Returns
- Container
The Container.
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.