【发布时间】:2018-01-10 20:23:42
【问题描述】:
我在 geckodriver 0.19.1 上使用无头 firefox 59.x 插件和 selenium 3.5.3
有时,我的一项测试失败,似乎无法创建 geckodriver 会话。这是错误消息:
connection refused
Build info: version: '3.5.3', revision: 'a88d25fe6b', time: '2017-08-29T12:42:44.417Z'
System info: host: '5ed435662ab', ip: '192.1.0.2', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-1043-aws', java.version: '1.8.0_111'
Driver info: driver.version: RemoteWebDriver
remote stacktrace: stack backtrace:
0: 0x4edb3c - backtrace::backtrace::trace::hc4bd56a2f176de7e
1: 0x4edb72 - backtrace::capture::Backtrace::new::he3b2a15d39027c46
2: 0x440ac8 - webdriver::error::WebDriverError::new::ha0fbd6d1a1131b43
3: 0x447ba9 - geckodriver::marionette::MarionetteHandler::create_connection::hf0532ddb9e159684
4: 0x428570 - <webdriver::server::Dispatcher<T, U>>::run::h2119c674d7b88193
5: 0x4029b9 - std::sys_common::backtrace::__rust_begin_short_backtrace::h21d98a9ff86d4c25
6: 0x40be65 - std::panicking::try::do_call::h5cff0c9b18cfdbba
7: 0x5e6a6c - panic_unwind::__rust_maybe_catch_panic
at /checkout/src/libpanic_unwind/lib.rs:99
8: 0x41eb22 - <F as alloc::boxed::FnBox<A>>::call_box::h413eb1d9d9f1c473
9: 0x5df13b - alloc::boxed::{{impl}}::call_once<(),()>
at /checkout/src/liballoc/boxed.rs:692
- std::sys_common::thread::start_thread
at /checkout/src/libstd/sys_common/thread.rs:21
- std::sys::imp::thread::{{impl}}::new::thread_start
at /checkout/src/libstd/sys/unix/thread.rs:84
这里唯一有用的信息是“连接被拒绝”吗?我怎样才能获得更多信息?
请注意,已经创建了一个问题here,以停止显示带有错误的令人困惑的 rust 堆栈跟踪。这还会显示更多错误信息吗?
有没有办法配置 geckodriver 以获取这些故障的日志以便我知道原因?
有一次原因是缺少 GTK3。但这次不是。
【问题讨论】:
标签: java firefox marionette selenium-firefoxdriver geckodriver