0
當我執行下面的代碼錯誤使用webdriver.firefox時()
from selenium import webdriver
browser = webdriver.Firefox()
我收到以下錯誤
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
File "/home/rohit/.local/lib/python3.4/site-packages/selenium/webdriver/firefox/webdriver.py", line 103, in __init__
self.binary, timeout)
File "/home/rohit/.local/lib/python3.4/site-packages/selenium/webdriver/firefox/extension_connection.py", line 51, in __init__
self.binary.launch_browser(self.profile, timeout=timeout)
File "/home/rohit/.local/lib/python3.4/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 68, in launch_browser
self._wait_until_connectable(timeout=timeout)
File "/home/rohit/.local/lib/python3.4/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 98, in _wait_until_connectable
raise WebDriverException("The browser appears to have exited "
selenium.common.exceptions.WebDriverException: Message: The browser appears to have exited before we could connect. If you specified a log_file in the FirefoxBinary constructor, check it for details.
什麼我做錯了。
你在Python 3.4.2 – thebadguy
硒版本2.53.2版Firefox 47.0 ubuntu上沒有工作:( –