Given getByRole selector that match multiple elements. What would it returns that?
https://testing-library.com/docs/queries/byrole/
getByRole('button')
<body>
<main>
<button>Open dialog</button>
</main>
<div role="dialog">
<button>Close dialog</button>
</div>
</body>
What would return?
Few elements, any matching element or throws error?
https://testing-library.com/docs/queries/byrole/
New contributor
Alex Anonym is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.