(self, x, y, width, height, uc_lock=False)
| 1260 | return self.loop.run_until_complete(self.page.medimize()) |
| 1261 | |
| 1262 | def __set_window_rect(self, x, y, width, height, uc_lock=False): |
| 1263 | if uc_lock: |
| 1264 | gui_lock = FileLock(constants.MultiBrowser.PYAUTOGUILOCK) |
| 1265 | with gui_lock: |
| 1266 | self.__make_sure_pyautogui_lock_is_writable() |
| 1267 | if self.get_window()[1].window_state.value == "minimized": |
| 1268 | self.loop.run_until_complete( |
| 1269 | self.page.set_window_size( |
| 1270 | left=x, top=y, width=width, height=height) |
| 1271 | ) |
| 1272 | time.sleep(0.044) |
| 1273 | return self.loop.run_until_complete( |
| 1274 | self.page.set_window_size( |
| 1275 | left=x, top=y, width=width, height=height) |
| 1276 | ) |
| 1277 | else: |
| 1278 | if self.get_window()[1].window_state.value == "minimized": |
| 1279 | self.loop.run_until_complete( |
| 1280 | self.page.set_window_size( |
| 1281 | left=x, top=y, width=width, height=height) |
| 1282 | ) |
| 1283 | time.sleep(0.044) |
| 1284 | return self.loop.run_until_complete( |
| 1285 | self.page.set_window_size( |
| 1286 | left=x, top=y, width=width, height=height) |
| 1287 | ) |
| 1288 | |
| 1289 | def set_window_rect(self, x, y, width, height): |
| 1290 | return self.__set_window_rect(x, y, width, height, uc_lock=True) |
no test coverage detected