// paste in chrome console. let answers = Array.prototype.slice .call( document.querySelectorAll( "table > tbody > tr > td > table > tbody > tr > td:nth-child(2)[valign='top'] > div > span.correctAnswerFlag" ) ) .reduce((acc, n) => { const node = n.parentNode.children[2] if (node.innerHTML.indexOf(" -1) { acc.push(node.innerText) } return acc }, []) let payload = Array.prototype.slice .call( document.querySelectorAll( "table > tbody > tr:nth-child(2) > td:nth-child(2) > div.vtbegenerated.inlineVtbegenerated" ) ) .map((node, index) => { return `${index + 1}. ${node.innerText.replace('\n','')}\ta: ${answers[index]}` }) .join("") console.log(payload) copy(payload)