Table of Contents

Class List

Namespace
Ranorex
Assembly
Ranorex.Core.dll

Represents a logical list such as a listbox.

public class List : Adapter, IAdapter
Inheritance
List
Implements
Inherited Members

Constructors

List()

Creates a new List adapter instance. This constructor is used internally by the Ranorex Core Framework for performance issues!

protected List()

List(Element)

Creates a new List adapter instance.

public List(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

this[string]

Gets the ListItem with the specified item label.

public ListItem this[string itemLabel] { get; }

Parameters

itemLabel string

Property Value

ListItem

The list item.

Exceptions

ElementNotFoundException

If no item with that label is found.

Items

Gets the list items contained in the list.

public IList<ListItem> Items { get; }

Property Value

IList<ListItem>

The list items.

RequiredCapabilities

Capabilities required by the adapter implementation.

protected override string[] RequiredCapabilities { get; }

Property Value

string[]

SelectedItemIndex

The index of the currently selected item.

public virtual int SelectedItemIndex { get; set; }

Property Value

int

Exceptions

SetAttributeFailedException

Thrown if setting the attribute value failed.

SelectedItemText

The text of the currently selected item.

public virtual string SelectedItemText { get; set; }

Property Value

string

Exceptions

SetAttributeFailedException

Thrown if setting the attribute value failed.

SelectedItems

Gets the list of selected items contained in the list.

public IList<ListItem> SelectedItems { get; }

Property Value

IList<ListItem>

The list items.

Methods

FromElement(Element)

Converts an Element to an instance of this class.

public static List FromElement(Element element)

Parameters

element Element

The element to convert.

Returns

List

The List.

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 List FromPath(string path)

Parameters

path string

The search path.

Returns

List

The List.

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 List(Element)

Implicitly converts an Element to an instance of this class.

public static implicit operator List(Element element)

Parameters

element Element

The element to convert.

Returns

List

The List.

Exceptions

ArgumentNullException

If element is null.

CapabilityNotSupportedException

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

implicit operator List(string)

Implicitly converts a string to an instance of this class by searching the root.

public static implicit operator List(string path)

Parameters

path string

The search path.

Returns

List

The List.

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.