Closed Bug 1806904 Opened 2 years ago Closed 1 month ago

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

Categories

(Remote Protocol :: Marionette, enhancement, P3)

Default
enhancement

Tracking

(firefox146 fixed)

RESOLVED FIXED
146 Branch
Tracking Status
firefox146 --- fixed

People

(Reporter: whimboo, Assigned: khalid.alhaddad98, Mentored)

References

Details

(Whiteboard: [webdriver:m18][webdriver:external][lang=py][wptsync upstream])

User Story

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

Attachments

(1 file, 1 obsolete file)

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
Assignee: nobody → khalid.alhaddad98
Status: NEW → ASSIGNED
Attachment #9520040 - Attachment description: Bug 1806904 - Add dedicated "switch_parent_frame" method to WebDriver Python client, r?#webdriver-reviewers → Bug 1806904 - Add dedicated "switch_to_parent_frame" method to WebDriver Python client. Rename method to "switch_to_frame", r?#webdriver-reviewers
Attachment #9520040 - Attachment description: Bug 1806904 - Add dedicated "switch_to_parent_frame" method to WebDriver Python client. Rename method to "switch_to_frame", r?#webdriver-reviewers → Bug 1806904 - Add dedicated "switch_parent_frame" method to the WebDriver Python client, r?#webdriver-reviewers
Attachment #9520040 - Attachment description: Bug 1806904 - Add dedicated "switch_parent_frame" method to the WebDriver Python client, r?#webdriver-reviewers → Bug 1806904 - Add dedicated "switch_to_parent_frame" method to the WebDriver Python client. Rename method to "switch_to_frame", r?#webdriver-reviewers
Attachment #9520040 - Attachment description: Bug 1806904 - Add dedicated "switch_to_parent_frame" method to the WebDriver Python client. Rename method to "switch_to_frame", r?#webdriver-reviewers → Bug 1806904 - Add dedicated "switch_to_parent_frame" method to the WebDriver Python client, r?#webdriver-reviewers
Attachment #9521546 - Attachment is obsolete: true
Blocks: 1995702
Pushed by hskupin@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/3a5c9591a5d4 https://hg.mozilla.org/integration/autoland/rev/2ddededa11e6 Add dedicated "switch_to_parent_frame" method to the WebDriver Python client, r=webdriver-reviewers,whimboo
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/55594 for changes under testing/web-platform/tests
Whiteboard: [lang=py] → [lang=py], [wptsync upstream]
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 146 Branch

(In reply to Web Platform Test Sync Bot [:wpt-sync] (Matrix: #interop:mozilla.org) from comment #4)

Created web-platform-tests PR
https://github.com/web-platform-tests/wpt/pull/55594 for changes under
testing/web-platform/tests

The upstream PR was manually merged.

Whiteboard: [lang=py], [wptsync upstream] → [webdriver:m18][webdriver:external][lang=py][wptsync upstream]
Summary: [wdspec] Add dedicated "switch_parent_frame" method to WebDriver Python client → [wdspec] Add dedicated "switch_to_parent_frame" method to WebDriver Python client
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: