Last active
July 4, 2024 10:11
-
-
Save Kcko/e944302b4ff659bd3c5b05688f057ed5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function inspectXPath(xpath) { | |
const element = document.evaluate(xpath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; | |
if (element) { | |
inspect(element); | |
} else { | |
console.log("Element not found"); | |
} | |
} | |
inspectXPath('/html/body/div[2]/div[4]/div[1]/div/div[2]/div/div/div[1]/article[3]/div[1]') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment