firefox NotConnectedException

时间:2015-03-24 09:51:47

标签: java selenium selenium-webdriver clojure ubuntu-14.04

我有以下配置

java -version

openjdk version“1.8.0_40-internal”

OpenJDK Runtime Environment(build 1.8.0_40-internal-b27)

OpenJDK 64位服务器VM(版本25.40-b25,混合模式)

ubuntu 14.04

clj-webdriver

我正在按照测试

运行
  (ns selenium-web.core-test
    (:require [clojure.test :refer :all]
              [selenium-web.core :refer :all]
              [clj-webdriver.taxi :refer :all]))

  (deftest run-common-tets
    (set-driver! {:browser :firefox})
    (to "https://github.com")
    (click "a[href*='login']")
    (input-text "#login_field" "piyush")
    (-> "#password" (input-text "1") submit)
    (is (= "Incorrect username or password." (text ".flash")))
    (quit) )

并获得以下异常:

org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
{"langpack-en-ZA@firefox.mozilla.org":{"d":"/usr/lib/firefox/browser/extensions/langpack-en-ZA@firefox.mozilla.org.xpi","e":true,"v":"36.0.4","st":1426962281000},"{972ce4c6-7e08-4474-a285-3208198ce6fd}":{"d":"/usr/lib/firefox/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}","e":true,"v":"36.0.4","st":1427084855000,"mt":1426961704000},"langpack-en-GB@firefox.mozilla.org":{"d":"/usr/lib/firefox/browser/extensions/langpack-en-GB@firefox.mozilla.org.xpi","e":true,"v":"36.0.4","st":1426962281000}},"app-system-share":{"webapps-team@lists.launchpad.net":{"d":"/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/webapps-team@lists.launchpad.net","e":false,"v":"3.0.2","st":1397697896000,"mt":1397665356000},"{2e1445b0-2682-11e1-bfc2-0800200c9a66}":{"d":"/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/{2e1445b0-2682-11e1-bfc2-0800200c9a66}","e":false,"v":"2014.08.06.beta","st":1414992900000,"mt":1407283796000},"ubufox@ubuntu.com":{"d":"/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/ubufox@ubuntu.com","e":false,"v":"3.0","st":1421386237000,"mt":1420839872000}},"app-system-local":{"online-accounts@lists.launchpad.net":{"d":"/usr/lib/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/online-accounts@lists.launchpad.net","e":false,"v":"0.5","st":1397697896000,"mt":1390969548000}}}
1427189374023   addons.xpi  DEBUG   getModTime: Recursive scan of langpack-en-ZA@firefox.mozilla.org
1427189374024   addons.xpi  DEBUG   getModTime: Recursive scan of {972ce4c6-7e08-4474-a285-3208198ce6fd}
1427189374024   addons.xpi  DEBUG   getModTime: Recursive scan of langpack-en-GB@firefox.mozilla.org
1427189374025   addons.xpi  DEBUG   getInstallState changed: false, state: {"app-profile":{"fxdriver@googlecode.com":{"d":"/tmp/anonymous8984618018842301384webdriver-profile/extensions/fxdriver@googlecode.com","e":false,"v":"2.39.0","st":1427189365000,"mt":1427189365000}},"app-global":{"langpack-en-ZA@firefox.mozilla.org":{"d":"/usr/lib/firefox/browser/extensions/langpack-en-ZA@firefox.mozilla.org.xpi","e":true,"v":"36.0.4","st":1426962281000},"{972ce4c6-7e08-4474-a285-3208198ce6fd}":{"d":"/usr/lib/firefox/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}","e":true,"v":"36.0.4","st":1427084855000,"mt":1426961704000},"langpack-en-GB@firefox.mozilla.org":{"d":"/usr/lib/firefox/browser/extensions/langpack-en-GB@firefox.mozilla.org.xpi","e":true,"v":"36.0.4","st":1426962281000}},"app-system-share":{"webapps-team@lists.launchpad.net":{"d":"/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/webapps-team@lists.launchpad.net","e":false,"v":"3.0.2","st":1397697896000,"mt":1397665356000},"{2e1445b0-2682-11e1-bfc2-0800200c9a66}":{"d":"/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/{2e1445b0-2682-11e1-bfc2-0800200c9a66}","e":false,"v":"2014.08.06.beta","st":1414992900000,"mt":1407283796000},"ubufox@ubuntu.com":{"d":"/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/ubufox@ubuntu.com","e":false,"v":"3.0","st":1421386237000,"mt":1420839872000}},"app-system-local":{"online-accounts@lists.launchpad.net":{"d":"/usr/lib/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/online-accounts@lists.launchpad.net","e":false,"v":"0.5","st":1397697896000,"mt":1390969548000}}}
1427189374028   addons.xpi  DEBUG   No changes found
1427189374033   addons.xpi  DEBUG   Registering manifest for /usr/lib/firefox/browser/extensions/langpack-en-ZA@firefox.mozilla.org.xpi
1427189374034   addons.xpi  DEBUG   Registering manifest for /usr/lib/firefox/browser/extensions/langpack-en-GB@firefox.mozilla.org.xpi
1427189374035   addons.manager  DEBUG   Registering shutdown blocker for XPIProvider
1427189374036   addons.manager  DEBUG   Registering shutdown blocker for LightweightThemeManager
1427189374038   addons.manager  DEBUG   Registering shutdown blocker for OpenH264Provider
1427189374039   addons.manager  DEBUG   Registering shutdown blocker for PluginProvider
*** Blocklist::_preloadBlocklistFile: blocklist is disabled
1427189376827   addons.manager  DEBUG   Registering shutdown blocker for <unnamed-provider>

    at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:118)
    at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:250)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:110)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:195)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:190)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:186)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:99)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
    at java.lang.Class.newInstance(Class.java:442)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:93)
    at clojure.lang.Reflector.invokeNoArgInstanceMember(Reflector.java:313)
    at clj_webdriver.core$new_webdriver_STAR_.invoke(core.clj:188)
    at clj_webdriver.core$new_driver.invoke(core.clj:202)
    at clj_webdriver.taxi$set_driver_STAR_.invoke(taxi.clj:26)
    at clj_webdriver.taxi$set_driver_BANG_.invoke(taxi.clj:59)
    at selenium_web.core_test$fn__3756.invoke(core_test.clj:9)
    at clojure.test$test_var$fn__7187.invoke(test.clj:704)
    at clojure.test$test_var.invoke(test.clj:704)
    at clojure.test$test_vars$fn__7209$fn__7214.invoke(test.clj:722)
    at clojure.test$default_fixture.invoke(test.clj:674)
    at clojure.test$test_vars$fn__7209.invoke(test.clj:722)
    at clojure.test$default_fixture.invoke(test.clj:674)
    at clojure.test$test_vars.invoke(test.clj:718)
    at clojure.test$test_all_vars.invoke(test.clj:728)
    at clojure.test$test_ns.invoke(test.clj:747)
    at clojure.core$map$fn__4245.invoke(core.clj:2559)
    at clojure.lang.LazySeq.sval(LazySeq.java:40)
    at clojure.lang.LazySeq.seq(LazySeq.java:49)
    at clojure.lang.Cons.next(Cons.java:39)
    at clojure.lang.RT.boundedLength(RT.java:1654)
    at clojure.lang.RestFn.applyTo(RestFn.java:130)
    at clojure.core$apply.invoke(core.clj:626)
    at clojure.test$run_tests.doInvoke(test.clj:762)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at clojure.core$apply.invoke(core.clj:624)
    at user$eval85$fn__140$fn__171.invoke(form-init6043962041489599905.clj:1)
    at user$eval85$fn__140$fn__141.invoke(form-init6043962041489599905.clj:1)
    at user$eval85$fn__140.invoke(form-init6043962041489599905.clj:1)
    at user$eval85.invoke(form-init6043962041489599905.clj:1)
    at clojure.lang.Compiler.eval(Compiler.java:6703)
    at clojure.lang.Compiler.eval(Compiler.java:6693)
    at clojure.lang.Compiler.load(Compiler.java:7130)
    at clojure.lang.Compiler.loadFile(Compiler.java:7086)
    at clojure.main$load_script.invoke(main.clj:274)
    at clojure.main$init_opt.invoke(main.clj:279)
    at clojure.main$initialize.invoke(main.clj:307)
    at clojure.main$null_opt.invoke(main.clj:342)
    at clojure.main$main.doInvoke(main.clj:420)
    at clojure.lang.RestFn.invoke(RestFn.java:421)
    at clojure.lang.Var.invoke(Var.java:383)
    at clojure.lang.AFn.applyToHelper(AFn.java:156)
    at clojure.lang.Var.applyTo(Var.java:700)
    at clojure.main.main(main.java:37)

lein test :only selenium-web.core-test/run-common-tets

ERROR in (run-common-tets) (NewProfileExtensionConnection.java:130)
Uncaught exception, not in assertion.
expected: nil
  actual: org.openqa.selenium.WebDriverException: Failed to connect to binary FirefoxBinary(/usr/bin/firefox) on port 7055; process output follows: 
{"langpack-en-ZA@firefox.mozilla.org":{"d":"/usr/lib/firefox/browser/extensions/langpack-en-ZA@firefox.mozilla.org.xpi","e":true,"v":"36.0.4","st":1426962281000},"{972ce4c6-7e08-4474-a285-3208198ce6fd}":{"d":"/usr/lib/firefox/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}","e":true,"v":"36.0.4","st":1427084855000,"mt":1426961704000},"langpack-en-GB@firefox.mozilla.org":{"d":"/usr/lib/firefox/browser/extensions/langpack-en-GB@firefox.mozilla.org.xpi","e":true,"v":"36.0.4","st":1426962281000}},"app-system-share":{"webapps-team@lists.launchpad.net":{"d":"/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/webapps-team@lists.launchpad.net","e":false,"v":"3.0.2","st":1397697896000,"mt":1397665356000},"{2e1445b0-2682-11e1-bfc2-0800200c9a66}":{"d":"/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/{2e1445b0-2682-11e1-bfc2-0800200c9a66}","e":false,"v":"2014.08.06.beta","st":1414992900000,"mt":1407283796000},"ubufox@ubuntu.com":{"d":"/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/ubufox@ubuntu.com","e":false,"v":"3.0","st":1421386237000,"mt":1420839872000}},"app-system-local":{"online-accounts@lists.launchpad.net":{"d":"/usr/lib/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/online-accounts@lists.launchpad.net","e":false,"v":"0.5","st":1397697896000,"mt":1390969548000}}}
1427189374023   addons.xpi  DEBUG   getModTime: Recursive scan of langpack-en-ZA@firefox.mozilla.org
1427189374024   addons.xpi  DEBUG   getModTime: Recursive scan of {972ce4c6-7e08-4474-a285-3208198ce6fd}
1427189374024   addons.xpi  DEBUG   getModTime: Recursive scan of langpack-en-GB@firefox.mozilla.org
1427189374025   addons.xpi  DEBUG   getInstallState changed: false, state: {"app-profile":{"fxdriver@googlecode.com":{"d":"/tmp/anonymous8984618018842301384webdriver-profile/extensions/fxdriver@googlecode.com","e":false,"v":"2.39.0","st":1427189365000,"mt":1427189365000}},"app-global":{"langpack-en-ZA@firefox.mozilla.org":{"d":"/usr/lib/firefox/browser/extensions/langpack-en-ZA@firefox.mozilla.org.xpi","e":true,"v":"36.0.4","st":1426962281000},"{972ce4c6-7e08-4474-a285-3208198ce6fd}":{"d":"/usr/lib/firefox/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}","e":true,"v":"36.0.4","st":1427084855000,"mt":1426961704000},"langpack-en-GB@firefox.mozilla.org":{"d":"/usr/lib/firefox/browser/extensions/langpack-en-GB@firefox.mozilla.org.xpi","e":true,"v":"36.0.4","st":1426962281000}},"app-system-share":{"webapps-team@lists.launchpad.net":{"d":"/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/webapps-team@lists.launchpad.net","e":false,"v":"3.0.2","st":1397697896000,"mt":1397665356000},"{2e1445b0-2682-11e1-bfc2-0800200c9a66}":{"d":"/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/{2e1445b0-2682-11e1-bfc2-0800200c9a66}","e":false,"v":"2014.08.06.beta","st":1414992900000,"mt":1407283796000},"ubufox@ubuntu.com":{"d":"/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/ubufox@ubuntu.com","e":false,"v":"3.0","st":1421386237000,"mt":1420839872000}},"app-system-local":{"online-accounts@lists.launchpad.net":{"d":"/usr/lib/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/online-accounts@lists.launchpad.net","e":false,"v":"0.5","st":1397697896000,"mt":1390969548000}}}
1427189374028   addons.xpi  DEBUG   No changes found
1427189374033   addons.xpi  DEBUG   Registering manifest for /usr/lib/firefox/browser/extensions/langpack-en-ZA@firefox.mozilla.org.xpi
1427189374034   addons.xpi  DEBUG   Registering manifest for /usr/lib/firefox/browser/extensions/langpack-en-GB@firefox.mozilla.org.xpi
1427189374035   addons.manager  DEBUG   Registering shutdown blocker for XPIProvider
1427189374036   addons.manager  DEBUG   Registering shutdown blocker for LightweightThemeManager
1427189374038   addons.manager  DEBUG   Registering shutdown blocker for OpenH264Provider
1427189374039   addons.manager  DEBUG   Registering shutdown blocker for PluginProvider
*** Blocklist::_preloadBlocklistFile: blocklist is disabled
1427189376827   addons.manager  DEBUG   Registering shutdown blocker for <unnamed-provider>

Build info: version: '2.39.0', revision: '14fa800511cc5d66d426e08b0b2ab926c7ed7398', time: '2013-12-16 13:18:38'
System info: host: 'piyush', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.13.0-46-generic', java.version: '1.8.0_40-internal'
Driver info: driver.version: FirefoxDriver
 at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start (NewProfileExtensionConnection.java:130)
    org.openqa.selenium.firefox.FirefoxDriver.startClient (FirefoxDriver.java:250)
    org.openqa.selenium.remote.RemoteWebDriver.<init> (RemoteWebDriver.java:110)
    org.openqa.selenium.firefox.FirefoxDriver.<init> (FirefoxDriver.java:195)
    org.openqa.selenium.firefox.FirefoxDriver.<init> (FirefoxDriver.java:190)
    org.openqa.selenium.firefox.FirefoxDriver.<init> (FirefoxDriver.java:186)
    org.openqa.selenium.firefox.FirefoxDriver.<init> (FirefoxDriver.java:99)
    sun.reflect.NativeConstructorAccessorImpl.newInstance0 (NativeConstructorAccessorImpl.java:-2)
    sun.reflect.NativeConstructorAccessorImpl.newInstance (NativeConstructorAccessorImpl.java:62)
    sun.reflect.DelegatingConstructorAccessorImpl.newInstance (DelegatingConstructorAccessorImpl.java:45)
    java.lang.reflect.Constructor.newInstance (Constructor.java:422)
    java.lang.Class.newInstance (Class.java:442)
    sun.reflect.NativeMethodAccessorImpl.invoke0 (NativeMethodAccessorImpl.java:-2)
    sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    java.lang.reflect.Method.invoke (Method.java:497)
    clojure.lang.Reflector.invokeMatchingMethod (Reflector.java:93)
    clojure.lang.Reflector.invokeNoArgInstanceMember (Reflector.java:313)
    clj_webdriver.core$new_webdriver_STAR_.invoke (core.clj:188)
    clj_webdriver.core$new_driver.invoke (core.clj:202)
    clj_webdriver.taxi$set_driver_STAR_.invoke (taxi.clj:26)
    clj_webdriver.taxi$set_driver_BANG_.invoke (taxi.clj:59)
    selenium_web.core_test/fn (core_test.clj:9)
    clojure.test$test_var$fn__7187.invoke (test.clj:704)
    clojure.test$test_var.invoke (test.clj:704)
    clojure.test$test_vars$fn__7209$fn__7214.invoke (test.clj:722)
    clojure.test$default_fixture.invoke (test.clj:674)
    clojure.test$test_vars$fn__7209.invoke (test.clj:722)
    clojure.test$default_fixture.invoke (test.clj:674)
    clojure.test$test_vars.invoke (test.clj:718)
    clojure.test$test_all_vars.invoke (test.clj:728)
    clojure.test$test_ns.invoke (test.clj:747)
    clojure.core$map$fn__4245.invoke (core.clj:2559)
    clojure.lang.LazySeq.sval (LazySeq.java:40)
    clojure.lang.LazySeq.seq (LazySeq.java:49)
    clojure.lang.Cons.next (Cons.java:39)
    clojure.lang.RT.boundedLength (RT.java:1654)
    clojure.lang.RestFn.applyTo (RestFn.java:130)
    clojure.core$apply.invoke (core.clj:626)
    clojure.test$run_tests.doInvoke (test.clj:762)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.core$apply.invoke (core.clj:624)
    user$eval85$fn__140$fn__171.invoke (form-init6043962041489599905.clj:1)
    user$eval85$fn__140$fn__141.invoke (form-init6043962041489599905.clj:1)
    user$eval85$fn__140.invoke (form-init6043962041489599905.clj:1)
    user$eval85.invoke (form-init6043962041489599905.clj:1)
    clojure.lang.Compiler.eval (Compiler.java:6703)
    clojure.lang.Compiler.eval (Compiler.java:6693)
    clojure.lang.Compiler.load (Compiler.java:7130)
    clojure.lang.Compiler.loadFile (Compiler.java:7086)
    clojure.main$load_script.invoke (main.clj:274)
    clojure.main$init_opt.invoke (main.clj:279)
    clojure.main$initialize.invoke (main.clj:307)
    clojure.main$null_opt.invoke (main.clj:342)
    clojure.main$main.doInvoke (main.clj:420)
    clojure.lang.RestFn.invoke (RestFn.java:421)
    clojure.lang.Var.invoke (Var.java:383)
    clojure.lang.AFn.applyToHelper (AFn.java:156)
    clojure.lang.Var.applyTo (Var.java:700)
    clojure.main.main (main.java:37)
Caused by: org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
{"langpack-en-ZA@firefox.mozilla.org":{"d":"/usr/lib/firefox/browser/extensions/langpack-en-ZA@firefox.mozilla.org.xpi","e":true,"v":"36.0.4","st":1426962281000},"{972ce4c6-7e08-4474-a285-3208198ce6fd}":{"d":"/usr/lib/firefox/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}","e":true,"v":"36.0.4","st":1427084855000,"mt":1426961704000},"langpack-en-GB@firefox.mozilla.org":{"d":"/usr/lib/firefox/browser/extensions/langpack-en-GB@firefox.mozilla.org.xpi","e":true,"v":"36.0.4","st":1426962281000}},"app-system-share":{"webapps-team@lists.launchpad.net":{"d":"/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/webapps-team@lists.launchpad.net","e":false,"v":"3.0.2","st":1397697896000,"mt":1397665356000},"{2e1445b0-2682-11e1-bfc2-0800200c9a66}":{"d":"/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/{2e1445b0-2682-11e1-bfc2-0800200c9a66}","e":false,"v":"2014.08.06.beta","st":1414992900000,"mt":1407283796000},"ubufox@ubuntu.com":{"d":"/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/ubufox@ubuntu.com","e":false,"v":"3.0","st":1421386237000,"mt":1420839872000}},"app-system-local":{"online-accounts@lists.launchpad.net":{"d":"/usr/lib/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/online-accounts@lists.launchpad.net","e":false,"v":"0.5","st":1397697896000,"mt":1390969548000}}}
1427189374023   addons.xpi  DEBUG   getModTime: Recursive scan of langpack-en-ZA@firefox.mozilla.org
1427189374024   addons.xpi  DEBUG   getModTime: Recursive scan of {972ce4c6-7e08-4474-a285-3208198ce6fd}
1427189374024   addons.xpi  DEBUG   getModTime: Recursive scan of langpack-en-GB@firefox.mozilla.org
1427189374025   addons.xpi  DEBUG   getInstallState changed: false, state: {"app-profile":{"fxdriver@googlecode.com":{"d":"/tmp/anonymous8984618018842301384webdriver-profile/extensions/fxdriver@googlecode.com","e":false,"v":"2.39.0","st":1427189365000,"mt":1427189365000}},"app-global":{"langpack-en-ZA@firefox.mozilla.org":{"d":"/usr/lib/firefox/browser/extensions/langpack-en-ZA@firefox.mozilla.org.xpi","e":true,"v":"36.0.4","st":1426962281000},"{972ce4c6-7e08-4474-a285-3208198ce6fd}":{"d":"/usr/lib/firefox/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}","e":true,"v":"36.0.4","st":1427084855000,"mt":1426961704000},"langpack-en-GB@firefox.mozilla.org":{"d":"/usr/lib/firefox/browser/extensions/langpack-en-GB@firefox.mozilla.org.xpi","e":true,"v":"36.0.4","st":1426962281000}},"app-system-share":{"webapps-team@lists.launchpad.net":{"d":"/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/webapps-team@lists.launchpad.net","e":false,"v":"3.0.2","st":1397697896000,"mt":1397665356000},"{2e1445b0-2682-11e1-bfc2-0800200c9a66}":{"d":"/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/{2e1445b0-2682-11e1-bfc2-0800200c9a66}","e":false,"v":"2014.08.06.beta","st":1414992900000,"mt":1407283796000},"ubufox@ubuntu.com":{"d":"/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/ubufox@ubuntu.com","e":false,"v":"3.0","st":1421386237000,"mt":1420839872000}},"app-system-local":{"online-accounts@lists.launchpad.net":{"d":"/usr/lib/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/online-accounts@lists.launchpad.net","e":false,"v":"0.5","st":1397697896000,"mt":1390969548000}}}
1427189374028   addons.xpi  DEBUG   No changes found
1427189374033   addons.xpi  DEBUG   Registering manifest for /usr/lib/firefox/browser/extensions/langpack-en-ZA@firefox.mozilla.org.xpi
1427189374034   addons.xpi  DEBUG   Registering manifest for /usr/lib/firefox/browser/extensions/langpack-en-GB@firefox.mozilla.org.xpi
1427189374035   addons.manager  DEBUG   Registering shutdown blocker for XPIProvider
1427189374036   addons.manager  DEBUG   Registering shutdown blocker for LightweightThemeManager
1427189374038   addons.manager  DEBUG   Registering shutdown blocker for OpenH264Provider
1427189374039   addons.manager  DEBUG   Registering shutdown blocker for PluginProvider
*** Blocklist::_preloadBlocklistFile: blocklist is disabled
1427189376827   addons.manager  DEBUG   Registering shutdown blocker for <unnamed-provider>

 at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start (NewProfileExtensionConnection.java:118)
    org.openqa.selenium.firefox.FirefoxDriver.startClient (FirefoxDriver.java:250)
    org.openqa.selenium.remote.RemoteWebDriver.<init> (RemoteWebDriver.java:110)
    org.openqa.selenium.firefox.FirefoxDriver.<init> (FirefoxDriver.java:195)
    org.openqa.selenium.firefox.FirefoxDriver.<init> (FirefoxDriver.java:190)
    org.openqa.selenium.firefox.FirefoxDriver.<init> (FirefoxDriver.java:186)
    org.openqa.selenium.firefox.FirefoxDriver.<init> (FirefoxDriver.java:99)
    sun.reflect.NativeConstructorAccessorImpl.newInstance0 (NativeConstructorAccessorImpl.java:-2)
    sun.reflect.NativeConstructorAccessorImpl.newInstance (NativeConstructorAccessorImpl.java:62)
    sun.reflect.DelegatingConstructorAccessorImpl.newInstance (DelegatingConstructorAccessorImpl.java:45)
    java.lang.reflect.Constructor.newInstance (Constructor.java:422)
    java.lang.Class.newInstance (Class.java:442)
    sun.reflect.NativeMethodAccessorImpl.invoke0 (NativeMethodAccessorImpl.java:-2)
    sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    java.lang.reflect.Method.invoke (Method.java:497)
    clojure.lang.Reflector.invokeMatchingMethod (Reflector.java:93)
    clojure.lang.Reflector.invokeNoArgInstanceMember (Reflector.java:313)
    clj_webdriver.core$new_webdriver_STAR_.invoke (core.clj:188)
    clj_webdriver.core$new_driver.invoke (core.clj:202)
    clj_webdriver.taxi$set_driver_STAR_.invoke (taxi.clj:26)
    clj_webdriver.taxi$set_driver_BANG_.invoke (taxi.clj:59)
    selenium_web.core_test/fn (core_test.clj:9)
    clojure.test$test_var$fn__7187.invoke (test.clj:704)
    clojure.test$test_var.invoke (test.clj:704)
    clojure.test$test_vars$fn__7209$fn__7214.invoke (test.clj:722)
    clojure.test$default_fixture.invoke (test.clj:674)
    clojure.test$test_vars$fn__7209.invoke (test.clj:722)
    clojure.test$default_fixture.invoke (test.clj:674)
    clojure.test$test_vars.invoke (test.clj:718)
    clojure.test$test_all_vars.invoke (test.clj:728)
    clojure.test$test_ns.invoke (test.clj:747)
    clojure.core$map$fn__4245.invoke (core.clj:2559)
    clojure.lang.LazySeq.sval (LazySeq.java:40)
    clojure.lang.LazySeq.seq (LazySeq.java:49)
    clojure.lang.Cons.next (Cons.java:39)
    clojure.lang.RT.boundedLength (RT.java:1654)
    clojure.lang.RestFn.applyTo (RestFn.java:130)
    clojure.core$apply.invoke (core.clj:626)
    clojure.test$run_tests.doInvoke (test.clj:762)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.core$apply.invoke (core.clj:624)
    user$eval85$fn__140$fn__171.invoke (form-init6043962041489599905.clj:1)
    user$eval85$fn__140$fn__141.invoke (form-init6043962041489599905.clj:1)
    user$eval85$fn__140.invoke (form-init6043962041489599905.clj:1)
    user$eval85.invoke (form-init6043962041489599905.clj:1)
    clojure.lang.Compiler.eval (Compiler.java:6703)
    clojure.lang.Compiler.eval (Compiler.java:6693)
    clojure.lang.Compiler.load (Compiler.java:7130)
    clojure.lang.Compiler.loadFile (Compiler.java:7086)
    clojure.main$load_script.invoke (main.clj:274)
    clojure.main$init_opt.invoke (main.clj:279)
    clojure.main$initialize.invoke (main.clj:307)
    clojure.main$null_opt.invoke (main.clj:342)
    clojure.main$main.doInvoke (main.clj:420)
    clojure.lang.RestFn.invoke (RestFn.java:421)
    clojure.lang.Var.invoke (Var.java:383)
    clojure.lang.AFn.applyToHelper (AFn.java:156)
    clojure.lang.Var.applyTo (Var.java:700)
    clojure.main.main (main.java:37)

Ran 1 tests containing 1 assertions.
0 failures, 1 errors.
Tests failed.

1 个答案:

答案 0 :(得分:2)

这通常与clj-webdriver没有包含最新版本的selenium有关。 Firefox更新经常对webdriver连接进行重大更改,只有最新的selenium版本支持。

更改clj-webdriver中的project.clj依赖关系以排除包含的selenium,并添加latest selenium version的相关性(发布时为2.45.0)。

[clj-webdriver "0.6.1" :exclusion [com.github.detro.ghostdriver/phantomjsdriver
                                   org.seleniumhq.selenium/selenium-server
                                   org.seleniumhq.selenium/selenium-java
                                   org.seleniumhq.selenium/selenium-remote-driver]]
[org.seleniumhq.selenium/selenium-server "2.45.0"]
[org.seleniumhq.selenium/selenium-java "2.45.0"]
[org.seleniumhq.selenium/selenium-remote-driver "2.45.0"]