Skip to content

Commit 22afd7d

Browse files
authored
Merge pull request #1349 from seleniumbase/fix-ie-issue
Fix IE issue that prevented the browser from quitting after tests
2 parents 9a58cd5 + e6f43c1 commit 22afd7d

File tree

6 files changed

+34
-10
lines changed

6 files changed

+34
-10
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
<meta property="og:image" content="https://seleniumbase.io/cdn/img/mac_sb_logo_5.png" />
66
<link rel="icon" href="https://seleniumbase.io/img/green_logo2.png" />
77

8-
<h2 align="center"><a href="https://github.com/seleniumbase/SeleniumBase/"><img src="https://seleniumbase.io/cdn/img/mac_sb_banner_t.png" alt="SeleniumBase" title="SeleniumBase" width="760" /></a></h2>
8+
<h2 align="center"><a href="https://github.com/seleniumbase/SeleniumBase/"><img src="https://seleniumbase.io/cdn/img/mac_sb_banner_t.png" alt="SeleniumBase" title="SeleniumBase" width="672" /></a></h2>
99

1010
<p align="center">
11-
<b>Everything you need to test web apps.</b>
11+
<b>The most advanced open-source automation framework on the Planet.</b>
1212
</p>
1313

1414
<!-- View on GitHub -->
@@ -53,7 +53,7 @@
5353

5454
<p align="left">
5555
✅ Smart-waiting code prevents flaky tests.<br />
56-
Supports Chromium, Firefox, and Safari.<br />
56+
Runs on Chromium, Firefox, IE, & Safari.<br />
5757
✅ Supports Linux, macOS, and Windows.<br />
5858
</p>
5959

seleniumbase/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# seleniumbase package
2-
__version__ = "3.2.4"
2+
__version__ = "3.2.5"

seleniumbase/behave/behave_sb.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -920,7 +920,11 @@ def _perform_behave_unconfigure_():
920920
# Close the shared browser session
921921
if sb_config.shared_driver:
922922
try:
923-
if not is_windows or sb_config.shared_driver.service.process:
923+
if (
924+
not is_windows
925+
or sb_config.browser == "ie"
926+
or sb_config.shared_driver.service.process
927+
):
924928
sb_config.shared_driver.quit()
925929
except AttributeError:
926930
pass
@@ -983,7 +987,11 @@ def _perform_behave_unconfigure_():
983987
def do_final_driver_cleanup_as_needed():
984988
try:
985989
if hasattr(sb_config, "last_driver") and sb_config.last_driver:
986-
if not is_windows or sb_config.last_driver.service.process:
990+
if (
991+
not is_windows
992+
or sb_config.browser == "ie"
993+
or sb_config.last_driver.service.process
994+
):
987995
sb_config.last_driver.quit()
988996
except Exception:
989997
pass

seleniumbase/fixtures/base_case.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10465,7 +10465,11 @@ def quit_extra_driver(self, driver=None):
1046510465
"Use this method only if get_new_driver() has been called."
1046610466
)
1046710467
try:
10468-
if not is_windows or driver.service.process:
10468+
if (
10469+
not is_windows
10470+
or self.browser == "ie"
10471+
or driver.service.process
10472+
):
1046910473
driver.quit()
1047010474
except AttributeError:
1047110475
pass
@@ -12419,7 +12423,11 @@ def __quit_all_drivers(self):
1241912423
self._drivers_list.reverse() # Last In, First Out
1242012424
for driver in self._drivers_list:
1242112425
try:
12422-
if not is_windows or driver.service.process:
12426+
if (
12427+
not is_windows
12428+
or self.browser == "ie"
12429+
or driver.service.process
12430+
):
1242312431
if not delay_driver_quit:
1242412432
driver.quit()
1242512433
else:

seleniumbase/plugins/pytest_plugin.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1463,7 +1463,11 @@ def _perform_pytest_unconfigure_():
14631463
# Close the shared browser session
14641464
if sb_config.shared_driver:
14651465
try:
1466-
if not is_windows or sb_config.shared_driver.service.process:
1466+
if (
1467+
not is_windows
1468+
or sb_config.browser == "ie"
1469+
or sb_config.shared_driver.service.process
1470+
):
14671471
sb_config.shared_driver.quit()
14681472
except AttributeError:
14691473
pass

seleniumbase/plugins/selenium_plugin.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,11 @@ def finalize(self, result):
779779
def afterTest(self, test):
780780
try:
781781
# If the browser window is still open, close it now.
782-
if not is_windows or self.driver.service.process:
782+
if (
783+
not is_windows
784+
or test.test.browser == "ie"
785+
or self.driver.service.process
786+
):
783787
self.driver.quit()
784788
except AttributeError:
785789
pass

0 commit comments

Comments
 (0)