Add the "--proxy=STRING" option for manager formats
This commit is contained in:
parent
ad9faec443
commit
40bdc0099e
|
@ -251,6 +251,16 @@ def Driver(
|
|||
is_mobile = False
|
||||
test_id = "direct_driver"
|
||||
proxy_string = proxy
|
||||
if proxy_string is None and "--proxy" in arg_join:
|
||||
if "--proxy=" in arg_join:
|
||||
proxy_string = arg_join.split("--proxy=")[1].split(" ")[0]
|
||||
elif "--proxy " in arg_join:
|
||||
proxy_string = arg_join.split("--proxy ")[1].split(" ")[0]
|
||||
if proxy_string:
|
||||
if proxy_string.startswith('"') and proxy_string.endswith('"'):
|
||||
proxy_string = proxy_string[1:-1]
|
||||
elif proxy_string.startswith("'") and proxy_string.endswith("'"):
|
||||
proxy_string = proxy_string[1:-1]
|
||||
user_agent = agent
|
||||
recorder_mode = False
|
||||
if recorder_ext:
|
||||
|
|
|
@ -312,6 +312,16 @@ def SB(
|
|||
if is_mobile:
|
||||
sb_config.mobile_emulator = True
|
||||
proxy_string = proxy
|
||||
if proxy_string is None and "--proxy" in arg_join:
|
||||
if "--proxy=" in arg_join:
|
||||
proxy_string = arg_join.split("--proxy=")[1].split(" ")[0]
|
||||
elif "--proxy " in arg_join:
|
||||
proxy_string = arg_join.split("--proxy ")[1].split(" ")[0]
|
||||
if proxy_string:
|
||||
if proxy_string.startswith('"') and proxy_string.endswith('"'):
|
||||
proxy_string = proxy_string[1:-1]
|
||||
elif proxy_string.startswith("'") and proxy_string.endswith("'"):
|
||||
proxy_string = proxy_string[1:-1]
|
||||
user_agent = agent
|
||||
recorder_mode = False
|
||||
if recorder_ext:
|
||||
|
|
Loading…
Reference in New Issue