TA的每日心情 | 慵懒 2019-3-1 09:31 |
---|
签到天数: 44 天 连续签到: 1 天 [LV.5]测试团长
|
本帖最后由 a2006abc 于 2017-5-28 11:25 编辑
我用的selenium3.4 版本 firefox53版本 在执行脚本时可以正常运行,但是打印出的日志里面发现有错误信息,不知道什么原因,还请大神指点。
脚本如下:
package selenium;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class filefoxdriver {
public static void main(String[] args){
System.setProperty("webdriver.gecko.driver", "D:\\BaiduYunDownload\\selenium\\geckodriver-v0.16.1-win32\\geckodriver.exe");
WebDriver driver = new FirefoxDriver();
driver.get("http://www.baidu.com/");
}
}
运行日志如下:
1495940810694 geckodriver INFO Listening on 127.0.0.1:32250
1495940811331 geckodriver::marionette INFO Starting browser \\?\C:\Program Files (x86)\Mozilla Firefox\firefox.exe with args ["-marionette"]
1495940811555 addons.manager ERROR startup failed: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIFile.create]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: resource://gre/modules/FileUtils.jsm :: FileUtils_getDir :: JlavaScript errinoer :7 0" data: no] Stack tracer:e sFoiulrecUet:i/l/sg_rgee/tmDiord(u)l@erse/sAoddonuManagrecre.:j/s/mg,r el/imnoed u1l6e5s7/:F iNlSe_EURtRiOlRs_.NjOsTm_:I7N0I T<I AFLiIlZeEUDt:i lAsd_dgoentMFainlaeg(e)r@ ries not initialiszoeudr
c
e://gre/modules/FileUtils.jsm:42 < validateBlocklist()@resource://gre/modules/AddonManager.jsm:671 < startup()@resource://gre/modules/AddonManager.jsm:834 < startup()@resource://gre/modules/AddonManager.jsm:3129 < observe()@resource://gre/components/addonManager.js:65
1495940814831 Marionette INFO Listening on port 5111
JavaScript error: resource://gre/modules/AddonManager.jsm, line 2570: NS_ERROR_NOT_INITIALIZED: AddonManager is not initialized
五月 28, 2017 11:06:55 上午 org.openqa.selenium.remote.ProtocolHandshake createSession
信息: Detected dialect: W3C
JavaScript error: resource://gre/modules/FileUtils.jsm, line 70: NS_ERROR_ILLEGAL_VALUE: Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIFile.create]
|
|