Skip to content
masterclass Buddy

Playwright · Method

locator.boundingBox

Returns the matching element's bounding rectangle, or null when the element is not visible. Coordinates are relative to the main frame viewport.

Last updated

Since
v1.14

Syntax

locator.boundingBox(options?)

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

Subscribe
  • Locator
  • page.mouse.click
  • Element.getBoundingClientRect
  • browserContext.setDefaultTimeout
  • page.setDefaultTimeout

Source: Locator | Playwright. Checked 2026-11-03.