Interface IListBox
A drop-down or multiple-selection Web list.
HTML example with the second value selected:
<select name="select">
<option value="value1">Value 1</option>
<option value="value2" selected>Value 2</option>
<option value="value3>Value 3</option>
</select>
Inherited Members
Namespace: HP.LFT.SDK.Web
Assembly: HP.LFT.SDK.dll
Syntax
public interface IListBox : IWebElement, ITestObject, IClickable, IWebTestObject, IWebDescriber, ITestObjectDescriber, ILocationInfoProvider, ISupportsNativeObject, IVisibleProvider, ISupportDragAndDrop, IEnabledProvider
Properties
DefaultValue
The initial text value, which is set when the object is reset.
Declaration
string DefaultValue { get; }
Property Value
| Type | Description |
|---|---|
| string |
IsMultiple
Indicates whether multi-selection is available.
Declaration
bool IsMultiple { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Items
A collection of all IListItem objects in the list.
Declaration
ReadOnlyCollection<IListItem> Items { get; }
Property Value
| Type | Description |
|---|---|
| ReadOnlyCollection<IListItem> |
Remarks
When weblist items are loaded dynamically, it is possible that only a partial list of the items will be returned.
SelectedItems
A collection of all selected items in the list.
Declaration
ReadOnlyCollection<IListItem> SelectedItems { get; }
Property Value
| Type | Description |
|---|---|
| ReadOnlyCollection<IListItem> |
Type
The attribute "type" of the HTML element.
Declaration
string Type { get; }
Property Value
| Type | Description |
|---|---|
| string |
Value
This object's text value.
Declaration
string Value { get; }
Property Value
| Type | Description |
|---|---|
| string |
VisibleItemsCount
The number of visible items in the list.
Declaration
uint VisibleItemsCount { get; }
Property Value
| Type | Description |
|---|---|
| uint |
Methods
Deselect(params IListItem[])
Deselects a list of items in the list box.
Declaration
void Deselect(params IListItem[] items)
Parameters
| Type | Name | Description |
|---|---|---|
| IListItem[] | items | A collection of IListItem objects to deselect |
Deselect(params string[])
Deselects items from the list based on the item names.
Declaration
void Deselect(params string[] items)
Parameters
| Type | Name | Description |
|---|---|---|
| string[] | items | A collection of items to deselect. |
Deselect(params uint[])
Deselects items from the list based on the item indices.
Declaration
void Deselect(params uint[] itemIndices)
Parameters
| Type | Name | Description |
|---|---|---|
| uint[] | itemIndices | A collection of indices to deselect. |
ExtendSelect(params IListItem[])
Selects additional items from the multi-selection list, by ListItem items.
Declaration
void ExtendSelect(params IListItem[] items)
Parameters
| Type | Name | Description |
|---|---|---|
| IListItem[] | items | The items to add to the selection. |
ExtendSelect(params string[])
Selects additional items from the multi-selection list, by name.
Declaration
void ExtendSelect(params string[] items)
Parameters
| Type | Name | Description |
|---|---|---|
| string[] | items | The names of the items to add to the selection. |
ExtendSelect(params uint[])
Selects additional items from the multi-selection list, by item indices.
Declaration
void ExtendSelect(params uint[] itemIndices)
Parameters
| Type | Name | Description |
|---|---|---|
| uint[] | itemIndices | The indices of the items to add to the selection. |
GetItem(string)
Retrieves an item with the given text.
Declaration
IListItem GetItem(string text)
Parameters
| Type | Name | Description |
|---|---|---|
| string | text | The text of this item. |
Returns
| Type | Description |
|---|---|
| IListItem |
Select(params IListItem[])
Selects a list of items in the list box.
Declaration
void Select(params IListItem[] items)
Parameters
| Type | Name | Description |
|---|---|---|
| IListItem[] | items | A collection of IListItem objects to select |
Select(params string[])
Selects items in the list based on the item names.
Declaration
void Select(params string[] items)
Parameters
| Type | Name | Description |
|---|---|---|
| string[] | items | A collection of item names to select. |
Select(params uint[])
Selects items in the list based on the item indices.
Declaration
void Select(params uint[] itemIndices)
Parameters
| Type | Name | Description |
|---|---|---|
| uint[] | itemIndices | A collection of item indices to select. |