Class Cell
- Namespace
- Ranorex
- Assembly
- Ranorex.Core.dll
Represents a table cell.
public class Cell : Adapter, IAdapter
- Inheritance
-
Cell
- Implements
- Inherited Members
Constructors
Cell()
Creates a new Cell adapter instance. This constructor is used internally by the Ranorex Core Framework for performance issues!
protected Cell()
Cell(Element)
Creates a new Cell adapter instance.
public Cell(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
ColumnIndex
The index of the column the cell belongs to.
public virtual int ColumnIndex { get; }
Property Value
Image
The image content of the cell.
public virtual Image Image { get; }
Property Value
IsHeader
True if the cell is a row or column header.
public virtual bool IsHeader { get; }
Property Value
RequiredCapabilities
Capabilities required by the adapter implementation.
protected override string[] RequiredCapabilities { get; }
Property Value
- string[]
RowIndex
The index of the row the cell belongs to cell.
public virtual int RowIndex { get; }
Property Value
Selected
True if the cell is currently selected.
public virtual bool Selected { get; set; }
Property Value
Exceptions
- SetAttributeFailedException
Thrown if setting the attribute value failed.
Text
The text content of the cell.
public virtual string Text { get; }
Property Value
Methods
FromElement(Element)
Converts an Element to an instance of this class.
public static Cell FromElement(Element element)
Parameters
elementElementThe element to convert.
Returns
- Cell
The Cell.
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 Cell FromPath(string path)
Parameters
pathstringThe search path.
Returns
- Cell
The Cell.
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.
Select()
Selects the cell.
public virtual void Select()
Exceptions
- ActionFailedException
Thrown if invoking the action failed.
Operators
implicit operator Cell(Element)
Implicitly converts an Element to an instance of this class.
public static implicit operator Cell(Element element)
Parameters
elementElementThe element to convert.
Returns
- Cell
The Cell.
Exceptions
- ArgumentNullException
If
elementisnull.- CapabilityNotSupportedException
If the element does not support the capabilities required by this adapter.
implicit operator Cell(string)
Implicitly converts a string to an instance of this class by searching the root.
public static implicit operator Cell(string path)
Parameters
pathstringThe search path.
Returns
- Cell
The Cell.
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.