Selenium之firefox浏览器的启动问题及解决

启动firefox报错如下:

rg.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
ailure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsINavBookmarksService.removeFolderChildren]
JavaScript error: jar:file:///D:/ztsoft/FireFox/browser/omni.ja!/components/nsBrowserGlue.js, line 1979: NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIAnnotationService.getItemsWithAnnotation]
1522425391255 addons.manager DEBUG Loaded provider scope for resource://gre/modules/addons/XPIProvider.jsm: ["XPIProvider"]
1522425391257 addons.manager DEBUG Loaded provider scope for resource://gre/modules/LightweightThemeManager.jsm: ["LightweightThemeManager"]
1522425391259 addons.manager DEBUG Loaded provider scope for resource://gre/modules/addons/GMPProvider.jsm
1522425391260 addons.manager DEBUG Loaded provider scope for resource://gre/modules/addons/PluginProvider.jsm
1522425391260 addons.manager DEBUG Starting provider: XPIProvider
1522425391261 addons.xpi DEBUG startup

此时的selenium版本为2.44版本,firefox为39。

配置selenium版本为2.52版本即可

参考博客下面博客得知版本对应关系:https://blog.csdn.net/fetch001/article/details/64437979

Selenium】    -> 【FireFox】

       2.25.0        ->  18
       2.30.0        ->  19
       2.31.0        ->  20
       2.42.2        ->  29
       2.44.0        ->  33 (不支持31)
       2.53.0        ->  43,46(不支持47)
       2.41.0        ->  26(绿色版本)
       2.44          ->  32.0-35.0
       2.53.0-2.53.6 ->  40.0.3

posted @ 2018-03-31 00:05  避雨亭  阅读(531)  评论(0编辑  收藏  举报