import {ElementArrayFinderListAdapter} from '@serenity-js/protractor/lib/screenplay/questions/lists'
public class | source

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:

NameTypeAttributeDescription
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:

NameTypeAttributeDescription
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:

NameTypeAttributeDescription
actor AnswersQuestions & UsesAbilities

Returns:

ElementFinder

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:

NameTypeAttributeDescription
actor AnswersQuestions & UsesAbilities
index number

Zero-based index of the item to return

Returns:

ElementFinder

public items(actor: AnswersQuestions & UsesAbilities): ElementFinder source

Returns the underlying ElementArrayFinder, with any filters applied.

Params:

NameTypeAttributeDescription
actor AnswersQuestions & UsesAbilities

Returns:

ElementFinder

public last(actor: AnswersQuestions & UsesAbilities): ElementFinder source

Returns the last of ElementFinders that the underlying ElementArrayFinder contains, left after applying any filters

Params:

NameTypeAttributeDescription
actor AnswersQuestions & UsesAbilities

Returns:

ElementFinder

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:

NameTypeAttributeDescription
question MetaQuestion<ElementFinder, Promise<Answer_Type>|Answer_Type>
expectation Expectation<any, Answer_Type>