https://cypress.io logo
Print available aria roles?
# i-need-help
g
Hey folks - in react testing library you can print the available aria roles by using getByRole() with some non-existent role. This has the side effect of showing you whats available in the DOM. Does something like this exist in cypress? I'm using findByRole from cypress testing library, but that doesn't have the same effect. Thanks
w
I might be remembering wrong, I thought that findByRole produces that error in the Cy command log if it can’t find the role. Can you share the code where it doesn’t do this? What error do you get instead?