1

when attempting to run a simple test on the selenium framework with a chrome browser using the Splinter library for Python, I encounter the following:

Traceback (most recent call last):
  File "chrome.py", line 3, in <module>
    browser = Browser('chrome')
  File "/usr/local/lib/python2.7/dist-packages/splinter/browser.py", line 53, in Browser
    return driver(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/splinter/driver/webdriver/chrome.py", line 23, in __init__
    self.driver = Chrome(chrome_options=options, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/chrome/webdriver.py", line 65, in __init__
    keep_alive=True)
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 71, in __init__
    self.start_session(desired_capabilities, browser_profile)
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 113, in start_session
    'desiredCapabilities': desired_capabilities,
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 164, in execute
    self.error_handler.check_response(response)
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/errorhandler.py", line 164, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: u'unknown error: cannot find Chrome binary\n  (Driver info: chromedriver=2.9.248316,platform=Linux 3.2.0-24-virtual x86)'

whereis chromedriver

chromedriver: /usr/bin/chromedriver /usr/bin/X11/chromedriver /usr/local/bin/chromedriver

Code I'm trying to run:

from splinter import Browser

browser = Browser('chrome')

I've looked everywhere but nothing on how to specify the specific path in Splinter. I tried applying some of the selenium examples but it did not work.

Richard
  • 8,961
  • 3
  • 38
  • 47
KJW
  • 15,035
  • 47
  • 137
  • 243
  • This url might help you get set up: http://splinter.cobrateam.info/docs/drivers/chrome.html – Richard Apr 08 '14 at 19:31
  • Or check out this question http://stackoverflow.com/questions/8255929/running-webdriver-chrome-with-selenium – Piotr Dabkowski Apr 08 '14 at 19:41
  • I'm attempting it again. with `sudo apt-get update && sudo apt-get install openjdk-7-jdk`, `https://raw.githubusercontent.com/cobrateam/splinter/master/.travis_before.bash`, replacing it with latest chromedriver. – KJW Apr 08 '14 at 19:59

0 Answers0