Skip to main content

Function: getListItemByIndex()

getListItemByIndex<T>(host, itemLocatorBase, index, driverClass): Promise<null | T>

Defined in: packages/core/src/drivers/listHelper.ts:16

Get list item driver within host by index. List item is an indefinite number of items under the same host with similar characteristics defined by the itemLocatorBase.

Type Parameters

T

T extends ComponentDriver<{ }>

Parameters

host

ComponentDriver<any>

The component the list item is under

itemLocatorBase

PartLocator

The locator of the list item without the index, the locator should already compound the host locator if needed

index

number

The index of the list item

driverClass

ComponentDriverClass<T>

The driver class of the list item

Returns

Promise<null | T>