当我使用geckodriver 1.14.1在firefox上运行测试时,收到错误消息“ connect ECONNREFUSED 127.0.0.1:4444”。该错误总是在15个测试后发生(我可以删除一些错误,并在另一个测试上得到此错误)。固定数量的测试后,硒服务器似乎停止工作。每次新测试开始时,用户都将注销并再次登录。镀铬的一切都很好。
我正在尝试从1.14到1.11的不同版本的geckodriver-没有任何效果。这是我在守夜人中的配置:
"firefox": {
"launch_url": "https://106.120.117.202:8443",
"selenium_port": 4444,
"end_session_on_fail": true,
"abortOnAssertionFailure": false,
"skip_testcases_on_fail": false,
"screenshots": {
"enabled": true,
"path": "./screenshots-tests-fail/",
"on_failure": true,
"on_error": true
},
"default_path_prefix": "",
"desiredCapabilities": {
"alwaysMatch": {
"browserName": "firefox",
"acceptInsecureCerts": true,
"moz:firefoxOptions": {
"args": [
"-width 1920",
"-height 1080"
]
}
}
}
}
错误堆栈跟踪:
GET /session/f4e95b68-920f-475f-86ba-c2830f441acd/element/b5cbbeac-
301b-4174-8e93-4c1dfc9a88e8/displayed - ECONNREFUSED
Error: connect ECONNREFUSED 127.0.0.1:4444
Error while running .isElementDisplayed() protocol action: An unknown error has occurred.