in modules/util.py [0:0]
def shadow_from_script():
shadow_children = self.driver.execute_script(
"return arguments[0].shadowRoot.children", element
)
if len(shadow_children) and any(shadow_children):
logging.info("Returning script-returned shadow elements")
shadow_elements = [s for s in shadow_children if s is not None]
return shadow_elements