Class SapItem
- Namespace
- Ranorex
- Assembly
- Ranorex.Plugin.Sap.dll
The element represents an item in a SAP data-bound control.
public class SapItem : Adapter, IAdapter
- Inheritance
-
SapItem
- Implements
- Inherited Members
Constructors
SapItem()
Creates a new SapItem adapter instance. This constructor is used internally by the Ranorex Core Framework for performance issues!
protected SapItem()
SapItem(Element)
Creates a new SapItem adapter instance.
public SapItem(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
ColId
The id of the column this item is assigned to, if available.
public virtual string ColId { get; }
Property Value
Color
The color of the item, if available.
public virtual string Color { get; }
Property Value
Icon
The name of the icon assigned to this item.
public virtual string Icon { get; }
Property Value
ItemId
The id/key of the item, if available.
public virtual string ItemId { get; }
Property Value
RequiredCapabilities
Capabilities required by the adapter implementation.
protected override string[] RequiredCapabilities { get; }
Property Value
- string[]
State
The current item state, such as selected or checked.
public virtual string State { get; }
Property Value
ToolTip
The tooltip text assigned to the item.
public virtual string ToolTip { get; }
Property Value
Type
The general type of the item.
public virtual string Type { get; }
Property Value
Methods
FromElement(Element)
Converts an Element to an instance of this class.
public static SapItem FromElement(Element element)
Parameters
elementElementThe element to convert.
Returns
- SapItem
The SapItem.
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 SapItem FromPath(string path)
Parameters
pathstringThe search path.
Returns
- SapItem
The SapItem.
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.
PerformDoubleClick()
Performs a simulated mouse-doubleclick on the item if supported.
public virtual void PerformDoubleClick()
Exceptions
- ActionFailedException
Thrown if invoking the action failed.
Operators
implicit operator SapItem(Element)
Implicitly converts an Element to an instance of this class.
public static implicit operator SapItem(Element element)
Parameters
elementElementThe element to convert.
Returns
- SapItem
The SapItem.
Exceptions
- ArgumentNullException
If
elementisnull.- CapabilityNotSupportedException
If the element does not support the capabilities required by this adapter.
implicit operator SapItem(string)
Implicitly converts a string to an instance of this class by searching the root.
public static implicit operator SapItem(string path)
Parameters
pathstringThe search path.
Returns
- SapItem
The SapItem.
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.