File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 113113from contextlib import suppress
114114from seleniumbase import config as sb_config
115115from seleniumbase .config import settings
116+ from seleniumbase .core import detect_b_ver
116117from seleniumbase .core import download_helper
117118from seleniumbase .core import log_helper
118119from seleniumbase .core import proxy_helper
@@ -890,6 +891,13 @@ def get_configured_sb(context):
890891 "\n Only 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
You can’t perform that action at this time.
0 commit comments