Open
Description
Description
- Switching parent window to child window, which is opening with a PDF in Chrome Browser, which is the third tab in browser.
Trying to capture the URL for PDF opening with new tab, getting a Chrome-extension URL.
2.Trying to launching the captured URL, getting 'Test Script is failed with java.net.MalformedURLException: unknown protocol: chrome-extension'. This scenario worked fine until version 4.29.0. - After switching to child window and doing refresh, Trying to capture the URL for PDF opening with new tab 'org.openqa.selenium.WebDriverException: Remote browser did not respond to getCurrentUrl' and 'org.openqa.selenium.NoSuchWindowException: no such window: target window already closed
from unknown error: web view not found'. - After switching to child window and doing refresh, Trying to capture the URL for PDF opening with new tab and Trying to launching the captured URL, getting 'org.openqa.selenium.WebDriverException: Remote browser did not respond to getCurrentUrl'.
Reproducible Code
String mainId = driver.getWindowHandle();
driver.switchTo().window(new ArrayList<String>(driver.getWindowHandles()).get(2));
Thread.sleep(2000);
driver.navigate().refresh();
Thread.sleep(3000);
String pdfUrl = driver.getCurrentUrl();
driver.close();
Debugging Logs
org.openqa.selenium.NoSuchWindowException: no such window: target window already closed
from unknown error: web view not found
(Session info: chrome=134.0.6998.166)
Build info: version: '4.31.0', revision: '1ef9f18787*'
System info: os.name: 'Windows Server 2019', os.arch: 'amd64', os.version: '10.0', java.version: '17.0.10'
Driver info: org.openqa.selenium.chrome.ChromeDriver
org.openqa.selenium.WebDriverException: Remote browser did not respond to getCurrentUrl
Build info: version: '4.31.0', revision: '1ef9f18787*'
System info: os.name: 'Windows Server 2019', os.arch: 'amd64', os.version: '10.0', java.version: '17.0.10'
Driver info: driver.version: RemoteWebDriver
ℹ️ Last known working version: 4.21.0 to 4.29.0