Skip to content

[🐛 Bug]: Unable to capture current url and unable to close the child window with a PDF URL from version 4.31.0 #15595

Open
@rojanayak

Description

@rojanayak

Description

  1. 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.
  2. 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
    '.
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-needs-triagingA Selenium member will evaluate this soon!C-javaJava BindingsD-chromeI-defectSomething is not working as intendedI-regressionSomething was working but we "fixed" itOS-windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions