Skip to content

Commit

Permalink
Add a way to find navigable's container
Browse files Browse the repository at this point in the history
  • Loading branch information
OrKoN committed Nov 11, 2024
1 parent ee07a90 commit 0a2b364
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2960,6 +2960,7 @@ To <dfn>await a navigation</dfn> given |navigable|, |request|, |wait condition|,
browsingContext.Locator = (
browsingContext.AccessibilityLocator /
browsingContext.CssLocator /
browsingContext.ContainerLocator /
browsingContext.InnerTextLocator /
browsingContext.XPathLocator
)
Expand All @@ -2977,6 +2978,10 @@ browsingContext.CssLocator = {
value: text
}

browsingContext.ContainerLocator = {
type: "container",
}

browsingContext.InnerTextLocator = {
type: "innerText",
value: text,
Expand Down Expand Up @@ -3776,6 +3781,18 @@ To <dfn>locate nodes using CSS</dfn> with given |navigable|, |context nodes|,

</div>

<div algorithm="locate the container element">
To <dfn>locate the container element</dfn> with 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|.

</div>

<div algorithm="locate nodes using XPath">

To <dfn>locate nodes using XPath</dfn> with given |navigable|, |context nodes|,
Expand Down Expand Up @@ -4043,6 +4060,13 @@ 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|.

<dt>|type| is the string "<code>container</code>"
<dd>

1. Issue: throw errors if extra unused optional params are set?

1. Let |result nodes| be [=locate the container element=] given |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|.

Expand Down

0 comments on commit 0a2b364

Please sign in to comment.