Skip to main content

Namespace: listHelper

@atomic-testing/core.listHelper

Functions

getListItemByIndex

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

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

NameType
Textends ComponentDriver<>

Parameters

NameTypeDescription
hostComponentDriver<any>The component the list item is under
itemLocatorBasePartLocatorThe locator of the list item without the index, the locator should already compound the host locator if needed
indexnumberThe index of the list item
driverClassComponentDriverClass<T>The driver class of the list item

Returns

Promise<T | null>

Defined in

packages/core/src/drivers/listHelper.ts:15


getListItemIterator

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

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

Type parameters

NameType
Textends ComponentDriver<any>

Parameters

NameTypeDescription
hostComponentDriver<any>The component the list item is under
itemLocatorBasePartLocatorThe locator of the list item without the index, the locator should already compound the host locator if needed
driverClassComponentDriverClass<T>The driver class of the list item

Returns

AsyncGenerator<T, void, unknown>

Defined in

packages/core/src/drivers/listHelper.ts:37