0

I'm sure this has been answered somewhere, but I've searched high and low and haven't managed to figure it out.

I'm trying to use selenium's webdriver on Firefox as shown in "Automate the boring stuff" and I keep getting the below error.

I've updated Firefox, downloaded selenium (obviously) and tried various other solutions. I'm also on a Linux machine.

from selenium import webdriver

browser = webdriver.Firefox()
Traceback (most recent call last):

  File "<ipython-input-36-baa5adeac11b>", line 1, in <module>
    browser = webdriver.Firefox()

  File "/home/accounts/name/anaconda3/lib/python3.6/site-packages/selenium/webdriver/firefox/webdriver.py", line 137, in __init__
    if options.binary is not None:

AttributeError: 'Options' object has no attribute 'binary'
Tim
  • 63
  • 7
  • Maybe you need selenium driver file for Firefox – Germa Vinsmoke May 14 '19 at 10:20
  • did you see https://github.com/SeleniumHQ/selenium/issues/4643 – LinPy May 14 '19 at 10:21
  • @TonyJafar I've run the function provided on the site and it seems to run fine, but I then don't know how to open firefox. Sorry I may be so far behind here. If Firefox is open already will another window open? – Tim May 14 '19 at 10:32
  • Now I seem to be getting a "WebDriverException: 'geckodriver' executable needs to be in PATH." error. – Tim May 14 '19 at 10:35
  • 1
    this error has been answered 1000 time, https://stackoverflow.com/questions/40208051/selenium-using-python-geckodriver-executable-needs-to-be-in-path – LinPy May 14 '19 at 10:40
  • I told this person to download the driver like half an hour ago :v – Germa Vinsmoke May 14 '19 at 10:46

0 Answers0