add parameter: extra_chrome_arguments
This commit is contained in:
parent
783b839315
commit
dd71a48e28
|
@ -124,6 +124,7 @@ class Chrome(selenium.webdriver.chrome.webdriver.WebDriver):
|
|||
use_subprocess=True,
|
||||
debug=False,
|
||||
no_sandbox=True,
|
||||
extra_chrome_arguments=[],
|
||||
user_multi_procs: bool = False,
|
||||
**kw,
|
||||
):
|
||||
|
@ -421,6 +422,10 @@ class Chrome(selenium.webdriver.chrome.webdriver.WebDriver):
|
|||
if hasattr(options, "handle_prefs"):
|
||||
options.handle_prefs(user_data_dir)
|
||||
|
||||
if extra_chrome_arguments:
|
||||
for arg in extra_chrome_arguments:
|
||||
options.add_argument(arg)
|
||||
|
||||
# fix exit_type flag to prevent tab-restore nag
|
||||
try:
|
||||
with open(
|
||||
|
|
Loading…
Reference in New Issue