by gabrielsroka · 2y ago · 0 comments
javascript:for (let b of document.querySelectorAll('.offer-cta[title="Add to Card"]')) {
console.log("Clicking offer button");
b.click();
(async () => {await new Promise(r => setTimeout(r, 2e3))})();
}
does the setTimeout work? wouldn't you need something like this (in an async function) for (let b of document.querySelectorAll('.offer-cta[title="Add to Card"]')) {
console.log('Clicking offer button');
b.click();
await new Promise(r => setTimeout(r, 2e3));
}The wrapped async function is for Firefox I understand.