Skip to content

Commit c791499

Browse files
committed
Expand firefox_pref="KEY:VALUE" to allow URLs as VALUEs
1 parent 9f8ce98 commit c791499

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

seleniumbase/core/browser_launcher.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1270,7 +1270,10 @@ def _set_firefox_options(
12701270
f_pref = firefox_pref_item.split(":")[0]
12711271
f_pref_value = firefox_pref_item.split(":")[1]
12721272
needs_conversion = True
1273-
else: # More than one ":" in the set. (Too many!)
1273+
elif firefox_pref_item.count("://") == 1:
1274+
f_pref = firefox_pref_item.split(":")[0]
1275+
f_pref_value = ":".join(firefox_pref_item.split(":")[1:])
1276+
else: # More than one ":" in the set without a URL.
12741277
raise Exception(
12751278
'Incorrect formatting for Firefox "pref:value" set!'
12761279
)

0 commit comments

Comments
 (0)