Untitled

mail@pastecode.io avatarunknown
plain_text
a month ago
310 B
34
Indexable
Never

for (let i = 2; i <= 20; i++) {
    let xpath = `//*[@id="root"]/div/div[1]/div[3]/div[1]/ul/li[${i}]/div[2]/div/div/div[2]/span/button`;
    let element = document.evaluate(xpath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
    if (element) {
        element.click();
    }
}