don't remove user_data_dir if it contains the substring headless
should be able to use paths that contain the substring headless. For example users/{username}/{headless,gui}
This commit is contained in:
parent
cea80717c5
commit
c757d579ce
|
@ -301,8 +301,9 @@ class Chrome(selenium.webdriver.chrome.webdriver.WebDriver):
|
||||||
for arg in options.arguments:
|
for arg in options.arguments:
|
||||||
|
|
||||||
if any([_ in arg for _ in ("--headless", "headless")]):
|
if any([_ in arg for _ in ("--headless", "headless")]):
|
||||||
options.arguments.remove(arg)
|
if not arg.startswith("--user-data-dir="):
|
||||||
options.headless = True
|
options.arguments.remove(arg)
|
||||||
|
options.headless = True
|
||||||
|
|
||||||
if "lang" in arg:
|
if "lang" in arg:
|
||||||
m = re.search("(?:--)?lang(?:[ =])?(.*)", arg)
|
m = re.search("(?:--)?lang(?:[ =])?(.*)", arg)
|
||||||
|
|
Loading…
Reference in New Issue