Open
Description
Desired behavior:
Add a .text()
method similar to jQuery's text method to access textContent and/or innerText.
I guess for convenience, by default cy.text()
should just return whatever $(...).text()
returns.
It may also be good to provide a way to get the innerText of an HTMLElement as it returns a rendered text representation (removing sub-tags and whitespace that may be part of the node, but not visible once rendered). Perhaps a flag in the .text()
method or via .its('innerText')
or something.