I have the following html:
<button data-testid="likeButton">
<svg aria-hidden="true">
<use xlink:href="/logo"></use>
</svg>
<span>Like</span>
</button>
Now the <use xlink:href
could be either /logo
or /logo-filled
How can I write an xpath expression in Puppeteer to get these?
I have tried this:
//*[name()='use'][contains(@*='logo')]
But when I test it, i get the error:
Unable to perform XPath operation. The prefix "xlink" for attribute "xlink:href" associated with an element type "use" is not bound.