Batman Batman - 3 months ago 23
Python Question

Chrome Not Starting When Using ChromeDriver

I'm trying to use Selenium and ChromeDriver to write a scraping job. When I run the following code though nothing happens, in the sense that Chrome doesn't appear to start, but I don't get an error.

import time

from selenium import webdriver

driver = webdriver.Chrome()
driver.get(r"http://www.python.org")
time.sleep(10)
driver.quit()


Is there something else that I need to do to make Chrome start?

Answer

You need to download chromedriver from here and put it in your path. I also see that you have a typo in driver.get, make sure you have a correct URL as well

Below is the typo I was talking about

driver.get(r"http://www.python.org")
Comments