1

As soon as I run my program, google opens (so far so good) but this window closes immediately after the program has run. I already installed the chromdriver (also matches the version of the search engine) and put it in the script folder in Python. Can someone help me?

Here is my Code:

from selenium import webdriver

driver = webdriver.Chrome()

driver.get("http://google.com")

1 Answers1

0

You need to specify an excecutable path for a chrome driver to be able to open a browser. download a driver based on your browser in your case it's Chrome from here: https://chromedriver.chromium.org/downloads

then driver = webdriver.Chrome(here you have to write the path of the driver),you can put it wherever you want.

Yammine
  • 1
  • 1