Trying to extract destination URLs from a page filled with links, but the source code is complex and does not include direct web addresses. Here's an example snippet of what it looks like:
<li>
<a href="javascript:void(0)">
<span title="Text">Text</span>
</a>
</li>
The code seems obfuscated, possibly loading URLs dynamically from a micro service. Is there a way to retrieve these URLs programmatically without actually following the link? I'm attempting this using JavaScript / Selenium in Java.
I'm considering triggering the onclick
event to capture the URL before any redirection occurs. Any insights on how to achieve this would be appreciated!