@@ -48,7 +48,6 @@ def testShouldThrowNoSuchWindowException(self, driver, pages):
4848 with pytest .raises (NoSuchWindowException ):
4949 driver .switch_to .window ("invalid name" )
5050
51- @pytest .mark .ignore_chrome
5251 def testShouldThrowNoSuchWindowExceptionOnAnAttemptToGetItsHandle (self , driver , pages ):
5352 if driver .capabilities ['browserName' ] == 'firefox' and driver .w3c :
5453 pytest .xfail ("Marionette Doesnt Throw: https://bugzilla.mozilla.org/show_bug.cgi?id=1309173" )
@@ -65,7 +64,6 @@ def testShouldThrowNoSuchWindowExceptionOnAnAttemptToGetItsHandle(self, driver,
6564 with pytest .raises (NoSuchWindowException ):
6665 driver .current_window_handle
6766
68- @pytest .mark .ignore_chrome
6967 @pytest .mark .ignore_ie
7068 def testShouldThrowNoSuchWindowExceptionOnAnyOperationIfAWindowIsClosed (self , driver , pages ):
7169 pages .load ("xhtmlTest.html" )
@@ -84,7 +82,6 @@ def testShouldThrowNoSuchWindowExceptionOnAnyOperationIfAWindowIsClosed(self, dr
8482 with pytest .raises (NoSuchWindowException ):
8583 driver .find_element_by_tag_name ("body" )
8684
87- @pytest .mark .ignore_chrome
8885 @pytest .mark .ignore_ie
8986 def testShouldThrowNoSuchWindowExceptionOnAnyElementOperationIfAWindowIsClosed (self , driver , pages ):
9087 pages .load ("xhtmlTest.html" )
@@ -127,8 +124,7 @@ def testCanCallGetWindowHandlesAfterClosingAWindow(self, driver, pages):
127124 driver .switch_to .window (handles [0 ])
128125
129126 driver .find_element_by_id ("close" ).click ()
130- all_handles = driver .window_handles
131- assert 1 == len (all_handles )
127+ WebDriverWait (driver , 3 ).until (EC .number_of_windows_to_be (1 ))
132128
133129 def testCanObtainAWindowHandle (self , driver , pages ):
134130 pages .load ("xhtmlTest.html" )
0 commit comments