import { Question } from '@serenity-js/core' ; import { ElementFinder , Locator } from 'protractor' ; import { NestedTargetBuilder , TargetBuilder } from './builders' ; import { TargetElement } from './TargetElement' ; import { TargetElements } from './TargetElements' ; import { TargetNestedElement } from './TargetNestedElement' ; import { TargetNestedElements } from './TargetNestedElements' ; desc Provides a convenient way to retrieve a single web element or multiple web elements,
 *  so that they can be used with Serenity/JS  {@link @serenity-js/core/lib/screenplay~Interaction} s.
 *
 *  Check out the examples below, as well as the unit tests demonstrating the usage.
 *
 *   example example example example example example example example example example example example example export class Target { desc param { string } name returns { TargetBuilder < TargetElement > & NestedTargetBuilder < TargetNestedElement > } static the ( name ) { return { located : ( byLocator ) : TargetElement => new TargetElement ( name , byLocator ) , of : ( parent ) => { return { located : ( byLocator ) : TargetNestedElement => new TargetNestedElement ( parent , new TargetElement ( name , byLocator ) ) , } ; } , } ; } desc param { string } name returns { TargetBuilder < TargetElements > & NestedTargetBuilder < TargetNestedElements > } static all ( name ) { return { located : ( byLocator ) : TargetElements => new TargetElements ( name , byLocator ) , of : ( parent ) => { return { located : ( byLocator ) : TargetNestedElements => new TargetNestedElements ( parent , new TargetElements ( name , byLocator ) ) , } ; } , } ; } }