I have problem with Selenium! I tried both 3.6 and 2.7 but no difference! I'm using win7 (64bit)
let's start with a simple code:
binary = FirefoxBinary(r"C:\Program Files\Mozilla Firefox\firefox.exe")
fp = webdriver.FirefoxProfile()
driver = webdriver.Firefox(firefox_binary=binary, firefox_profile=fp)
And so, i get these errors:
C:\Python27\python.exe E:/Python/MathBattle_Solver/test.py
Traceback (most recent call last): File "E:/Python/MathBattle_Solver/test.py", line 13, in download("https://www.google.com")
File "E:/Python/MathBattle_Solver/test.py", line 9, in download browser = webdriver.Firefox(capabilities=firefox_capabilities, executable_path=r'C:\Windows\System32\geckodriver.exe')
File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 144, in init self.service.start()
File "C:\Python27\lib\site-packages\selenium\webdriver\common\service.py", line 81, in start os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'geckodriver.exe' executable needs to be in PATH.
I downloaded the "geckodriver.exe", put it into the system32 folder and added into PATH system variable from the environment variables but nothing happened! still the same error!
Any idea?
webdriver.Firefox
with:driver = webdriver.Firefox(firefox_binary=binary, firefox_profile=fp, executable_path='geckodriver.exe')
– fedterzi