Skip to content

Commit e1f972a

Browse files
committed
Improve browser-launching reliability for Chrome
1 parent a1f72f6 commit e1f972a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

seleniumbase/core/browser_launcher.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1963,6 +1963,11 @@ def get_local_driver(
19631963
chrome_options.headless = False
19641964
return webdriver.Chrome(options=chrome_options)
19651965
except Exception as e:
1966+
try:
1967+
# Try again if Chrome didn't launch
1968+
return webdriver.Chrome(options=chrome_options)
1969+
except Exception:
1970+
pass
19661971
if headless:
19671972
raise Exception(e)
19681973
if LOCAL_CHROMEDRIVER and os.path.exists(LOCAL_CHROMEDRIVER):

0 commit comments

Comments
 (0)