Class ToolBar
- Namespace
- Ranorex
- Assembly
- Ranorex.Core.dll
Represents a tool bar.
public class ToolBar : Adapter, IAdapter
- Inheritance
-
ToolBar
- Implements
- Inherited Members
Constructors
ToolBar()
Creates a new ToolBar adapter instance. This constructor is used internally by the Ranorex Core Framework for performance issues!
protected ToolBar()
ToolBar(Element)
Creates a new ToolBar adapter instance.
public ToolBar(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
Buttons
Gets the buttons contained in the toolbar.
public IList<Button> Buttons { get; }
Property Value
this[string]
Gets the Button with the specified label.
public Button this[string itemLabel] { get; }
Parameters
itemLabelstring
Property Value
- Button
The toolbar button.
Exceptions
- ElementNotFoundException
If the element is not found.
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 ToolBar FromElement(Element element)
Parameters
elementElementThe element to convert.
Returns
- ToolBar
The ToolBar.
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 ToolBar FromPath(string path)
Parameters
pathstringThe search path.
Returns
- ToolBar
The ToolBar.
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 ToolBar(Element)
Implicitly converts an Element to an instance of this class.
public static implicit operator ToolBar(Element element)
Parameters
elementElementThe element to convert.
Returns
- ToolBar
The ToolBar.
Exceptions
- ArgumentNullException
If
elementisnull.- CapabilityNotSupportedException
If the element does not support the capabilities required by this adapter.
implicit operator ToolBar(string)
Implicitly converts a string to an instance of this class by searching the root.
public static implicit operator ToolBar(string path)
Parameters
pathstringThe search path.
Returns
- ToolBar
The ToolBar.
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.