function getElementByXpath(path) {
return document.evaluate(path, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
}
setInterval(function() {
console.log("tat");
element = getElementByXpath("/html/body/div[2]/div/div[2]/main/div/div/div/div/div[2]/div[2]/div/div/div/div[1]/div/div/table/tbody/tr[1]/td[7]/div/span/span/span[1]");
element.click();
childFunction();
}, 30000);
function childFunction() {
setTimeout(function() {
console.log("bat")
element = getElementByXpath("/html/body/div[2]/div/div[2]/main/div/div/div/div/div[2]/div[2]/div/div/div/div[1]/div/div/table/tbody/tr[1]/td[7]/div/span/span/span[1]");
element.click();
}, 3000);
}