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.
SubscribeRelated
Locatorpage.mouse.clickElement.getBoundingClientRectbrowserContext.setDefaultTimeoutpage.setDefaultTimeout