<div class="kowKTj bDEoGl">
<div class="Wrappers__Flex-bnXnJe gNIMqf">
<input placeholder="" type="text" class="kGGXDu kNnwpQ emailtextBox form-control" value="">
</div>
</div>
In the above markup, some of the class names are dynamically added by styled components.
Help us how can we select the input property using emailtextBox
class?
Or suggest any alternatives to find the inputbox.
NOTE: we’re not using input label concepts using only divs.
2
Answers
Add a Data-testid Attribute to the element and use that
Or you could use the Label Text too.
Use ByRole queries.
<input/>
element hastextbox
role, see ARIA: textbox roledata-testid