We currently ignore NoSuchFrame, but navigation or previous command might have closed the window too. This is causing tests imported/selenium/py/test/selenium/webdriver/common/window_switching_tests.py::testClickingOnAButtonThatClosesAnOpenWindowDoesNotCauseTheBrowserToHang and imported/selenium/py/test/selenium/webdriver/common/window_switching_tests.py::testCanCallGetWindowHandlesAfterClosingAWindow to fail _____________________________________________________ testClickingOnAButtonThatClosesAnOpenWindowDoesNotCauseTheBrowserToHang[WebKitGTK] _____________________________________________________ driver = <selenium.webdriver.webkitgtk.webdriver.WebDriver (session="960616c6-b34c-42c3-b33c-16aa232e92c8")>, pages = <conftest.Pages object at 0x7ff192bc7850> def testClickingOnAButtonThatClosesAnOpenWindowDoesNotCauseTheBrowserToHang(driver, pages): pages.load("xhtmlTest.html") current = driver.current_window_handle handles = driver.window_handles driver.find_element_by_name("windowThree").click() WebDriverWait(driver, 3).until(EC.new_window_is_opened(handles)) handles = driver.window_handles handles.remove(current) driver.switch_to.window(handles[0]) > driver.find_element_by_id("close").click() current = 'page-3CA6BC92-CA3D-4F35-882D-90C881FA51F8' driver = <selenium.webdriver.webkitgtk.webdriver.WebDriver (session="960616c6-b34c-42c3-b33c-16aa232e92c8")> handles = ['page-AE36B12C-C5EB-400D-9107-888FFAF6F63E'] pages = <conftest.Pages object at 0x7ff192bc7850> WebDriverTests/imported/selenium/py/test/selenium/webdriver/common/window_switching_tests.py:141: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ WebDriverTests/imported/selenium/py/selenium/webdriver/remote/webelement.py:80: in click self._execute(Command.CLICK_ELEMENT) WebDriverTests/imported/selenium/py/selenium/webdriver/remote/webelement.py:628: in _execute return self._parent.execute(command, params) WebDriverTests/imported/selenium/py/selenium/webdriver/remote/webdriver.py:312: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _____________________________________________________ testClickingOnAButtonThatClosesAnOpenWindowDoesNotCauseTheBrowserToHang[WebKitGTK] _____________________________________________________ driver = <selenium.webdriver.webkitgtk.webdriver.WebDriver (session="960616c6-b34c-42c3-b33c-16aa232e92c8")>, pages = <conftest.Pages object at 0x7ff192bc7850> def testClickingOnAButtonThatClosesAnOpenWindowDoesNotCauseTheBrowserToHang(driver, pages): pages.load("xhtmlTest.html") current = driver.current_window_handle handles = driver.window_handles driver.find_element_by_name("windowThree").click() WebDriverWait(driver, 3).until(EC.new_window_is_opened(handles)) handles = driver.window_handles handles.remove(current) driver.switch_to.window(handles[0]) > driver.find_element_by_id("close").click() current = 'page-3CA6BC92-CA3D-4F35-882D-90C881FA51F8' driver = <selenium.webdriver.webkitgtk.webdriver.WebDriver (session="960616c6-b34c-42c3-b33c-16aa232e92c8")> handles = ['page-AE36B12C-C5EB-400D-9107-888FFAF6F63E'] pages = <conftest.Pages object at 0x7ff192bc7850> WebDriverTests/imported/selenium/py/test/selenium/webdriver/common/window_switching_tests.py:141: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ WebDriverTests/imported/selenium/py/selenium/webdriver/remote/webelement.py:80: in click self._execute(Command.CLICK_ELEMENT) WebDriverTests/imported/selenium/py/selenium/webdriver/remote/webelement.py:628: in _execute return self._parent.execute(command, params) WebDriverTests/imported/selenium/py/selenium/webdriver/remote/webdriver.py:312: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7ff192bc7dd0> response = {'status': 404, 'value': '{"value":{"error":"no such window","message":"","stacktrace":""}}'}
Created attachment 334887 [details] Patch
Comment on attachment 334887 [details] Patch r=me
Committed r229211: <https://trac.webkit.org/changeset/229211>
<rdar://problem/38132518>