4
私は最近、セレンをダウンロードし、このスクリプトを実行しようとしていますのpython webdriverをするEROR
from selenium import webdriver
driver = webdriver.Firefox()
が、私はこのエラーを取得:これはその前に私にgeckodriver.exe開く方法によって
Traceback (most recent call last):
File "<pyshell#3>", line 1, in <module>
driver = webdriver.Firefox()
File "C:\Heights\PortableApps\PortablePython2.7.6.1\App\lib\site-packages\selenium-3.0.1-py2.7.egg\selenium\webdriver\firefox\webdriver.py", line 145, in __init__
keep_alive=True)
File "C:\Heights\PortableApps\PortablePython2.7.6.1\App\lib\site-packages\selenium-3.0.1-py2.7.egg\selenium\webdriver\remote\webdriver.py", line 92, in __init__
self.start_session(desired_capabilities, browser_profile)
File "C:\Heights\PortableApps\PortablePython2.7.6.1\App\lib\site-packages\selenium-3.0.1-py2.7.egg\selenium\webdriver\remote\webdriver.py", line 179, in start_session
response = self.execute(Command.NEW_SESSION, capabilities)
File "C:\Heights\PortableApps\PortablePython2.7.6.1\App\lib\site-packages\selenium-3.0.1-py2.7.egg\selenium\webdriver\remote\webdriver.py", line 236, in execute
self.error_handler.check_response(response)
File "C:\Heights\PortableApps\PortablePython2.7.6.1\App\lib\site-packages\selenium-3.0.1-py2.7.egg\selenium\webdriver\remote\errorhandler.py", line 192, in check_response
raise exception_class(message, screen, stacktrace)
WebDriverException: Message: Expected browser binary location, but unable to find binary in default location, no 'firefox_binary' capability provided, and no binary flag set on the command line
ああエラーを書いてください
Firefoxをインストールしましたか?それがどこにあるのかセレンに伝えようとしましたか?あなたがポータブルアプリを使用している場合、彼らは物事を破るであろう非典型的な場所に物を置いているかもしれません。 – jonrsharpe
コメントありがとう、私は火キツネがインストールされている、どのように私はそれがどこにセレンを教えて?私はそれを削除して、それを使わずにPythonをダウンロードする必要があると思いますか? – omersk
現在お使いのFirefoxのバージョンは? – Piyush