Is it possible to use Cypress to find and delete an element from the HTML? And how to do it?
Edit: This works:
cy.get(selector).then((elem) => {
const elemHtml = elem.get(0)
elemHtml.remove()
})
Variation on @krema's answer:
cy.get(selector).invoke('remove');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With