Class SapElement
- Namespace
- Ranorex
- Assembly
- Ranorex.Plugin.Sap.dll
The element is a part of an SAP GUI application.
public class SapElement : Adapter, IAdapter
- Inheritance
-
SapElement
- Implements
- Inherited Members
Constructors
SapElement()
Creates a new SapElement adapter instance. This constructor is used internally by the Ranorex Core Framework for performance issues!
protected SapElement()
SapElement(Element)
Creates a new SapElement adapter instance.
public SapElement(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
Changeable
Determines whether the component has user-changeable content.
public virtual bool Changeable { get; }
Property Value
IconName
The name of the icon for this component, if available.
public virtual string IconName { get; }
Property Value
Modified
Determines whether the component has unsaved content.
public virtual bool Modified { get; }
Property Value
Name
The name of the SAP component.
public virtual string Name { get; }
Property Value
RequiredCapabilities
Capabilities required by the adapter implementation.
protected override string[] RequiredCapabilities { get; }
Property Value
- string[]
Text
The text associated with this component.
public virtual string Text { get; }
Property Value
Tooltip
The tooltip text associated with this component.
public virtual string Tooltip { get; }
Property Value
Type
The internal type of the SAP component.
public virtual string Type { get; }
Property Value
Methods
FromElement(Element)
Converts an Element to an instance of this class.
public static SapElement FromElement(Element element)
Parameters
elementElementThe element to convert.
Returns
- SapElement
The SapElement.
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 SapElement FromPath(string path)
Parameters
pathstringThe search path.
Returns
- SapElement
The SapElement.
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.
ShowContextMenu()
Opens the context menu associated with the component, if available.
public virtual void ShowContextMenu()
Exceptions
- ActionFailedException
Thrown if invoking the action failed.
Operators
implicit operator SapElement(Element)
Implicitly converts an Element to an instance of this class.
public static implicit operator SapElement(Element element)
Parameters
elementElementThe element to convert.
Returns
- SapElement
The SapElement.
Exceptions
- ArgumentNullException
If
elementisnull.- CapabilityNotSupportedException
If the element does not support the capabilities required by this adapter.
implicit operator SapElement(string)
Implicitly converts a string to an instance of this class by searching the root.
public static implicit operator SapElement(string path)
Parameters
pathstringThe search path.
Returns
- SapElement
The SapElement.
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.