import {ElementArrayFinderListAdapter} from '@serenity-js/protractor/lib/screenplay/questions/lists'
ElementArrayFinderListAdapter
Adapts ElementArrayFinder 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 |
constructor(collection: Question<ElementArrayFinder> | ElementArrayFinder) |
Method Summary
Public Methods | ||
public |
count(actor: AnswersQuestions & UsesAbilities): Promise<number> Returns the number of ElementFinders that the underlying ElementArrayFinder contains, left after applying any filters. |
|
public |
first(actor: AnswersQuestions & UsesAbilities): ElementFinder Returns the first of ElementFinders that the underlying ElementArrayFinder contains, left after applying any filters |
|
public |
get(actor: AnswersQuestions & UsesAbilities, index: number): ElementFinder Returns the nth of ElementFinders that the underlying ElementArrayFinder contains, left after applying any filters |
|
public |
items(actor: AnswersQuestions & UsesAbilities): ElementFinder Returns the underlying ElementArrayFinder, with any filters applied. |
|
public |
last(actor: AnswersQuestions & UsesAbilities): ElementFinder Returns the last of ElementFinders that the underlying ElementArrayFinder contains, left after applying any filters |
|
public |
toString(): string Returns a human-readable description of the underlying ElementArrayFinder. |
|
public |
withFilter(question: MetaQuestion<ElementFinder, Promise<Answer_Type>|Answer_Type>, expectation: Expectation<any, Answer_Type>): ListAdapter<ElementFinder, ElementArrayFinder> Filters the underlying ElementArrayFinder so that the result contains only those ElementFinders that meet the Expectation |
Public Constructors
public constructor(collection: Question<ElementArrayFinder> | ElementArrayFinder) source
Params:
Name | Type | Attribute | Description |
collection | Question<ElementArrayFinder> | ElementArrayFinder |
Public Methods
public count(actor: AnswersQuestions & UsesAbilities): Promise<number> source
Returns the number of ElementFinders that the underlying ElementArrayFinder contains, left after applying any filters.
Params:
Name | Type | Attribute | Description |
actor | AnswersQuestions & UsesAbilities |
Returns:
Promise<number> |
public first(actor: AnswersQuestions & UsesAbilities): ElementFinder source
Returns the first of ElementFinders that the underlying ElementArrayFinder contains, left after applying any filters
Params:
Name | Type | Attribute | Description |
actor | AnswersQuestions & UsesAbilities |
public get(actor: AnswersQuestions & UsesAbilities, index: number): ElementFinder source
Returns the nth of ElementFinders that the underlying ElementArrayFinder 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): ElementFinder source
Returns the underlying ElementArrayFinder, with any filters applied.
Params:
Name | Type | Attribute | Description |
actor | AnswersQuestions & UsesAbilities |
public last(actor: AnswersQuestions & UsesAbilities): ElementFinder source
Returns the last of ElementFinders that the underlying ElementArrayFinder 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 ElementArrayFinder.
Returns:
string |
public withFilter(question: MetaQuestion<ElementFinder, Promise<Answer_Type>|Answer_Type>, expectation: Expectation<any, Answer_Type>): ListAdapter<ElementFinder, ElementArrayFinder> source
Filters the underlying ElementArrayFinder so that the result contains only those ElementFinders that meet the Expectation
Params:
Name | Type | Attribute | Description |
question | MetaQuestion<ElementFinder, Promise<Answer_Type>|Answer_Type> | ||
expectation | Expectation<any, Answer_Type> |