import {ElementArrayListAdapter} from '@serenity-js/webdriverio/lib/screenplay/questions'
ElementArrayListAdapter
Adapts ElementArray so that it can be used with List.
You most likely won't need to use this class directly. Instead, check out Target and Target.all.
Implements:
See also:
Constructor Summary
Public Constructor | ||
public |
|
Method Summary
Public Methods | ||
public |
async count(actor: AnswersQuestions & UsesAbilities): Promise<number> Returns the number of Elements that the underlying ElementArray contains, left after applying any filters. |
|
public |
Returns the first of Elements that the underlying ElementArray contains, left after applying any filters |
|
public |
Returns the nth of Elements that the underlying ElementArray contains, left after applying any filters |
|
public |
Returns the underlying ElementArray, with any filters applied. |
|
public |
Returns the last of Elements that the underlying ElementArray contains, left after applying any filters |
|
public |
toString(): string Returns a human-readable description of the underlying ElementArray. |
|
public |
withFilter(question: MetaQuestion<Answerable<Element<'async'>>, Promise<Answer_Type>|Answer_Type>, expectation: Expectation<any, Answer_Type>): ListAdapter<Element<'async'>, ElementArrayFinder> Filters the underlying ElementArray so that the result contains only those {@link Element<'async'>}s that meet the Expectation |
Public Constructors
public constructor() source
Public Methods
public async count(actor: AnswersQuestions & UsesAbilities): Promise<number> source
Returns the number of Elements that the underlying ElementArray contains, left after applying any filters.
Params:
Name | Type | Attribute | Description |
actor | AnswersQuestions & UsesAbilities |
Returns:
Promise<number> |
public async first(actor: AnswersQuestions & UsesAbilities): Element<'async'> source
Returns the first of Elements that the underlying ElementArray contains, left after applying any filters
Params:
Name | Type | Attribute | Description |
actor | AnswersQuestions & UsesAbilities |
public async get(actor: AnswersQuestions & UsesAbilities, index: number): Element<'async'> source
Returns the nth of Elements that the underlying ElementArray contains, left after applying any filters
Params:
Name | Type | Attribute | Description |
actor | AnswersQuestions & UsesAbilities | ||
index | number | Zero-based index of the item to return |
public items(actor: AnswersQuestions & UsesAbilities): Element<'async'> source
Returns the underlying ElementArray, with any filters applied.
Params:
Name | Type | Attribute | Description |
actor | AnswersQuestions & UsesAbilities |
public async last(actor: AnswersQuestions & UsesAbilities): Element<'async'> source
Returns the last of Elements that the underlying ElementArray contains, left after applying any filters
Params:
Name | Type | Attribute | Description |
actor | AnswersQuestions & UsesAbilities |
public toString(): string source
Returns a human-readable description of the underlying ElementArray.
Returns:
string |
public withFilter(question: MetaQuestion<Answerable<Element<'async'>>, Promise<Answer_Type>|Answer_Type>, expectation: Expectation<any, Answer_Type>): ListAdapter<Element<'async'>, ElementArrayFinder> source
Filters the underlying ElementArray so that the result contains only those {@link Element<'async'>}s that meet the Expectation
Params:
Name | Type | Attribute | Description |
question | MetaQuestion<Answerable<Element<'async'>>, Promise<Answer_Type>|Answer_Type> | ||
expectation | Expectation<any, Answer_Type> |