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

Method size

py/selenium/webdriver/remote/webelement.py:334–345  ·  view source on GitHub ↗

Get the size of the element. Returns: The width and height of the element. Example: size = element.size

(self)

Source from the content-addressed store, hash-verified

332
333 @property
334 def size(self) -> dict:
335 """Get the size of the element.
336
337 Returns:
338 The width and height of the element.
339
340 Example:
341 size = element.size
342 """
343 size = self._execute(Command.GET_ELEMENT_RECT)["value"]
344 new_size = {"height": size["height"], "width": size["width"]}
345 return new_size
346
347 def value_of_css_property(self, property_name) -> str:
348 """Get the value of a CSS property.

Callers 15

CopyDataMethod · 0.45
PushDataMethod · 0.45
PullDataMethod · 0.45
CopyWStringToBufferMethod · 0.45
CopyWStringFromBufferMethod · 0.45
SetProxySettingsMethod · 0.45
GetProxyAsJsonMethod · 0.45
RestoreProxySettingsMethod · 0.45

Calls 1

_executeMethod · 0.95

Tested by

no test coverage detected