Mình đang tìm hiểu về Selenium 3. Mình có đoạn code đơn giản như sau:
public class NavigateToAUrl {
public static void main(String[] args) {
System.setProperty("webdriver.gecko.driver", "D:\\Driver\\geckodriver.exe");
WebDriver driver = new FirefoxDriver();
driver.get("http://www.google.com");
}
Mình chạy nó vẫn được. Nhưng ở Console nó báo
1494207450785 geckodriver INFO Listening on 127.0.0.1:8627
1494207451504 geckodriver::marionette INFO Starting browser \\?\C:\Program Files (x86)\Mozilla Firefox\firefox.exe with args ["-marionette"]
1494207452768 addons.manager ERROR startup failed: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIFile.create]" nsreJavsauSlctr:i p"t0 xe8r0r070057 (NS_ERROoRr_:I LrLeEsGoAuLr_cVeA:L/U/Eg)r"e / mloodcualteiso/nA:d don"MaJnSa gferra.mjes m:,: lrienseo 165u7r:c eN:S//g_re/mEoRdRuOlRe_sN/OFTi_lIeNUItTiIlAsL.IjZsEmD :: :A dFdiolneMUatnialgse_rgetD iirs :n:o tl iinnei t7i0a"l i zdatae:d
n
o] Stack trace: FileUtils_getDir()@resource://gre/modules/FileUtils.jsm:70 < FileUtils_getFile()@resource://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
1494207456302 Marionette INFO Listening on port 61030
JavaScript error: resource://gre/modules/AddonManager.jsm, line 2570: NS_ERROR_NOT_INITIALIZED: AddonManager is not initialized
May 08, 2017 8:37:36 AM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
Đây là lỗi gì vậy mn? Fix thế nào bây h?