Skip to content

Commit 3884130

Browse files
committed
We still need to quit playwright but close Selenium.
1 parent 3c1bd35 commit 3884130

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

lib/galaxy_test/selenium/framework.py

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -529,18 +529,24 @@ def login(self):
529529

530530
def tear_down_driver(self):
531531
exception = None
532-
try:
533-
self.close()
534-
except Exception as e:
535-
if "cannot kill Chrome" in str(e):
536-
print(f"Ignoring likely harmless error in Selenium shutdown {e}")
537-
else:
532+
if self.backend_type == "playwright":
533+
try:
534+
self.quit()
535+
except Exception as e:
538536
exception = e
537+
else:
538+
try:
539+
self.close()
540+
except Exception as e:
541+
if "cannot kill Chrome" in str(e):
542+
print(f"Ignoring likely harmless error in Selenium shutdown {e}")
543+
else:
544+
exception = e
539545

540-
try:
541-
self.display.stop()
542-
except Exception as e:
543-
exception = e
546+
try:
547+
self.display.stop()
548+
except Exception as e:
549+
exception = e
544550

545551
if exception is not None:
546552
raise exception

0 commit comments

Comments
 (0)