12

I have this issue with firefox version 47 https://github.com/seleniumhq/selenium/issues/2110

So, i have tried to add Marionette web driver to fix it: https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/WebDriver

But:

from selenium.webdriver.common.desired_capabilities import DesiredCapabilities

firefox_capabilities = DesiredCapabilities.FIREFOX
firefox_capabilities['marionette'] = True
firefox_capabilities['binary'] = '/Users/myproject/geckodriver-0.8.0-OSX'

returns error:

selenium.common.exceptions.WebDriverException: Message: 'wires' executable needs to be in PATH.

Exception AttributeError: "'Service' object has no attribute 'process'" in > ignored

selenium==2.53.5

Arti
  • 7,356
  • 12
  • 57
  • 122

3 Answers3

9

the firefox binary capability you're setting points to the firefox binary, not the marionette driver binary. You need to add /Users/myproject/geckodriver-0.8.0-OSX to your path as follows:

Open a terminal and run this command

export PATH=$PATH:/Users/myproject/geckodriver-0.8.0-OSX
Mobrockers
  • 2,128
  • 1
  • 16
  • 28
5

I ran into this issue and can confirm that firefox_capabilities['binary'] should point to the Firefox binary, not to GeckoDriver. The Python example in the Mozilla WebDriver documentation has been clarified on this topic.

Raymond Yee
  • 549
  • 5
  • 13
  • firefox_capabilities = DesiredCapabilities.FIREFOX firefox_capabilities['marionette'] = True firefox_capabilities['binary'] = 'C:\Program Files (x86)\Mozilla Firefox\firefox.exe' driver = webdriver.Firefox(capabilities=firefox_capabilities) Hi Raymond, I'm also having trouble. I added what appears to me to be all the fixes for the problems the articles listed however I'm still getting the same wires executable needs to be in path error. – user3042850 Jun 16 '16 at 14:28
  • 1
    The error says wire executable needs to be included in path, but I do have reference to where the firefox exe is in my environment path variable. – user3042850 Jun 16 '16 at 15:02
  • 1
    @user3042850 If you are using 64-bit Windows, then try the executable at https://sny.no/e/geckodriver1.exe instead - most tutorials point you at the 32-bit executable (recommendation taken from https://github.com/mozilla/geckodriver/issues/74#issuecomment-226927179) Also bear in mind that if you are on Windows you will need to rename the driver binary to "wires.exe", not "wires" :-) – user3468054 Jun 18 '16 at 07:32
0

In addition to the other two answers, you probably don't want to change the PATH system wide since you need it only when running the tests. A way to have the right PATH only when you need it is to set it in code:

os.environ["PATH"] += os.pathsep + 'path/to/dir/containing/geckodriver/'

A simpler workaround would be to simple move the geckodriver binary to the directory you already have in your path:

mv geckodriver /usr/local/bin
dsalaj
  • 2,857
  • 4
  • 34
  • 43