by kabacha · 6y ago · 0 comments
let element = robulaPlus.getElementByXPath('/html/body/div/span/a',
document);
robulaPlus.getRobustXPath(element, document);
# what's the result?I tried running the algorithm in Chrome. It output much shorter XPath than one copied from Chrome Developer tool.
e.g. "//*[@id="rso"]/div[4]/div/div[1]/a/h3" => "//*[contains(text(),'(text of the element)')]"