We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Launch the application and log in.
Navigate to a specific screen that opens in a new window, where multiple file download links are available.
Before clicking the download button, driver.getWindowHandles() correctly returns a total of 2 windows.
Set s = driver.getWindowHandles(); System.out.println(s.size()); // Returns 2 This works as expected before initiating the file download.
Upon clicking the first download link, a new download window opens, and the file starts downloading.
However, when attempting to retrieve all window handles again using driver.getWindowHandles(), an error occurs. Log: org.openqa.selenium.TimeoutException: java.util.concurrent.TimeoutException Build info: version: '4.29.0', revision: '5fc1ec94cb' System info: os.name: 'Windows 11', os.arch: 'amd64', os.version: '10.0', java.version: '17.0.6' Driver info: org.openqa.selenium.edge.EdgeDriver Command: [5b5a3682c54d8cc33f465c4450dc9bac, getWindowHandles {}] Capabilities {acceptInsecureCerts: false, browserName: MicrosoftEdge, browserVersion: 134.0.3124.93, fedcm:accounts: true, ms:edgeOptions: {debuggerAddress: localhost:61296}, msedge: {msedgedriverVersion: 134.0.3124.93 (a9facff5fd6c..., userDataDir: C:\Users\Admin\AppData\Loca...}, networkConnectionEnabled: false, pageLoadStrategy: normal, platformName: windows, proxy: Proxy(), se:cdp: ws://localhost:61296/devtoo..., se:cdpVersion: 134.0.3124.93, setWindowRect: true, strictFileInteractability: true, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:extension:minPinLength: true, webauthn:extension:prf: true, webauthn:virtualAuthenticators: true} Session ID: 5b5a3682c54d8cc33f465c4450dc9bac
Driver Capabilities used: else if (browser.equalsIgnoreCase("edge")) { Map<String, Object> prefs = new HashMap<>(); prefs.put("download.prompt_for_download", false); prefs.put("download.default_directory", Hooks.downloadPath); prefs.put("safebrowsing.enabled", false); prefs.put("safebrowsing.disable_download_protection", true); EdgeOptions options = new EdgeOptions(); options.setExperimentalOption("prefs", prefs); options.addArguments("--allow-running-insecure-content"); options.addArguments("--ignore-certificate-errors"); options.addArguments("--disable-popup-blocking"); ds.setAcceptInsecureCerts(true); System.setProperty("webdriver.chrome.driver", "C:\Users\Admin\Downloads\edgedriver_win64\msedgedriver.exe"); tldriver.set(new EdgeDriver(options)); DevTools devTools = ((EdgeDriver) tldriver.get()).getDevTools(); devTools.createSession(); devTools.send(Browser.setDownloadBehavior( Browser.SetDownloadBehaviorBehavior.ALLOW, Optional.empty(), Optional.of(Hooks.downloadPath), Optional.of(true) )); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Launch the application and log in.
Navigate to a specific screen that opens in a new window, where multiple file download links are available.
Before clicking the download button, driver.getWindowHandles() correctly returns a total of 2 windows.
Set s = driver.getWindowHandles();
System.out.println(s.size()); // Returns 2
This works as expected before initiating the file download.
Upon clicking the first download link, a new download window opens, and the file starts downloading.
However, when attempting to retrieve all window handles again using driver.getWindowHandles(), an error occurs.
Log: org.openqa.selenium.TimeoutException: java.util.concurrent.TimeoutException
Build info: version: '4.29.0', revision: '5fc1ec94cb'
System info: os.name: 'Windows 11', os.arch: 'amd64', os.version: '10.0', java.version: '17.0.6'
Driver info: org.openqa.selenium.edge.EdgeDriver
Command: [5b5a3682c54d8cc33f465c4450dc9bac, getWindowHandles {}]
Capabilities {acceptInsecureCerts: false, browserName: MicrosoftEdge, browserVersion: 134.0.3124.93, fedcm:accounts: true, ms:edgeOptions: {debuggerAddress: localhost:61296}, msedge: {msedgedriverVersion: 134.0.3124.93 (a9facff5fd6c..., userDataDir: C:\Users\Admin\AppData\Loca...}, networkConnectionEnabled: false, pageLoadStrategy: normal, platformName: windows, proxy: Proxy(), se:cdp: ws://localhost:61296/devtoo..., se:cdpVersion: 134.0.3124.93, setWindowRect: true, strictFileInteractability: true, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:extension:minPinLength: true, webauthn:extension:prf: true, webauthn:virtualAuthenticators: true}
Session ID: 5b5a3682c54d8cc33f465c4450dc9bac
Driver Capabilities used:
else if (browser.equalsIgnoreCase("edge")) {
Map<String, Object> prefs = new HashMap<>();
prefs.put("download.prompt_for_download", false);
prefs.put("download.default_directory", Hooks.downloadPath);
prefs.put("safebrowsing.enabled", false);
prefs.put("safebrowsing.disable_download_protection", true);
EdgeOptions options = new EdgeOptions();
options.setExperimentalOption("prefs", prefs);
options.addArguments("--allow-running-insecure-content");
options.addArguments("--ignore-certificate-errors");
options.addArguments("--disable-popup-blocking");
ds.setAcceptInsecureCerts(true);
System.setProperty("webdriver.chrome.driver", "C:\Users\Admin\Downloads\edgedriver_win64\msedgedriver.exe");
tldriver.set(new EdgeDriver(options));
DevTools devTools = ((EdgeDriver) tldriver.get()).getDevTools();
devTools.createSession();
devTools.send(Browser.setDownloadBehavior(
Browser.SetDownloadBehaviorBehavior.ALLOW,
Optional.empty(),
Optional.of(Hooks.downloadPath),
Optional.of(true)
));
}
The text was updated successfully, but these errors were encountered: