diff -r 0486db563080 07_switching.html --- a/07_switching.html Tue Sep 17 15:47:14 2013 +0100 +++ b/07_switching.html Mon Sep 23 13:47:09 2013 -0700 @@ -93,43 +93,4 @@ -
-

Switching to Hosted Shadow DOMs

- - - - - - - - -
Capability NameType
shadowDomboolean
- -

If a browser implements the Shadow DOM specification, it MUST support the ability to access shadow subtrees. This is done using the switchToSubTree command:

- - - - - - - - - - - - - - - - - - -
Command NameswitchToSubTree
Parameters"element" {!WebElement=} The shadow host.
- "index" {int} The index of the shadow subtree. Defaults to 0.
Return ValueNone
Errorsno such dom if the element is not a shadow host, or if the indexed shadow subtree does not exist.
- -

When executing this command, Shadow DOM subtrees are indexed in the order that they were added to the host. That is, the "oldest" subtree is at index 0, and the "youngest" subtree at the highest sequentially numbered index.

- -

Where the Shadow DOM is supported, all commands in WebDriver MUST operate on the currently selected Shadow DOM subtree unless the command itself declares otherwise.

- - diff -r 0486db563080 09_elements.html --- a/09_elements.html Tue Sep 17 15:47:14 2013 +0100 +++ b/09_elements.html Mon Sep 23 13:47:09 2013 -0700 @@ -26,6 +26,17 @@ these located elements. The primary interface used by the WebDriver API for locating elements is the SearchContext.

+

Lifetime of a WebElement

+

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.

+ +
+

Lists of WebElements

The primary grouping of WebElement instances is an array of WebElement instances

@@ -51,6 +62,41 @@
+

List of Hosted Shadow DOM 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 WebElement. This is done using the getShadowRoots command:

+ + + + + + + + + + + + + + + + + + +
Command NamegetShadowRoots
Parameters"element" {!WebElement=} The shadow host.
Return ValueA list of {WebElement}, each of which represents the root of a Shadow DOM subtree. The list contains at least one element.
Errorsno such dom if the element is not a shadow host.
+ +

The Shadow roots in the returned list are in 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.

+
+

Element Location Strategies

All element location strategies MUST return elements in the order in which they appear in the current document.