I have been using the the suggested solution from : https://mcmap.net/q/1586369/-how-can-i-tell-selenium-to-press-cancel-on-a-print-popup
And it worked perfectly since Chrome 71.
executor.executeScript("document.querySelector(\"print-preview-app\").shadowRoot.querySelector(\"print-preview-header\").shadowRoot.querySelector(\"paper-button.cancel-button\").click();");
But it no longer works.
Has anyone figured out a way to click, "Cancel" in the print preview for Chrome 75?
I caught the exception and it simply says:
e:org.openqa.selenium.WebDriverException: unknown error: Cannot read property 'shadowRoot' of null
chromedriver
to match chrome v75? – Dissertation