Chrome Driver mystery..

1,068 views
Skip to first unread message

H

unread,
May 20, 2016, 1:13:46 AM5/20/16
to Selenium Users
Hi Everyone,

I have been trying (on a mac) to install the Chrome Webdriver for Selenium, but have been running into issues.  I copied the chromedriver executable to my usr/local/bin folder, which from most videos allows anyone to begin running the webdriver; however, when I run my Python program, I get the following message:

Traceback (most recent call last):

  File "urlClassReporter.py", line 17, in <module>

    driver = webdriver.Chrome('Users/H/Documents/') # creates a Firefox driver

  File "/Library/Python/2.7/site-packages/selenium-2.53.2-py2.7.egg/selenium/webdriver/chrome/webdriver.py", line 61, in __init__

    self.service.start()

  File "/Library/Python/2.7/site-packages/selenium-2.53.2-py2.7.egg/selenium/webdriver/common/service.py", line 69, in start

    os.path.basename(self.path), self.start_error_message)

selenium.common.exceptions.WebDriverException: Message: '' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home


Exception AttributeError: "'Service' object has no attribute 'process'" in <bound method Service.__del__ of <selenium.webdriver.chrome.service.Service object at 0x109740690>> ignored



I'm a bit confused, since my executable is in PATH, and I've seen YouTubers do exactly the same thing as me without this error.  Sorry for such a basic and tedious question, I'm just quite stumped.


This is the code I tried to run for reference:


from selenium import webdriver # use this to navigate pages

driver = webdriver.Chrome()

driver.get("http://google.com")

driver.quit()




I also tried adding the path to the constructor but the same error comes up:


from selenium import webdriver # use this to navigate pages

driver = webdriver.Chrome('usr/local/bin')

driver.get("http://google.com")

driver.quit()




Thanks in advance to anyone who is so kind as to help.  I'm rather new at this.



- H

⇜Krishnan Mahadevan⇝

unread,
May 20, 2016, 2:38:07 AM5/20/16
to Selenium Users
Assuming that you have copied your chromedriver binary into your /usr/local/bin and assuming that this path is part of your PATH environment variable, can you please quickly check if you can spawn the chromedriver binary, by opening up a command prompt/terminal and typing "chromedriver" ?

You should see the binary getting invoked.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/5b3fe65e-c3fa-49f1-8c78-9f5ca64ab288%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andrew Jervis

unread,
Jun 3, 2016, 12:48:47 PM6/3/16
to Selenium Users
Reply all
Reply to author
Forward
0 new messages