Class ListBox
Defines a
Implements
Inherited Members
Namespace: Legerity.Windows.Elements.Core
Assembly: Legerity.Windows.dll
Syntax
public class ListBox : WindowsElementWrapper, IElementWrapper<WindowsElement>
Constructors
| Improve this Doc View SourceListBox(WindowsElement)
Initializes a new instance of the ListBox class.
Declaration
public ListBox(WindowsElement element)
Parameters
Type | Name | Description |
---|---|---|
WindowsElement | element | The |
Properties
| Improve this Doc View SourceItems
Gets the collection of items associated with the list box.
Declaration
public virtual ReadOnlyCollection<AppiumWebElement> Items { get; }
Property Value
Type | Description |
---|---|
ReadOnlyCollection<AppiumWebElement> |
SelectedItem
Gets the element associated with the currently selected item.
Declaration
public virtual AppiumWebElement SelectedItem { get; }
Property Value
Type | Description |
---|---|
AppiumWebElement |
Methods
| Improve this Doc View SourceClickItem(String)
Clicks on an item in the list box with the specified item name.
Declaration
public virtual void ClickItem(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the item to click. |
Exceptions
Type | Condition |
---|---|
ElementsNotShownException | Thrown when no elements are shown for the expected locator. |
ClickItemByPartialName(String)
Clicks on an item in the list box with the specified partial item name.
Declaration
public virtual void ClickItemByPartialName(string partialName)
Parameters
Type | Name | Description |
---|---|---|
System.String | partialName | The partial name match for the item to click. |
Exceptions
Type | Condition |
---|---|
ElementsNotShownException | Thrown when no elements are shown for the expected locator. |
Operators
| Improve this Doc View SourceImplicit(AppiumWebElement to ListBox)
Allows conversion of a
Declaration
public static implicit operator ListBox(AppiumWebElement element)
Parameters
Type | Name | Description |
---|---|---|
AppiumWebElement | element | The |
Returns
Type | Description |
---|---|
ListBox | The ListBox. |
Implicit(RemoteWebElement to ListBox)
Allows conversion of a
Declaration
public static implicit operator ListBox(RemoteWebElement element)
Parameters
Type | Name | Description |
---|---|---|
RemoteWebElement | element | The |
Returns
Type | Description |
---|---|
ListBox | The ListBox. |
Implicit(WindowsElement to ListBox)
Allows conversion of a
Declaration
public static implicit operator ListBox(WindowsElement element)
Parameters
Type | Name | Description |
---|---|---|
WindowsElement | element | The |
Returns
Type | Description |
---|---|
ListBox | The ListBox. |