diff --git a/index.bs b/index.bs index c0d5dd3c..d924adf6 100644 --- a/index.bs +++ b/index.bs @@ -2967,6 +2967,7 @@ To await a navigation given |navigable|, |request|, |wait condition|, browsingContext.Locator = ( browsingContext.AccessibilityLocator / browsingContext.CssLocator / + browsingContext.ContextLocator / browsingContext.InnerTextLocator / browsingContext.XPathLocator ) @@ -2984,6 +2985,13 @@ browsingContext.CssLocator = { value: text } +browsingContext.ContextLocator = { + type: "context", + value: { + context: browsingContext.BrowsingContext, + } +} + browsingContext.InnerTextLocator = { type: "innerText", value: text, @@ -3783,6 +3791,18 @@ To locate nodes using CSS with given |navigable|, |context nodes|, +
+To locate the container element given |navigable|: + +1. Let |returned nodes| be an empty [=/list=]. + +1. If |navigable|'s [=navigable/container=] is not null, + append |navigable|'s [=navigable/container=] to |returned nodes|. + +1. Return |returned nodes|. + +
+
To locate nodes using XPath with given |navigable|, |context nodes|, @@ -4050,6 +4070,25 @@ The [=remote end steps=] with |session| and |command parameters| are: 1. Let |result nodes| be [=locate nodes using accessibility attributes=] given |context nodes|, |selector|, and |maximum returned node count|. +
|type| is the string "context" +
+ + 1. If |start nodes parameter| is not null, + return [=error=] with [=error code=] "invalid argument". + + 1. Let |selector| be |locator|["value"]. + + 1. Let |context id| be |selector|["context"]. + + 1. Let |child navigable| be the result of [=trying=] to [=get a navigable=] with |context id|. + + 1. If |child navigable|'s [=navigable/parent=] is not |navigable|, + return [=error=] with [=error code=] "invalid argument". + + 1. Let |result nodes| be [=locate the container element=] given |child navigable|. + + 1. Assert: For each |node| in |result nodes|, |node|'s [=/node navigable=] is |navigable|. + 1. Assert: |maximum returned node count| is null or [=list/size=] of |result nodes| is less than or equal to |maximum returned node count|.