I am facing an issue with an overlay displaying terms on top of the main window. The scrollbars are not behaving as expected:
https://i.sstatic.net/nzaUa.png
The new window does not register as a separate 'window' or tab, so traditional methods like driver.switchTo().frame(iframe); do not work. Here are the approaches I have attempted:
1) Clicking on the element (referring to the overlay fragment holding the content). No effect.
2) Trying to change focus using the following script:
jse.executeScript("var ov = document.getElementsByClassName('overlay__content'); window.setTimeout(function () { ov[0].focus(); }, 0); ");
3) Attempting to click and then switch to the active element:
_driver.getWebDriver().switchTo().activeElement();
None of these methods have been successful. My aim is to switch to the new window and take a full-screen screenshot using ashot. While this process works flawlessly with iframes, I am unsure how to proceed in this scenario. Any use of scrollBy(0,10) only causes scrolling in the main window.