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

Method window

py/selenium/webdriver/remote/switch_to.py:113–122  ·  view source on GitHub ↗

Switches focus to the specified window. Args: window_name: The name or window handle of the window to switch to. Example: driver.switch_to.window("main")

(self, window_name: str)

Source from the content-addressed store, hash-verified

111 self._driver.execute(Command.SWITCH_TO_PARENT_FRAME)
112
113 def window(self, window_name: str) -> None:
114 """Switches focus to the specified window.
115
116 Args:
117 window_name: The name or window handle of the window to switch to.
118
119 Example:
120 driver.switch_to.window("main")
121 """
122 self._w3c_window(window_name)
123
124 def _w3c_window(self, window_name: str) -> None:
125 def send_handle(h):

Callers

nothing calls this directly

Calls 1

_w3c_windowMethod · 0.95

Tested by

no test coverage detected