硒webdirver / WebDriverError:连接被拒绝

时间:2019-01-11 03:02:12

标签: node.js selenium firefox webdriver

我将firefox,webdriber和geckodriver与nodejs一起使用,但是遇到一些错误我该如何解决?

 new webdriver.Builder().forBrowser('firefox').build().then(async (driver) => { 

这是错误消息

{ WebDriverError: connection refused
    at Object.throwDecodedError (/home/whghdud17/fingo/node_modules/selenium-webdriver/lib/error.js:550:15)
    at parseHttpResponse (/home/whghdud17/fingo/node_modules/selenium-webdriver/lib/http.js:542:13)
    at Executor.execute (/home/whghdud17/fingo/node_modules/selenium-webdriver/lib/http.js:468:26)
    at process._tickCallback (internal/process/next_tick.js:68:7)
  name: 'WebDriverError',
  remoteStacktrace:
   'stack backtrace:\n   0:           0x5787ed - backtrace::backtrace::trace::h59229d13f6a8837d\n   1:           0x578942 - backtrace::capture::Backtrace::new::h23089c033eded8f0\n   2:           0x4463cc - webdriver::error::WebDriverError::new::hd11f864b1fdf4510\n   3:           0x450591 - geckodriver::marionette::MarionetteHandler::create_connection::h6f7058fccafe4367\n   4:           0x425c32 - <webdriver::server::Dispatcher<T, U>>::run::h8f5348b8f5f7c053\n   5:           0x40b22c - std::panicking::try::do_call::hb67c6fb6bcd96195\n   6:           0x5dc20a - panic_unwind::__rust_maybe_catch_panic\n                        at /checkout/src/libpanic_unwind/lib.rs:98\n   7:           0x41b943 - <F as alloc::boxed::FnBox<A>>::call_box::h4100941edc372034\n   8:           0x5d48a4 - alloc::boxed::{{impl}}::call_once<(),()>\n                        at /checkout/src/liballoc/boxed.rs:650\n                         - std::sys_common::thread::start_thread\n                        at /checkout/src/libstd/sys_common/thread.rs:21\n                         - std::sys::imp::thread::{{impl}}::new::thread_start\n                        at /checkout/src/libstd/sys/unix/thread.rs:84' }

0 个答案:

没有答案