React Testing Library · Module
queryByPlaceholderText
queryByPlaceholderText looks for an element whose placeholder attribute matches the given text. It returns null when no element matches and throws when more than one matches.
Last updated
Syntax
queryByPlaceholderText(container: HTMLElement, text: TextMatch, options?: { exact?: boolean; normalizer?: NormalizerFn }): HTMLElement | nullIn-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
queryByPlaceholderTextgetAllByPlaceholderTextqueryAllByPlaceholderTextfindByPlaceholderTextfindAllByPlaceholderTextgetByLabelText