https://cypress.io logo
Your <a> tag will include a class (or even better ...
# e2e-testing
s
Your tag will include a class (or even better to contain a unique id) so you can use that in your selector, example
Copy code
cy.get('[class="uol-c-page-share__list-link"]').contains('Facebook').parents('a').should('have.attr', 'href').and('include', 'www.facebook.com');
This is just example code obviously as you have not shared your html, so you may need to tweak it for your scenario.