w3c / webdriver

Remote control interface that enables introspection and control of user agents.
https://w3c.github.io/webdriver/
Other
679 stars 194 forks source link

Consider changing algorithm of tag name locator strategy #1724

Closed lutien closed 1 year ago

lutien commented 1 year ago

At the moment, algorithm of tag name locator strategy is very strict with requiring to use getElementsByTagName method. That works fine with regular html elements, but doesn't work for shadow roots right now across the browsers (https://wpt.fyi/results/webdriver/tests/find_element_from_shadow_root/find.py?label=experimental&label=master&aligned). Implementation wise, we could use for shadow root (or for all kind of elements) querySelectorAll and filter out non tag name selectors.

whimboo commented 1 year ago

Actually a duplicated of https://github.com/w3c/webdriver/issues/1610.