WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
183280
WebDriver: Also ignore NoSuchwindow errors when waiting for navigation to complete
https://bugs.webkit.org/show_bug.cgi?id=183280
Summary
WebDriver: Also ignore NoSuchwindow errors when waiting for navigation to com...
Carlos Garcia Campos
Reported
2018-03-02 01:43:02 PST
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":""}}'}
Attachments
Patch
(2.44 KB, patch)
2018-03-02 02:00 PST
,
Carlos Garcia Campos
bburg
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Carlos Garcia Campos
Comment 1
2018-03-02 02:00:16 PST
Created
attachment 334887
[details]
Patch
Blaze Burg
Comment 2
2018-03-02 10:45:36 PST
Comment on
attachment 334887
[details]
Patch r=me
Carlos Garcia Campos
Comment 3
2018-03-05 00:31:10 PST
Committed
r229211
: <
https://trac.webkit.org/changeset/229211
>
Radar WebKit Bug Importer
Comment 4
2018-03-05 00:32:53 PST
<
rdar://problem/38132518
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug