Need help to click on the element under the shadow Root (closed) type
问题 Null Pointer Exception on click at the element located inside of the shadow Root (closed) Tried to handle it with Java Script: public WebElement getShadowRootElement(WebElement element) { return (WebElement) ((JavascriptExecutor) driver).executeScript("return arguments[0].shadowRoot", element); } Result: Cannot read property 'shadowRoot' of null Added screenshots: 1. 回答1: If your usecase is to interact with the <path> element which is within the <svg> tag, is indeed within a #shadow-root