By default, chrome will be run with this command line:
\"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe\"
--disable-hang-monitor
--disable-
The official way to customize the Chrome options from within selenium:
# renaming import in order to avoid collision with Options for other browsers, so that you can also use e.g.
# from selenium.webdriver.firefox.options import Options as FirefoxOptions
from selenium.webdriver.chrome.options import Options as ChromeOptions
options = ChromeOptions()
options.add_argument("--headless")
options.add_argument('--disable-gpu')
options.add_argument('--disable-dev-shm-usage')
options.add_argument('--disable-extensions')
options.add_argument('--no-sandbox')
options.add_argument('window-size=1920,1080')
# only necessary if you want to use a specific binary location
# options.binary_location = '/Applications/Chromium.app/Contents/MacOS/Chromium'
driver = webdriver.Chrome(chrome_options=options)