我正在尝试运行一组nightwatch.js测试脚本,我在本地计算机(Mac)上创建了它们,但是我需要让它们在运行centOS 7的Linux服务器上运行。 我已确保nightwatch.json文件具有独立的硒服务器和壁虎驱动程序的正确路径。
这是我得到的错误:
从硒服务器检索新会话时出错
连接被拒绝!硒服务器启动了吗? {值:{消息: “进程意外关闭,状态为:1 \ n内部版本信息:版本:'3.9.1',修订版:'63f7b50',时间: '2018-02-07T22:42:28.403Z'\ n系统信息:主机: 'sfdc-sonar-01.devdc.vocal-dev.com',ip:'10 .71.20.168',os.name: 'Linux',os.arch:'amd64',os.version:'3.10.0-862.3.3.el7.x86_64', java.version:'1.8.0_191'\ n驱动器信息:driver.version: 未知\ n远程stacktrace:堆栈回溯:\ n 0:0x4f388c -backtrace :: backtrace :: trace :: h736111741fa0878e \ n 1:0x4f38c2-backtrace :: capture :: Backtrace :: new :: h63b8a5c0787510c9 \ n
2:0x442d88- webdriver ::错误:: WebDriverError ::新:: hea6d4dbf778b2b24 \ n 3:
0x44a8c3- geckodriver :: marionette :: MarionetteHandler :: create_connection :: hf8b6061dba65cdd0 \ n 4:0x42ac91-> :: run :: hba9181b5aacf8f04 \ n 5:0x402c59- std :: sys_common :: backtrace :: __ rust_begin_short_backtrace :: h19de262639927233 \ n 6:0x40c065- std :: panicking :: try :: do_call :: h6c1659fc4d01af51 \ n 7:
0x5e38ec-panic_unwind :: __ rust_maybe_catch_panic \ n
在/checkout/src/libpanic_unwind/lib.rs:98\n 8:0x420d32- > :: call_box :: h953e5f59694972c5 \ n 9:
0x5dc00b-分配::装箱:: {{impl}} :: call_once <(),()> \ n
在/checkout/src/liballoc/boxed.rs:661\n- std :: sys_common :: thread :: start_thread \ n位于 /checkout/src/libstd/sys_common/thread.rs:21\n
-std :: sys :: imp :: thread :: {{impl}} :: new :: thread_start \ n在/checkout/src/libstd/sys/unix/thread.rs:84“, 错误:“未知错误”},状态:13}
有人熟悉吗?我不太确定如何调试它,我知道问题是配置/设置问题,因为在Mac上可以正常工作。
这是我的nightwach.json文件:
{
"src_folders": [
"tests"
],
"output_folder": "reports",
"page_objects_path": [
"page-objects"
],
"selenium": {
"start_process": true,
"server_path": "./bin/selenium-server-standalone-3.14.0.jar",
"log_path": "",
"port": 4444,
"cli_args": {
"webdriver.gecko.driver": "./bin/geckodriver"
}
},
"test_settings": {
"default": {
"launch_url": "http://localhost",
"selenium_port": 4444,
"selenium_host": "10.71.20.168",
"desiredCapabilities": {
"browserName": "firefox",
"javascriptEnabled": true,
"acceptSslCerts": true,
"alwaysMatch" : {
"moz:firefoxOptions": {
"args": ["-headless", "no-sandbox", "disable-gpu"]
}
}
}
}
}
}