I am trying to automate some tests on my node webkit app using Java Selenium. The way it works is that the chromedriver attaches to the main window, but any site that I access is in the DOM as a webview like so:
Picture with the DOM:
How would I approach this? After expanding the shadow root element in java and trying to switch the context to the iframe below it, I just get random errors (in my opinion) that do not pertain to the function I'm calling. For example:
WebElement shadowRoot = expandShadowElement(root);
WebElement iframe = shadowRoot.findElement(By.cssSelector("iframe"));
Driver.getWebDriver().switchTo().frame(iframe);
WebElement city = Driver.getWebDriver().findElement(By.className("input-btn-group"));
The second line gives me a "Argument to isShown must be of type Element", but that does not make sense as I am not calling the isShown function.