How to reduce headless Chromedriver startup time

Viewed 41

I've just installed Selenium through pip and trying to load it up but it's taking like 20 seconds to load.

start = datetime.datetime.now()

options = Options()
options.headless = True

driver = webdriver.Chrome(options=options, executable_path=r'C:\Tools\chromedriver_win32\chromedriver.exe')

finish = datetime.datetime.now()
print("Startup time: " + str(finish - start))

here's the code I have right now and I'm getting back "Startup time: 0:00:22.632402". is there some settings I'm missing?

1 Answers

enter image description here

I run the same code. and Printed out the time interval .... Kill all chrome process and start again and do not forget to use .quit() method ... not to overflow process in background

Related