In one of my test cases, I'm able to get the entire HTML e-mail message sent to a user. The message contains text, button, a link, etc.
My Issue is that I need to extract the href link in order to use it for the next function. I have been checking the protractor API, unfortunately I was not successful in finding the correct method which can be used in this case.
E.g. of HTML message:
<table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <td align="center"> <table border="0" cellspacing="0" cellpadding="0" width="600"> <tr> <td> <a href="http://domain.io/ui/confirm?d=true&token=eyJ0eXAiOiJKV1QiLCJjdHkiOiJKV1QiLCJhbGciOiJIUz.... </td> </tr> </table> </td> </tr> </table>
How can I extract the
<a href.. value? I mean how can I get the link?