Many webdriver commands don't implement the following step: If the current top-level browsing context is no longer open, return error with error code no such window. This step is present in many commands specified by the spec such as: https://w3c.github.io/webdriver/webdriver-spec.html#get-window-handle
Jul 26 2018, Project Member
Aug 1, Project Member
Aug 16, Project Member
ChromeDriver is already working correctly in this area. All commands that require a top-level browsing context (i.e., a window or a tab) uses ExecuteWindowCommand function (https://cs.chromium.org/chromium/src/chrome/test/chromedriver/window_commands.cc?type=cs&q=ExecuteWindowCommand) to retrieve the WebView object associated with the current browsing context. This function calls web_view->ConnectIfNecessary, which would notice that the window is already disconnected, and try to re-connect. The re-connect would fail, and a no such window would be returned.
Sign in to add a comment