import {TargetNestedElements} from '@serenity-js/protractor/lib/screenplay/questions/targets'
TargetNestedElements
Locates a group of WebElements located within another WebElement.
Instead of using this class directly, please use Target.all and TargetElements#of instead.
Extends:
Implements:
Tests:
- Target allows the actor to locate all elements relative to another target
- Target provides a sensible description of elements that are nested
- Target when nesting targets allows for Target
to be nested within another Target - Target when nesting targets and filtering them allows for nested Target
to be filtered - Target when nesting targets and filtering them allows for nested Target
to be counted - Target when nesting targets and filtering them allows for the first of nested Target
to be retrieved - Target when nesting targets and filtering them allows for the last of nested Target
to be retrieved - Target when nesting targets and filtering them allows for the nth of nested Target
to be retrieved
See also:
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> |
|
public |
Returns the number of ElementFinders matched by the |
|
public |
Returns the first of ElementFinders matched by the |
|
public |
get(index: number): Question<ElementFinder> Returns an ElementFinder at |
|
public |
Returns the last of ElementFinders matched by the |
|
public |
of(parent: Question<ElementFinder> | ElementFinder): TargetNestedElements Retrieves a group of WebElements located by |
|
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 |
Public Constructors
public constructor(parent: Question<ElementFinder> | ElementFinder, children: Question<ElementArrayFinder> | ElementArrayFinder) source
Params:
Name | Type | Attribute | Description |
parent | Question<ElementFinder> | ElementFinder | ||
children | Question<ElementArrayFinder> | ElementArrayFinder |
Public Methods
public answeredBy(actor: AnswersQuestions & UsesAbilities): Promise<void> source
Params:
Name | Type | Attribute | Description |
actor | AnswersQuestions & UsesAbilities |
Returns:
Promise<void> |
public count(): Question<Promise<number>> source
Returns the number of ElementFinders matched by the locator
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:
Name | Type | Attribute | Description |
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:
Name | Type | Attribute | Description |
parent | Question<ElementFinder> | ElementFinder |
Tests:
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:
Name | Type | Attribute | Description |
question | MetaQuestion<ElementFinder, Promise<Answer_Type>|Answer_Type> | ||
expectation | Expectation<any, Answer_type> |