There is a part of html code:
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td style="text-align:center;padding-bottom:42px;padding-top:12px" colspan="3"><a href="https://test.com/3e06cc40-f893-48c1-bf14-77668d1d8663"
style="color:#fff;text-align:center;border-radius:32px;background-color:#007ce2;padding:14px 55px;line-height:30px;text-decoration:none;border:none;display:inline-block;font-size:16px">Accept
invitation</a></td>
</tr>
</table>
I need to extract only href value: https://test.com/3e06cc40-f893-48c1-bf14-77668d1d8663
But, I canât write correct path to this element.
I tried like this:
var jsonData = pm.response.json();
var aa = jsonData.payload.parts[0].body.data
const $ = cheerio.load(atob(aa));
console.log($(âa[name=âAccept invitationâ]â).attr(âhrefâ));
Of course, my example doesnât work.
How it is possible?