-2

So I'm trying to emulate the code in this page: Javascript in Python

#!/usr/bin/env python
from contextlib import closing
from selenium.webdriver import Firefox # pip install selenium
from selenium.webdriver.support.ui import WebDriverWait

url = "http://www.python.org"
# use firefox to get page with javascript generated content
with Firefox() as browser:
     browser.get(url)

but I am getting this error:

FileNotFoundError                         Traceback (most recent call last)
c:\programdata\miniconda3\lib\site-packages\selenium\webdriver\common\service.py in start(self)
     73                                             close_fds=platform.system() != 'Windows',
---> 74                                             stdout=self.log_file, stderr=self.log_file)
     75         except TypeError:

any suggestions, please?

I am using python 3.6 in a Jupyter notebook

Community
  • 1
  • 1
hackR
  • 1,459
  • 17
  • 26
  • 1
    You need to install and configure the `geckodriver`. See https://github.com/mozilla/geckodriver/releases/latest and http://stackoverflow.com/a/40208762/21945 – mhawke Mar 31 '17 at 11:11

1 Answers1

0

Solved! As mhawke mentioned above, I needed to install the geckodriver. But where to install it?

Since I was using Miniconda3, I simply downloaded the geckodriver.exe and placed it into the C:\ProgramData\Miniconda3 folder.

Thanks, mhawke.

hackR
  • 1,459
  • 17
  • 26