I'm trying to extract links from a webpage and having some difficulties hope someone can help. Below is the test Macro: open a page, extract all links and display them. However when I ran it the webpage opens but there is no link displayed.
For the javascript code, I also tried below but got same result (no link displayed).
Array.from(document.links, x => x.href).filter(e => e.match(/html$/i)).join('\n');
How to debug and make this work? ("Allow JavaScript from Apple Events" has been checked in Safari setting). Thanks.