HTML to Xpath is a module that converts an HTMLElement from visible DOM to Xpath.
This code functions under libraries like jsdom.
const htmlToXpath = require("html-to-xpath");
const xpath = htmlToXpath(<HTMLElement>);
We welcome contributions!
Please feel free to star or pull request this module.