In python-selenium chrome_options, What exactly is the difference between the following two options, I know both runs the selenium script without opening the browser.
chrome_options.add_argument('--headless')
chrome_options.add_argument('--disable-gpu')
--disable-gpu
doesn't run the script without opening the browser, only --headless
. It used to be needed on Windows Issue 737678: Headless: make --disable-gpu flag unnecessary, but this bug was fixed. chrome_options.add_argument('--headless')
is all you need.