Open Bug 1806904 Opened 1 year ago Updated 9 months ago

[wdspec] Add dedicated "switch_parent_frame" method to WebDriver Python client

Categories

(Remote Protocol :: Marionette, enhancement, P3)

Default
enhancement

Tracking

(Not tracked)

People

(Reporter: whimboo, Unassigned, Mentored)

Details

(Whiteboard: [lang=py])

User Story

To get started see: https://firefox-source-docs.mozilla.org/testing/geckodriver/index.html

Right now the switch_frame 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/

Mentor: hskupin
User Story: (updated)
Priority: -- → P3
Whiteboard: [lang=py]
Component: geckodriver → Marionette
Product: Testing → Remote Protocol
Summary: Add dedicated "switch_parent_frame" method to WebDriver Python client → [wdspec] Add dedicated "switch_parent_frame" method to WebDriver Python client
You need to log in before you can comment on or make changes to this bug.