Skip to content

Commit 0154f25

Browse files
committed
Fix intermittent "ERR_CONNECTION_CLOSED" on open()
1 parent b5e44d5 commit 0154f25

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

seleniumbase/fixtures/base_case.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,10 @@ def open(self, url):
194194
try:
195195
self.driver.get(url)
196196
except Exception as e:
197-
if "ERR_CONNECTION_TIMED_OUT" in e.msg:
197+
if (
198+
"ERR_CONNECTION_TIMED_OUT" in e.msg
199+
or "ERR_CONNECTION_CLOSED" in e.msg
200+
):
198201
time.sleep(0.5)
199202
self.driver.get(url)
200203
elif (

0 commit comments

Comments
 (0)