React Testing Library · Module
findByPlaceholderText
Use getByPlaceholderText to find an input by its placeholder value. Prefer a label query when the control has a label.
Last updated
Syntax
getByPlaceholderText(container: HTMLElement, text: TextMatch, options?: { exact?: boolean; normalizer?: NormalizerFn }): HTMLElementIn-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
queryByPlaceholderTextgetAllByPlaceholderTextqueryAllByPlaceholderTextfindByPlaceholderTextfindAllByPlaceholderTextgetByLabelTextscreen