Table of Contents

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

element Element

The element to create the adapter for.

Exceptions

NullReferenceException

If element is null.

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

IList<Button>

The buttons.

this[string]

Gets the Button with the specified label.

public Button this[string itemLabel] { get; }

Parameters

itemLabel string

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

element Element

The element to convert.

Returns

ToolBar

The ToolBar.

Exceptions

ArgumentNullException

If element is null.

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

path string

The search path.

Returns

ToolBar

The ToolBar.

Remarks

The DefaultSearchTimeout is used to search for the specified path.

Exceptions

ArgumentNullException

If path is null.

RxPathException

If the specified path is 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

element Element

The element to convert.

Returns

ToolBar

The ToolBar.

Exceptions

ArgumentNullException

If element is null.

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

path string

The search path.

Returns

ToolBar

The ToolBar.

Remarks

The DefaultSearchTimeout is used to search for the specified path.

Exceptions

ArgumentNullException

If path is null.

RxPathException

If the specified path is not valid.

ElementNotFoundException

If no element is found.

CapabilityNotSupportedException

If the element does not support the capabilities required by this adapter.