I am stuck with a Chromedriver problem, I have read some documents on the internet to circumvent the error I am getting.
This is what I have done. Already two Google Chrome windows are open. I have tried installing Selenium and Chromedriver using pip. When I try to open a browser using d=webdriver.Chrome()
it throws following error. I have tried specifying the executable path as well by d=webdriver.Chrome('usr/bin/chromedriver') still no go.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-
packages/selenium/webdriver/remote/webdriver.py", line 156, in __init__
self.start_session(capabilities, browser_profile)
File "/usr/local/lib/python2.7/dist-
packages/selenium/webdriver/remote/webdriver.py", line 245, in
start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/usr/local/lib/python2.7/dist-
packages/selenium/webdriver/remote/webdriver.py", line 314, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python2.7/dist-
packages/selenium/webdriver/remote/errorhandler.py", line 242, in
check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error:
Chrome failed to start: exited abnormally
(Driver info: chromedriver=2.35.528139
(47ead77cb35ad2a9a83248b292151462a66cd881),platform=Linux 4.13.0-41-
generic x86_64)
Referred another document which tries to install selenium in a virtualenv but in venv also getting the same error. I have also provided the 777 permissions to the /usr/bin/chromedriver
(env) root@XL-UbuntuOnAryMac$ pip freeze | grep selenium
selenium==3.12.0
(env) root@XL-UbuntuOnAryMac$ pip freeze | grep chromedriver
chromedriver==2.24.1
(env) root@XL-UbuntuOnAryMac$ chromedriver --version
ChromeDriver 2.35.528139 (47ead77cb35ad2a9a83248b292151462a66cd881)
(env) root@XL-UbuntuOnAryMac$ whereis chromedriver
chromedriver: /usr/bin/chromedriver
(env) root@XL-UbuntuOnAryMac$
(env) root@XL-UbuntuOnAryMac$ ll /usr/bin/chromedriver
-rwxrwxrwx 1 root root 7903592 Jan 9 18:35 /usr/bin/chromedriver