Every line of 'maximize window in selenium' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.
81 def maximize_window(self): 82 """Maximize the current window.""" 83 return self._window_command('POST', '/maximize', 'maximize')
439 def maximize(self): 440 if not self.is_maximized: 441 return self._toggle_maximize() 442 return True # already maximized.
116 @keyword 117 def maximize_window(self, locator=None): 118 """Maximizes a window. 119 120 ``locator`` is the locator of the window or a window object (optional). 121 122 If no ``locator`` value is given, the currently attached window is maximized. 123 See `Attach Window` for details about attaching a window and window locator syntax. 124 """ 125 if locator is not None: 126 window = self._get_window(locator) 127 else: 128 window = self.state.window 129 window.DisplayState = DisplayState.Maximized
115 def toggle_maximize(self): 116 if self.widget.is_maximized(): 117 self.widget.unmaximize() 118 self._controller.trigger_js_event('window-unmaximized') 119 else: 120 self.widget.maximize() 121 self._controller.trigger_js_event('window-maximized')
516 def close_window(self, window_name=None, title=None, url=None): 517 """ 518 WebDriver implements only closing current window. If you want to close 519 some window without having to switch to it, use this method. 520 """ 521 main_window_handle = self.current_window_handle 522 self.switch_to_window(window_name, title, url) 523 self.close() 524 self.switch_to_window(main_window_handle)