MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / rect

Method rect

py/selenium/webdriver/remote/webelement.py:377–386  ·  view source on GitHub ↗

Get the size and location of the element. Returns: A dictionary with size and location of the element. Example: rect = element.rect

(self)

Source from the content-addressed store, hash-verified

375
376 @property
377 def rect(self) -> dict:
378 """Get the size and location of the element.
379
380 Returns:
381 A dictionary with size and location of the element.
382
383 Example:
384 rect = element.rect
385 """
386 return self._execute(Command.GET_ELEMENT_RECT)["value"]
387
388 @property
389 def aria_role(self) -> str:

Callers

nothing calls this directly

Calls 1

_executeMethod · 0.95

Tested by

no test coverage detected