How to read text that is under #shadow-root (user-agent)
问题 I am using Selenium (Python) for automating a web page. I am trying to get text from an input field that is under #shadow-root (user-agent). Xpath I used: driver.find_element_by_xpath("**//*/p-calendar/span/input**").text is not returning anything. Attached the screenshot of my DOM element. Requirement: To get text from the shadow root : 01:01 回答1: As per @hayatoito 's (creator of Shadow DOM) comment: The original motivation of introducing a closed shadow tree is "Never allow an access to a