-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Description
Description
We have an older website that we're testing, and we've been having some issues when pages get closed by the website ( when settings are saved and such ). Basically when trying to navigate back to the original window, sometimes the Driver just loses connection and doesn't work anymore ( it'll give an error like this one when trying to switch to another window ).
2026-02-04 18:23:40,117 ERROR EditorialManagerTestLibrary.Automation.Logger - [METHOD: SafeGetWindowHandles - Line 823 in /githubrunner/_work/editorialmanager-test-automation/editorialmanager-test-automation/EditorialManagerTest/Automation/Browsers.cs] Failed to get window handles, driver connection may be lost: An unknown exception was encountered sending an HTTP request to the remote WebDriver server for URL http://localhost:33035/session/01b33f5d6d060cb5c70cc7a028052492/window/handles. The exception message was: Cannot assign requested address (localhost:33035)
Reproducible Code
call
driver.WindowHandles
right after a pop-up window closes (without it being closed by the driver, rather be closed by the website itself)Debugging Logs
2026-02-04 18:23:40,117 ERROR EditorialManagerTestLibrary.Automation.Logger - [METHOD: SafeGetWindowHandles - Line 823 in /githubrunner/_work/editorialmanager-test-automation/editorialmanager-test-automation/EditorialManagerTest/Automation/Browsers.cs] Failed to get window handles, driver connection may be lost: An unknown exception was encountered sending an HTTP request to the remote WebDriver server for URL http://localhost:33035/session/01b33f5d6d060cb5c70cc7a028052492/window/handles. The exception message was: Cannot assign requested address (localhost:33035)