【问题标题】:Problems when applying selenium on windows 10在 Windows 10 上应用 selenium 时出现的问题
【发布时间】:2016-02-05 08:26:52
【问题描述】:

我之前在Win7上写过一个网络爬虫,之前效果很好。但是,将系统更新到 Win10 后,我收到以下错误报告。你能给我一些解决这个问题的建议吗?

 Traceback (most recent call last):   File
 "C:/Python27/study/study.py", line 4, in <module>
     driver = webdriver.Firefox()   File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\webdriver.py",
 line 59, in __init__
     self.binary, timeout),   File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\extension_connection.py",
 line 47, in __init__
     self.binary.launch_browser(self.profile)   File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\firefox_binary.py",
 line 66, in launch_browser
     self._wait_until_connectable()   File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\firefox_binary.py",
 line 105, in _wait_until_connectable
     raise WebDriverException("Can't load the profile. Profile " WebDriverException: Message: Can't load the profile. Profile Dir: %s
 If you specified a log_file in the FirefoxBinary constructor, check it
 for details.

【问题讨论】:

  • 你使用的是什么版本的硒?
  • 您确定您的问题与 Win10 相关吗?通常,您在哪个平台上使用 Firefox 并不重要。对 Selenium 的行为几乎相同,无论您是在任何 Windows 版本、Mac 还是 Android 上运行 Firefox。
  • 致kimmy:谢谢你们的cmets。我觉得你说得对,Buaban指出是firefox版本问题。

标签: python windows selenium


【解决方案1】:

我猜是火狐版本的问题。

  1. 卸载 Firefox
  2. 下载旧版本如https://ftp.mozilla.org/pub/firefox/releases/41.0/win32/en-US/
  3. 安装它
  4. 再次运行测试

【讨论】:

  • 感谢您的帮助。我会试试的。
猜你喜欢
  • 2021-05-29
  • 2020-01-22
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-02-02
  • 2020-09-02
  • 1970-01-01
相关资源
最近更新 更多