Sets the width and height of the current window. Args: width: The width in pixels to set the window to. height: The height in pixels to set the window to. windowHandle: The handle of the window to resize. Default is "current". Example:
(self, width, height, windowHandle: str = "current")
| 1115 | return self.execute(Command.SCREENSHOT)["value"] |
| 1116 | |
| 1117 | def set_window_size(self, width, height, windowHandle: str = "current") -> None: |
| 1118 | """Sets the width and height of the current window. |
| 1119 | |
| 1120 | Args: |
| 1121 | width: The width in pixels to set the window to. |
| 1122 | height: The height in pixels to set the window to. |
| 1123 | windowHandle: The handle of the window to resize. Default is "current". |
| 1124 | |
| 1125 | Example: |
| 1126 | `driver.set_window_size(800, 600)` |
| 1127 | """ |
| 1128 | self._check_if_window_handle_is_current(windowHandle) |
| 1129 | self.set_window_rect(width=int(width), height=int(height)) |
| 1130 | |
| 1131 | def get_window_size(self, windowHandle: str = "current") -> dict: |
| 1132 | """Gets the width and height of the current window. |