Class JavaItem
- Namespace
- Ranorex
- Assembly
- Ranorex.Plugin.Java.dll
The element is a part of a Java application.
public class JavaItem : Adapter, IAdapter
- Inheritance
-
JavaItem
- Implements
- Inherited Members
Constructors
JavaItem()
Creates a new JavaItem adapter instance. This constructor is used internally by the Ranorex Core Framework for performance issues!
protected JavaItem()
JavaItem(Element)
Creates a new JavaItem adapter instance.
public JavaItem(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
Expanded
The expansion state of the item.
public virtual bool Expanded { get; set; }
Property Value
Exceptions
- SetAttributeFailedException
Thrown if setting the attribute value failed.
ItemId
A generic identifier for this item.
public virtual string ItemId { 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 JavaItem FromElement(Element element)
Parameters
elementElementThe element to convert.
Returns
- JavaItem
The JavaItem.
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 JavaItem FromPath(string path)
Parameters
pathstringThe search path.
Returns
- JavaItem
The JavaItem.
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 JavaItem(Element)
Implicitly converts an Element to an instance of this class.
public static implicit operator JavaItem(Element element)
Parameters
elementElementThe element to convert.
Returns
- JavaItem
The JavaItem.
Exceptions
- ArgumentNullException
If
elementisnull.- CapabilityNotSupportedException
If the element does not support the capabilities required by this adapter.
implicit operator JavaItem(string)
Implicitly converts a string to an instance of this class by searching the root.
public static implicit operator JavaItem(string path)
Parameters
pathstringThe search path.
Returns
- JavaItem
The JavaItem.
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.