Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface InteractorConstructor<E, FP, FM, AM>

Type parameters

  • E: Element

    The type of DOM Element that this interactor operates on.

  • FP: FilterParams<any, any>

  • FM: FilterMethods<any, any>

  • AM: ActionMethods<any, any>

Hierarchy

  • InteractorConstructor

Callable

  • InteractorConstructor(filters?: FP): Interactor<E, FP> & FM & AM
  • InteractorConstructor(value: MaybeMatcher<string>, filters?: FP): Interactor<E, FP> & FM & AM
  • The constructor can be called with filters only:

    Link({ id: 'home-link', href: '/' });
    

    Or with no arguments, this can be especially useful when finding a nested element.

    ListItem('JavaScript').find(Link()).click(); // click the only link within a specific list item
    

    Parameters

    • Optional filters: FP

      An object describing a set of filters to apply, which should match the value of applying the filters defined in the InteractorSpecification to the element.

    Returns Interactor<E, FP> & FM & AM

  • The constructor can be called with a locator:

    Link('Home');
    

    Or with a locator and options:

    Link('Home', { href: '/' });
    

    Parameters

    • value: MaybeMatcher<string>

      The locator value, which should match the value of applying the locator function defined in the InteractorSpecification to the element.

    • Optional filters: FP

      An object describing a set of filters to apply, which should match the value of applying the filters defined in the InteractorSpecification to the element.

    Returns Interactor<E, FP> & FM & AM

Index

Methods

actions

  • Type parameters

    • AR: Actions<E>

    Parameters

    • actions: AR

    Returns InteractorConstructor<E, FP, FM, MergeObjects<AM, ActionMethods<E, AR>>>

extend

  • Type parameters

    • ER: Element = E

    Parameters

    • name: string

    Returns InteractorConstructor<ER, FP, FM, AM>

filters

  • filters<FR>(filters: FR): InteractorConstructor<E, MergeObjects<FP, FilterParams<E, FR>>, MergeObjects<FM, FilterMethods<E, FR>>, AM>
  • Type parameters

    • FR: Filters<E>

    Parameters

    • filters: FR

    Returns InteractorConstructor<E, MergeObjects<FP, FilterParams<E, FR>>, MergeObjects<FM, FilterMethods<E, FR>>, AM>

locator

  • Parameters

    • value: LocatorFn<E>

    Returns InteractorConstructor<E, FP, FM, AM>

selector

  • Parameters

    • value: string

    Returns InteractorConstructor<E, FP, FM, AM>

Generated using TypeDoc