Right now the `switch_frame` method has to be called with the `frame` argument set to `parent`. This is confusing if a page contains an element with the id `parent`.
```
def switch_frame(self, frame):
if frame == "parent":
url = "frame/parent"
body = None
else:
url = "frame"
body = {"id": frame}
return self.send_session_command("POST", url, body)
```
As such it would be good to have a dedicated `switch_parent_frame` method available.
Bug 1806904 Comment 0 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Right now the [`switch_frame`](https://searchfox.org/mozilla-central/rev/f24503d2f5d8b7e4341be8bc20d94a04a6b223d6/testing/web-platform/tests/tools/webdriver/webdriver/client.py#716-724) method of the WebDriver Python client has to be called with the `frame` argument set to `parent`. This is confusing if a page contains an element with the id `parent`. ``` def switch_frame(self, frame): if frame == "parent": url = "frame/parent" body = None else: url = "frame" body = {"id": frame} return self.send_session_command("POST", url, body) ``` As such it would be good to have a dedicated `switch_parent_frame` method available. The addition would require checks for all the tests under the following folders to make use that they make use of the new API: https://searchfox.org/mozilla-central/source/testing/web-platform/mozilla/tests/webdriver/ https://searchfox.org/mozilla-central/source/testing/web-platform/tests/webdriver/tests/