Using Selenium/Java/JMeter/chromedriver - Am trying to access elements in a shadowDOM page with roots nested on several levels using return arguments[0].shadowRoot
. However am getting the error below:
Error in method invocation: Method executeScript( java.lang.String, org.openqa.selenium.remote.RemoteWebElement ) not found in class'org.openqa.selenium.chrome.ChromeDriver
What am I missing? Thank you!
import org.openqa.selenium.*;
import org.openqa.selenium.support.ui.*;
import org.openqa.selenium.remote.RemoteWebElement;
WebDriverWait wait = new WebDriverWait(WDS.browser, 10);
WDS.browser.get("contentPage");
//checks/waits, switchtoFrame
WebElement root1 = WDS.browser.findElement(By.cssSelector("launcher"));
//confirming find successful
WDS.log.info("Found: " + root1.getAttribute("href"));
JavascriptExecutor jse = (JavascriptExecutor) WDS.browser;
jse.executeScript("return arguments[0].shadowRoot", root1);