See https://w3c.github.io/webdriver/#shadow-root, https://w3c.github.io/webdriver/#find-element-from-shadow-root, https://w3c.github.io/webdriver/#find-elements-from-shadow-root and https://w3c.github.io/webdriver/#get-element-shadow-root imported/w3c/webdriver/tests/find_element_from_shadow_root/ imported/w3c/webdriver/tests/find_elements_from_shadow_root/ imported/w3c/webdriver/tests/get_element_shadow_root/
<rdar://problem/83667535>
Created attachment 450514 [details] Patch
Comment on attachment 450514 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=450514&action=review > Source/WebDriver/Session.cpp:1139 > + if (isShadowRoot == ElementIsShadowRoot::Yes && result.errorString() == "stale element reference") { Wouldn't it be more robust to compare the error code instead of comparing strings? As in: result.errorCode == CommandResult::ErrorCode::StaleElementReference > Source/WebDriver/WebDriverService.cpp:1461 > } These two functions are so similar... the only variation AFAICS is using FindElementsMode::{Multiple,Single} in the last line; maybe most of the function body could be factored out?
Committed r289202 (?): <https://commits.webkit.org/r289202>