Skip to content
masterclass Buddy

React Testing Library · Method

userEvent.click

userEvent.click simulates a real browser-style click. It performs related interaction steps and checks, rather than dispatching only one DOM event.

Last updated

Syntax

click(element: Element, eventInit?: object, options?: object): Promise<void>

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • fireEvent
  • userEvent.setup()
  • dblClick()
  • tripleClick()
  • hover()
  • pointer()

Source: Introduction | Testing Library. Checked 2026-11-03.