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

Constructor Summary

Public Constructor
public

constructor(parent: Question<ElementFinder> | ElementFinder, children: Question<ElementArrayFinder> | ElementArrayFinder)

Method Summary

Public Methods
public

answeredBy(actor: AnswersQuestions & UsesAbilities): Promise<void>

Makes the provided Actor answer this Question.

public

count(): Question<Promise<number>>

Returns the number of ElementFinders matched by the locator

public

Returns the first of ElementFinders matched by the locator

public

get(index: number): Question<ElementFinder>

Returns an ElementFinder at index for locator

public

Returns the last of ElementFinders matched by the locator

public

of(parent: Question<ElementFinder> | ElementFinder): TargetNestedElements

Retrieves a group of WebElements located by locator, resolved in the context of a parent WebElement.

public

where(question: MetaQuestion<ElementFinder, Promise<Answer_Type>|Answer_Type>, expectation: Expectation<any, Answer_type>): List<ElementArrayFinderListAdapter, ElementFinder, ElementArrayFinder>

Filters the list of ElementFinders matched by locator to those that meet the additional Expectations.

Public Constructors

public constructor(parent: Question<ElementFinder> | ElementFinder, children: Question<ElementArrayFinder> | ElementArrayFinder) source

Params:

NameTypeAttributeDescription
parent Question<ElementFinder> | ElementFinder
children Question<ElementArrayFinder> | ElementArrayFinder

Public Methods

public answeredBy(actor: AnswersQuestions & UsesAbilities): Promise<void> source

Makes the provided Actor answer this Question.

Params:

NameTypeAttributeDescription
actor AnswersQuestions & UsesAbilities

Returns:

Promise<void>

public count(): Question<Promise<number>> source

Returns the number of ElementFinders matched by the locator

Returns:

Question<Promise<number>>

See:

public first(): Question<ElementFinder> source

Returns the first of ElementFinders matched by the locator

See:

public get(index: number): Question<ElementFinder> source

Returns an ElementFinder at index for locator

Params:

NameTypeAttributeDescription
index number

See:

public last(): Question<ElementFinder> source

Returns the last of ElementFinders matched by the locator

See:

public of(parent: Question<ElementFinder> | ElementFinder): TargetNestedElements source

Retrieves a group of WebElements located by locator, resolved in the context of a parent WebElement.

Params:

NameTypeAttributeDescription
parent Question<ElementFinder> | ElementFinder

See:

public where(question: MetaQuestion<ElementFinder, Promise<Answer_Type>|Answer_Type>, expectation: Expectation<any, Answer_type>): List<ElementArrayFinderListAdapter, ElementFinder, ElementArrayFinder> source

Filters the list of ElementFinders matched by locator to those that meet the additional Expectations.

Params:

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

See: