diff -r 047595668bbc 02_commands.html --- a/02_commands.html Fri Nov 22 23:18:48 2013 +0000 +++ b/02_commands.html Sat Dec 14 13:25:52 2013 -0800 @@ -102,10 +102,6 @@ An attempt was made to operate on a modal dialog when one was not open. - no such dom - An attempt was made to switch to a hosted Shadow DOM that does not exist. - - no such element An element could not be located on the page using the given search parameters. @@ -130,6 +126,10 @@ An element command failed because the referenced element is no longer attached to the DOM. + stale shadow root reference + An command failed because the referenced shadow root is no longer attached to the DOM. + + success The command executed successfully. diff -r 047595668bbc 09_elements.html --- a/09_elements.html Fri Nov 22 23:18:48 2013 +0000 +++ b/09_elements.html Sat Dec 14 13:25:52 2013 -0800 @@ -42,7 +42,7 @@
-
+
WebElement[] findElements(in Locator locator)
WebElement findElement(in Locator locator)
@@ -132,4 +132,44 @@

All WebDriver implementations MUST support finding elements by XPath 1.0 [[!XPATH]] with the edits from section 3.3 of the [[!HTML5]] specification made. If no native support is present in the browser, a pure JS implementation MAY be used. When called, the returned values MUST be equivalent of calling "evaluate" function from the DOM Level 3 XPath spec [[DOM-LEVEL-3-XPATH]] with the result type set to "ORDERED_NODE_SNAPSHOT_TYPE (7).

+ +
+

List of Hosted Shadow Roots

+ + + + + + + +
Capability NameType
shadowDomboolean
+ +

If a browser implements the Shadow DOM specification, it MUST support the + ability to access shadow subtrees. The root of a shadow subtree is returned + as a ShadowRoot.

+ +
+
readonly attribute DOMString id
+
The WebDriver ID of this particular shadow root. This SHOULD be a UUID.
+
WebElement getActiveElement()
+
+
+ +
+
ShadowRoot[] getShadowRoots()
+
Return a list of ShadowRoot instances in the reverse order that they were added to the host. The "youngest" is at the beginning of the list, and the "oldest" one at the end of the list. The returned list could be empty if the WebElement is not a shadow host.
+
+
+ +
+

Lifetime of a WebElement or ShadowRoot

+

A DOM node, whether it is in the top-level DOM or a Shadow DOM, will be accessible as long as both of the following are true: +

+

+

The lifetime of a returned WebElement reference is confined to the accessibility of its corresponding DOM node. If a WebElement that corresponds to an inaccessible DOM node is accessed in any WebDriver command, then a stale element reference error will be returned for that command.

+

Similarly, the same rule applies to a returned ShadowRoot reference for a hosted shadow root, although the returned error is a stale shadow root reference.

+