What is the procedure for saving a hyperlink value i.e url into a varibale from the first <a href>
in selenium that has a nested partial link text. For instance, on the screenshot a href with additional tags nested after it we have <a href>
with the link (randomlink,mp4), some additional class followed by <svg>
tag that has link text of " Download .MP4, 720p" after it.
In informal terms, randomlink.mp4 changes occasionally and I need to save it into a variable
The way the documentation is written, I have two choices:
Locating hyperlinks by text: either full link text that did not work since the link text is nested in SVG tag and selenium doesn't read it as part of the original element or partial link text which had the same issue.