Answers for "get element by xpath"

1

get element by xpath

function getElementByXpath(path) {
  return document.evaluate(path, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
}
Posted by: Guest on March-25-2021
1

get element by xpath

document.evaluate('XPATH HERE', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
Posted by: Guest on February-13-2021

Code answers related to "get element by xpath"

Code answers related to "Javascript"

Browse Popular Code Answers by Language