Commit.
This commit is contained in:
parent
cd297b70a9
commit
34ee4f22a5
|
@ -622,11 +622,12 @@ class Browser(browser_webdriver):
|
|||
options.add_argument(i)
|
||||
# Set headless mode.
|
||||
if self.is_linux or headless:
|
||||
options.add_argument('--headless=new')
|
||||
options.add_argument('--headless=new' if browser_choose != 1 else '--headless')
|
||||
# Set no-sandbox mode.
|
||||
if self.is_linux:
|
||||
options.add_argument('--no-sandbox')
|
||||
options.add_argument('--disable-dev-shm-usage')
|
||||
if self.is_linux and browser_choose != 1:
|
||||
options.add_argument('--disable-gpu')
|
||||
# Set language of browser, default is zh-CN.
|
||||
if lang:
|
||||
|
|
Loading…
Reference in New Issue