[Bug 24635] New: switchToFrame should only accept a WebElement or number argument.


            Bug ID: 24635
           Summary: switchToFrame should only accept a WebElement or
                    number argument.
           Product: Browser Test/Tools WG
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: WebDriver
          Assignee: public-browser-tools-testing@w3.org
          Reporter: jleyba@google.com
        QA Contact: public-browser-tools-testing@w3.org
                CC: mike@w3.org


switchToFrame currently accepts a WebElement (as a reference to an iframe/frame
element), DOMString (as the frame name or id), or number (the frame index) as
an argument.

The spec should be updated to drop support for DOMString, as these selection
methods are redundant with WebElement. Furthermore, even though the spec
outlines how DOMString should be handled, it is ambiguous from an API
perspective.  Given a DOMString argument, should WebDriver select the frame
with that name, or the frame with that ID?

By supporting only an index number or WebElement reference, switchToFrame would
present an unambiguous API with clearly defined behavior.  To select a frame by

webElement = findElement(Locator("name", "X"))

Likewise, to switch to a frame by ID:

webElement = findElement(Locator("id", "X"))

You are receiving this mail because:
You are the QA Contact for the bug.

Received on Wednesday, 12 February 2014 21:45:49 UTC