Generates a unique XPath selector for a given DOM element.

Constructors

Methods

Constructors

Methods

  • Generates a unique XPath selector for the provided element.

    Parameters

    • element: Element

      The DOM element for which to generate an XPath selector.

    Returns string

    A unique XPath selector string.

    Will throw an error if a unique XPath cannot be generated.