AePageObejcts::MultipleWindows::Browser keeps an in-memory registry of open windows. Windows are added to the registry when they are discovered via iterating over all the windows when finding documents. Windows are removed from the registry when they are explicitly closed by the test code via AePageObjects::MultipleWindows::Window#close.
Sometimes windows are closed by JS running on the page under test. If this happens, the corresponding AePageObjects::MultipleWindows::Window in memory is not removed from the registry.
If browser.find_document is called after this happens, AePageObjects will attempt to access the underlying window for the window entry in the in-memory registry and Selenium::WebDriver::Error::NoSuchWindowError will be raised.
browser.find_document should handle this error by removing the window from the in-memory registry and moving on with finding the document across the opened windows.
AePageObejcts::MultipleWindows::Browserkeeps an in-memory registry of open windows. Windows are added to the registry when they are discovered via iterating over all the windows when finding documents. Windows are removed from the registry when they are explicitly closed by the test code viaAePageObjects::MultipleWindows::Window#close.Sometimes windows are closed by JS running on the page under test. If this happens, the corresponding
AePageObjects::MultipleWindows::Windowin memory is not removed from the registry.If
browser.find_documentis called after this happens, AePageObjects will attempt to access the underlying window for the window entry in the in-memory registry and Selenium::WebDriver::Error::NoSuchWindowError will be raised.browser.find_documentshould handle this error by removing the window from the in-memory registry and moving on with finding the document across the opened windows.