Skip to content

Commit 25d6ca8

Browse files
committed
Add more Chromium options for Behave-BDD
1 parent cb78748 commit 25d6ca8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

seleniumbase/behave/behave_sb.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@
113113
from contextlib import suppress
114114
from seleniumbase import config as sb_config
115115
from seleniumbase.config import settings
116+
from seleniumbase.core import detect_b_ver
116117
from seleniumbase.core import download_helper
117118
from seleniumbase.core import log_helper
118119
from seleniumbase.core import proxy_helper
@@ -890,6 +891,13 @@ def get_configured_sb(context):
890891
"\nOnly ONE default browser is allowed!\n"
891892
"%s browsers were selected: %s" % (len(browsers), browsers)
892893
)
894+
if sb.browser in ["opera", "brave", "comet", "atlas"]:
895+
bin_loc = detect_b_ver.get_binary_location(sb.browser)
896+
if bin_loc and os.path.exists(bin_loc):
897+
sb_config._cdp_browser = sb.browser
898+
sb_config._cdp_bin_loc = bin_loc
899+
sb_config.binary_location = bin_loc
900+
sb.binary_location = bin_loc
893901
# Recorder Mode can still optimize scripts in "-D headless2" mode.
894902
if sb.recorder_ext and sb.headless:
895903
sb.headless = False

0 commit comments

Comments
 (0)