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

Method parent_frame

py/selenium/webdriver/remote/switch_to.py:103–111  ·  view source on GitHub ↗

Switch focus to the parent browsing context. If the current context is already the top level browsing context, it remains unchanged. Example: driver.switch_to.parent_frame()

(self)

Source from the content-addressed store, hash-verified

101 self._w3c_window(value["handle"])
102
103 def parent_frame(self) -> None:
104 """Switch focus to the parent browsing context.
105
106 If the current context is already the top level browsing context, it remains unchanged.
107
108 Example:
109 driver.switch_to.parent_frame()
110 """
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.

Calls 1

executeMethod · 0.65