Function getXPathFromElement

Get the XPath of a given HTML element.

  • Parameters

    • element: HTMLElement

      The HTML element to get the XPath from.

    Returns null | string

    • The XPath of the element, or null if it couldn't be determined.