I'm working on an automation script and I'm trying to open a url in chrome, I have installed and imported selenium and downloaded the chrome driver and moved it to /usr/local/bin.
But when I try and run the script, the console is blank and then about a second later it displays 'Process finished with exit code 0' as if nothing happened. Below is my current code:
from selenium import webdriver
class Script():
def __init__(self):
self.driver = webdriver.Chrome(executable_path=r'/usr/local/bin/chromedriver')
def login(self):
self.driver.get('https://facebook.com')
The path is wrong here. It should be like below
webdriver.Chrome(executable_path=r'/usr/local/bin/chromedriver.exe')
Need to add .exe extension in the executable_path. Also, make sure you are using correct Version of chrome driver for Google Chrome.