Options
All
  • Public
  • Public/Protected
  • All
Menu

Class IdCollector

The IdCollector is responsible to collect and prepare the elements, from which the page-objects will be generated, in the application context. It provides a api to the core part in the NodeJs context.

Important: You need to call the init method, before you can do anything else.

Hint: Use the Id collector just in development mode or in a dedicated environment mode, so it can not interfere your production.

global methods

signature description
window.getE2eElementTree(): IE2eElement[] Provides the elements from the IDCollector as a tree.
window.getE2eElementList(): IE2eElement[] Provides the elements from the IDCollector as a list.
export
class

IdCollector

Hierarchy

  • IdCollector

Index

Properties

Static Private allE2EIds

allE2EIds: IE2eElement[] = []

Static Private isInitialized

isInitialized: boolean = false

Static Private uidCounter

uidCounter: number = 0

Static Private uidNativeElementsMap

uidNativeElementsMap: object[] = []

Methods

Static add

  • add(nativeElement: Element, id: string): string
  • Adds an element to the IdCollector.

    static
    memberof

    IdCollector

    Parameters

    • nativeElement: Element
    • id: string

    Returns string

    the unique handle, which is needed to remove the item.

Static Private addParentRecursive

  • addParentRecursive(nativeElement: Element, parentUid: string): void
  • Parameters

    • nativeElement: Element
    • parentUid: string

    Returns void

Static Private addParentRecursiveForEachChild

  • addParentRecursiveForEachChild(nativeElement: Element, parentUid: string): void
  • Parameters

    • nativeElement: Element
    • parentUid: string

    Returns void

Static Private addParents

  • addParents(): void

Static Private buildTree

  • buildTree(): IE2eElement[]

Static Private getNativeElementForUid

  • getNativeElementForUid(uid: string): Element

Static init

  • init(): void
  • Initializes the IdCollector.

    static
    memberof

    IdCollector

    Returns void

Static remove

  • remove(uid: string): void
  • Removes a element from the IdCollector.

    static
    memberof

    IdCollector

    Parameters

    • uid: string

      The handle returned by the add method, of the element to remove.

    Returns void

Static Private removeAllParents

  • removeAllParents(): void

Generated using TypeDoc