Selenium Standalone服务器未运行Selenium IDE测试

时间:2017-06-22 05:37:57

标签: java linux selenium

在测试服务器上我使用以下命令手动启动selenium:

java -Dwebdriver.gecko.driver=/opt/selenium/driver/geckodriver -jar /opt/selenium/3.4/selenium-html-runner-3.4.0.jar -userExtensions user-extensions.js -htmlSuite '*firefox' http://www.die_domain1.de 'TestSuite.html' 'out.html'

并获得以下消息

Multi-window mode is longer used as an option and will be ignored.
1497948704898   geckodriver     INFO    Listening on 127.0.0.1:29617
1497948705730   geckodriver::marionette INFO    Starting browser /opt/firefox27/firefox with args ["-marionette"]
Error: no display specified
Jun 20, 2017 10:52:46 AM org.openqa.selenium.server.htmlrunner.HTMLLauncher mainInt
WARNUNG: Test of browser failed: *firefox
org.openqa.selenium.WebDriverException: connection refused
Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
System info: host: 'the-devmachine', ip: '111.222.333.444', os.name: 'Linux', os.arch: 'amd64', os.version: '3.2.0-4-amd64', java.version: '1.8.0_102'
Driver info: driver.version: FirefoxDriver
remote stacktrace: stack backtrace:
   0:           0x57af6d - backtrace::backtrace::trace::h59229d13f6a8837d
   1:           0x57b0c2 - backtrace::capture::Backtrace::new::h23089c033eded8f0
   2:           0x4472fc - webdriver::error::WebDriverError::new::h0b226f62ff19e120
   3:           0x4514c1 - geckodriver::marionette::MarionetteHandler::create_connection::hd468f55550be3626
   4:           0x426854 - <webdriver::server::Dispatcher<T, U>>::run::h62323eaff3e71b8c
   5:           0x40935c - std::panicking::try::do_call::hb7e6ff6d130a72cf
   6:           0x5de23a - panic_unwind::__rust_maybe_catch_panic
                        at /checkout/src/libpanic_unwind/lib.rs:98
   7:           0x41c003 - <F as alloc::boxed::FnBox<A>>::call_box::hd6ceeda495c4fa0e
   8:           0x5d68d4 - alloc::boxed::{{impl}}::call_once<(),()>
                        at /checkout/src/liballoc/boxed.rs:650
                         - 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
        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:423)
        at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$new$0(W3CHandshakeResponse.java:57)
        at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$getResponseFunction$2(W3CHandshakeResponse.java:104)
        at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$22(ProtocolHandshake.java:365)
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
        at java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958)
        at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
        at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:498)
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
        at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:464)
        at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:368)
        at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:159)
        at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:142)
        at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
        at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:637)
        at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:250)
        at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:236)
        at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:137)
        at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:191)
        at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:108)
        at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:137)
        at org.openqa.selenium.server.htmlrunner.HTMLLauncher.createDriver(HTMLLauncher.java:285)
        at org.openqa.selenium.server.htmlrunner.HTMLLauncher.runHTMLSuite(HTMLLauncher.java:107)
        at org.openqa.selenium.server.htmlrunner.HTMLLauncher.mainInt(HTMLLauncher.java:245)
        at org.openqa.selenium.server.htmlrunner.HTMLLauncher.main(HTMLLauncher.java:273)

我改变了主机和ip。 所有其他数据都是相同的。 执行该命令后,将创建一个空文件夹out.html

似乎FireFox驱动程序无法连接&#34;?

org.openqa.selenium.WebDriverException: connection refused
...
2:           0x4472fc - webdriver::error::WebDriverError::new::h0b226f62ff19e120


Selenium:selenium-html-runner-3.4.0.jar,独立版本
操作系统:Debian 7.11(wheezy)
浏览器:Mozilla Firefox 27.0.1

有人可以帮我解决这个问题吗?

问候

0 个答案:

没有答案