Skip to main content

Function: getListItemIterator()

getListItemIterator<T>(host, itemLocatorBase, driverClass, startIndex): AsyncGenerator<T, void, unknown>

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

Get an iterator of list item driver. List item is an indefinite number of items under the same host

Type Parameters

T

T extends ComponentDriver<any>

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

driverClass

ComponentDriverClass<T>

The driver class of the list item

startIndex

number = 0

The starting index of the list item iterator, default is 0

Returns

AsyncGenerator<T, void, unknown>