It is an old question but I don't find the answer to my situation.
my code is a simple test code
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
url="http://news.163.com/"
chrome_options = Options()
# specify headless mode
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('–headless')
chrome_options.add_argument("--disable-gpu")
chrome_options.add_argument('--disable-dev-shm-usage')
chrome_options.add_argument("start-maximized")
chrome_options.add_argument("disable-infobars")
browser = webdriver.Chrome(options=chrome_options)
browser.set_page_load_timeout(300)
browser.set_script_timeout(300)
browser.get(url)
title=browser.find_elements_by_xpath('//div[@id="js_top_news"]/h2/a')
print(title[0].get_attribute('innerHTML'))
browser.quit()
driver.quit()
And I have added all the arguments in the options.
And ps -aux |grep google-chrome
and kill all the process in my wsl.
Google Chrome 100.0.4896.88 with chrome-driver 100.0.4896.60 and they are in the same dir added in the environment path.