gpt4 book ai didi

windows - Selenium 3.7.1 webdriver 错误 : Timed out waiting for driver server to start. 仅限 Windows

转载 作者:可可西里 更新时间:2023-11-01 11:45:14 27 4
gpt4 key购买 nike

我在 Windows 7 上出现以下错误,但在 mac 上没有。它是由守夜人开始的。有什么想法吗?

Starting selenium server... started - PID:  17228
[Test] Test Suite
=============================
Running: TestWithSettingSearchValue
Error retrieving a new session from the selenium server
Connection refused! Is selenium server started?
{ value:
{ stacktrace: 'org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start.\nBuild info: version: \'3.7.1\', revision: \'8a0099a\', time: \'2017-11-06T21:07:36.161Z\'\nSystem info: host: \'W7D0596\', ip: \'172.21.1.54\', os.name: \'Windows 7\', os.arch: \'amd64\', os.version: \'6.1\', java.version: \'1.8.0_91\'\nDriver info: driver.version: unknown\r\n\tat org.openqa.selenium.remote.service.DriverService.waitUntilAvailable(DriverService.java:192)\r\n\tat org.openqa.selenium.remote.service.DriverService.start(DriverService.java:178)\r\n\tat org.openqa.selenium.remote.server.ServicedSession$Factory.apply(ServicedSession.java:207)\r\n\tat org.openqa.selenium.remote.server.ActiveSessionFactory.lambda$apply$11(ActiveSessionFactory.java:167)\r\n\tat

我们的package.json

{
"name": "nightwatch",
"version": "1.0.0",
"description": "",
"main": "index.js",
"directories": {
"test": "tests"
},
"scripts": {
"test": "nightwatch"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"chromedriver": "^2.33.2",
"nightwatch": "^0.9.16",
"selenium-server-standalone-jar": "^3.7.1"
}
}

守夜人:

{
"src_folders" : ["tests"],
"output_folder" : "reports",
"custom_commands_path" : "",
"custom_assertions_path" : "",
"page_objects_path" : "",
"globals_path" : "",

"selenium" : {
"start_process" : true,
"server_path" : "./node_modules/selenium-server-standalone-jar/jar/selenium-server-standalone-3.7.1.jar",
"log_path" : "",
"host" : "127.0.0.1",
"port" : 4444,
"cli_args" : {
"webdriver.chrome.driver" : "./node_modules/chromedriver/bin/chromedriver",
"webdriver.ie.driver" : ""
}
},

"test_settings" : {
"default" : {
"launch_url" : "http://127.0.0.1:3000/",
"selenium_port" : 4444,
"selenium_host" : "localhost",
"silent": true,
"screenshots" : {
"enabled" : false,
"path" : ""
},
"desiredCapabilities": {
"browserName": "chrome",
"javascriptEnabled": true,
"acceptSslCerts": true
}
}
}
}

最佳答案

您必须使用文件扩展名才能在 Windows 上运行。更新您的配置并将 .exe 添加到 chromedriver 路径,它应该开始工作。

"cli_args" : {
"webdriver.chrome.driver" : "./node_modules/chromedriver/lib/chromedriver/chromedriver.exe"
}

关于windows - Selenium 3.7.1 webdriver 错误 : Timed out waiting for driver server to start. 仅限 Windows,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47556952/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com