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

Method get_window_rect

py/selenium/webdriver/remote/webdriver.py:1178–1187  ·  view source on GitHub ↗

Get the window's position and size. Returns: x, y coordinates and height and width of the current window. Example: `driver.get_window_rect()`

(self)

Source from the content-addressed store, hash-verified

1176 )
1177
1178 def get_window_rect(self) -> dict:
1179 """Get the window's position and size.
1180
1181 Returns:
1182 x, y coordinates and height and width of the current window.
1183
1184 Example:
1185 `driver.get_window_rect()`
1186 """
1187 return self.execute(Command.GET_WINDOW_RECT)["value"]
1188
1189 def set_window_rect(self, x=None, y=None, width=None, height=None) -> dict:
1190 """Set the window's position and size.

Calls 1

executeMethod · 0.95