I am trying to grab and click on a button with New Relic's synthetic scripted browser test utility but the element I'm trying to find is under a #shadow-root
in the DOM. Node script looks like:
$browser.get('https://www.null.com').then(() => {
return $browser.waitForAndFindElement($driver.By.className('btn'), 10000).click();
}):
But it errors out with:
Check failed with task timed out. Error: task timed-out waiting for element to be located using:By(css selector, .btn)
I'm asking to see if there is a work around for grabbing elements in the shadow DOM to be able to use with the selenium webdriver.