- From: <bugzilla@jessica.w3.org>
- Date: Wed, 12 Feb 2014 21:45:46 +0000
- To: public-browser-tools-testing@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=24635
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
https://dvcs.w3.org/hg/webdriver/raw-file/default/webdriver-spec.html#switching-frames
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
name:
webElement = findElement(Locator("name", "X"))
switchToFrame(webElement)
Likewise, to switch to a frame by ID:
webElement = findElement(Locator("id", "X"))
switchToFrame(webElement)
--
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Wednesday, 12 February 2014 21:45:49 UTC