I am new to Ubuntu. I installed google chrome and linux chrome driver successfully.
I imported the following :
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.action_chains import ActionChains
All these imports happen successfully. Post that I tried to run the following code :
driver = webdriver.Chrome('/usr/bin/chromedriver')
It gave the following error : selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally. (unknown error: DevToolsActivePort file doesn't exist) (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
I went to powershell and checked where google chrome and chromedriver are installed :

I see that they are installed in the correct path. But why isn't the code working then? why is it giving an error?
Please any help would be immensely appreciated!!
chromedriverboth in/usr/bin/and/usr/local/bin/when only one is sufficient. 2. If thechromedriveris already at a place which is part ofPATHvariable, then what is the need of specifying path inwebdriver.Chrome()- Deepam Gupta/usr/local/binand/usr/binand put the new one at/usr/bin. Now start python in a new terminal and just do: from selenium import webdriver ; driver = webdriver.Chrome() ; also make sure you have the latest version of Chrome, and it is working perfectly. - Deepam Gupta