I'm testing my react app with react testing library and jest.
And I want to know how to fetch element with 'name' attribute in react-testing-library.
For example, in the following page, is it possible to fetch this element with "userName"?
<input type="text" name="userName" />
Or should I set data-testId into the element and use getByTestId method?
return (
<div>
<input type="text" name="userName" />
</div>
)