from selenium import webdriver

driver = webdriver.Chrome("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe")

Hello, I am new to selenium and i have got this problem: My Chrome Browser opens, but it is not going to open google.com or any other website. I tried to print something out after opening the webdriver, but nothing happens. Why is my program stopping after opening the browser?


WebDriver path should be passed as an additional parameter to chromedriver.exe as below:

driver = webdriver.Chrome(executable_path=r"C:\TestFiles\chromedriver.exe")

ChromeDriver can be obtained from: http://chromedriver.chromium.org/downloads Please make sure that Your webdriver is compatible with Your Chrome browser.

I hope that this will help You :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.