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
Name | Type |
---|---|
T | extends ComponentDriver <> |
Parameters
Name | Type | Description |
---|---|---|
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
<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
Name | Type |
---|---|
T | extends ComponentDriver <any > |
Parameters
Name | Type | Description |
---|---|---|
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 |
Returns
AsyncGenerator
<T
, void
, unknown
>