w3c / webdriver-bidi

Bidirectional WebDriver protocol for browser automation
https://w3c.github.io/webdriver-bidi/
378 stars 42 forks source link

Extend locateNodes with a locator to get navigable's container element #811

Open OrKoN opened 1 week ago

OrKoN commented 1 week ago

This change adds a new locator called container: when called for a parent navigable, given a child navigable as a locator, it locates the container element for the child navigable that is located within the parent navigable. While providing the parent navigable is redundant and it can be computed based on the child navigable, the interface matches existing locators which all select a node within the parent navigable that matches the locator criteria. In this case, the criterion is the child navigable identifier.

Providing start nodes to this locator would currently trigger an invalid argument error but eventually it could be supported if there is a use case.

Closes #794


Preview | Diff