@@ -5245,6 +5245,15 @@ def get_local_driver(
52455245 or driver_version == "keep"
52465246 ):
52475247 browser_driver_close_match = True
5248+ one_off_chromium = False
5249+ if (
5250+ hasattr (sb_config , "binary_location" )
5251+ and sb_config .binary_location == "_chromium_"
5252+ ):
5253+ with suppress (Exception ):
5254+ one_off_chromium_ver = int (use_version .split ("." )[0 ]) - 1
5255+ if one_off_chromium_ver == int (ch_driver_version ):
5256+ one_off_chromium = True
52485257 # If not ARM MAC and need to use uc_driver (and it's missing),
52495258 # and already have chromedriver with the correct version,
52505259 # then copy chromedriver to uc_driver (and it'll get patched).
@@ -5276,25 +5285,31 @@ def get_local_driver(
52765285 and use_version != "latest" # Browser version detected
52775286 and (ch_driver_version or not local_ch_exists )
52785287 and (
5279- use_version .split ("." )[0 ] != ch_driver_version
5288+ (
5289+ use_version .split ("." )[0 ] != ch_driver_version
5290+ and not one_off_chromium
5291+ )
52805292 or (
52815293 not local_ch_exists
52825294 and use_version .isnumeric ()
52835295 and int (use_version ) >= 115
52845296 and not browser_driver_close_match
5297+ and not one_off_chromium
52855298 )
52865299 )
52875300 )
52885301 or (
52895302 use_uc
52905303 and use_version != "latest" # Browser version detected
52915304 and uc_driver_version != use_version
5305+ and not one_off_chromium
52925306 )
52935307 or (
52945308 full_ch_driver_version # Also used for the uc_driver
52955309 and driver_version
52965310 and len (str (driver_version ).split ("." )) == 4
52975311 and full_ch_driver_version != driver_version
5312+ and not one_off_chromium
52985313 )
52995314 ):
53005315 # chromedriver download needed in the seleniumbase/drivers dir
0 commit comments