Function getElements

  • getElements(options: TestElementOpts, nodes: AnyNode | AnyNode[], recurse: boolean, limit?: number): AnyNode[]
  • Returns all nodes that match options.

    Returns

    All nodes that match options.

    Parameters

    • options: TestElementOpts

      An object describing nodes to look for.

    • nodes: AnyNode | AnyNode[]

      Nodes to search through.

    • recurse: boolean

      Also consider child nodes.

    • limit: number = Infinity

      Maximum number of nodes to return.

    Returns AnyNode[]