On this example, I'm trying to select the second input, change the value to some text and then fire the enter event. My main issue here is selecting the input since it doesn't have a label nor id
<ul>
<form>
<input value="" />
</form>
<form>
<input value="" />
</form>
</ul>
If anyone can help with I'd appreciate it.

userEvent.type(screen.getAllByRole('textbox')[0], 'some random comment')and then selecting the input again and firing the submit eventfireEvent.submit(screen.getAllByRole('textbox')[0])Please keep in mind that I'm not well versed into how to use the RTL, so I'm sure there might be a better way to achieve this.nameattribute.nameoridwhile adding the Todo. Then use getByRole or getByTestId. I've added an answer for thenameapproach as I think it's better than id.