Skip to content

Commit 1372bfd

Browse files
committed
Update command-line options
1 parent e0dc64b commit 1372bfd

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

seleniumbase/plugins/driver_manager.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -781,6 +781,23 @@ def Driver(
781781
swiftshader = False
782782
if locale is not None and locale_code is None:
783783
locale_code = locale
784+
if locale_code is None:
785+
if '--locale="' in arg_join:
786+
locale_code = (
787+
arg_join.split('--locale="')[1].split('"')[0]
788+
)
789+
elif '--locale=' in arg_join:
790+
locale_code = (
791+
arg_join.split('--locale=')[1].split(' ')[0]
792+
)
793+
elif '--locale-code="' in arg_join:
794+
locale_code = (
795+
arg_join.split('--locale-code="')[1].split('"')[0]
796+
)
797+
elif '--locale-code=' in arg_join:
798+
locale_code = (
799+
arg_join.split('--locale-code=')[1].split(' ')[0]
800+
)
784801
if ad_block is not None and ad_block_on is None:
785802
ad_block_on = ad_block
786803
if ad_block_on is None:

seleniumbase/plugins/sb_manager.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -942,6 +942,23 @@ def SB(
942942
swiftshader = False
943943
if locale is not None and locale_code is None:
944944
locale_code = locale
945+
if locale_code is None:
946+
if '--locale="' in arg_join:
947+
locale_code = (
948+
arg_join.split('--locale="')[1].split('"')[0]
949+
)
950+
elif '--locale=' in arg_join:
951+
locale_code = (
952+
arg_join.split('--locale=')[1].split(' ')[0]
953+
)
954+
elif '--locale-code="' in arg_join:
955+
locale_code = (
956+
arg_join.split('--locale-code="')[1].split('"')[0]
957+
)
958+
elif '--locale-code=' in arg_join:
959+
locale_code = (
960+
arg_join.split('--locale-code=')[1].split(' ')[0]
961+
)
945962
if ad_block is not None and ad_block_on is None:
946963
ad_block_on = ad_block
947964
if ad_block_on is None:

0 commit comments

Comments
 (0)