Skip to content

Commit 3993d5b

Browse files
committed
[py] Broaden exception handling
1 parent e47f11c commit 3993d5b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

py/selenium/webdriver/remote/webdriver.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
from selenium.common.exceptions import JavascriptException
4343
from selenium.common.exceptions import NoSuchCookieException
4444
from selenium.common.exceptions import NoSuchElementException
45-
from selenium.common.exceptions import SessionNotCreatedException
4645
from selenium.common.exceptions import WebDriverException
4746
from selenium.webdriver.common.bidi.browser import Browser
4847
from selenium.webdriver.common.bidi.network import Network
@@ -350,7 +349,7 @@ def start_session(self, capabilities: dict) -> None:
350349
response = self.execute(Command.NEW_SESSION, caps)["value"]
351350
self.session_id = response.get("sessionId")
352351
self.caps = response.get("capabilities")
353-
except (SessionNotCreatedException, WebDriverException):
352+
except Exception:
354353
if self.service is not None:
355354
self.service.stop()
356355
raise

0 commit comments

Comments
 (0)