Function getElements

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


    All nodes that match options.


    • 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[]