How to access and interact with Shadow DOM using Watir?
问题 I need to access this page chrome://downloads/ and check that a file has been downloaded but it's Shadow DOM. I've found this article how to access DOM Elements With Selenium Webdriver. http://jeremysklarsky.github.io/blog/2015/06/13/accessing-shadow-dom-elements-with-selenium-webdriver/ But this is written in JS driver.executeScript("return $('body /deep/ <#yourSelector>')") driver.executeScript("return $('body /deep/ ._mm_column')[0].textContent").then(function(title){ title.should.contain