Selenium 3.7.1 webdriver错误:等待驱动程序服务器启动时超时。仅Windows

尼科斯

我在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"
}

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

org.openqa.selenium.WebDriverException:等待驱动程序服务器从Selenium和Java启动时超时

致命错误:找不到Facebook \ WebDriver \ Exception \ UnknownServerException:等待驱动程序服务器启动以ChromeDriver和Selenium超时

Selenium Chrome浏览器org.openqa.selenium.WebDriverException:等待驱动程序服务器启动时超时

ChromeDriver在Java中使用Selenium的问题-等待驱动程序服务器启动的超时

Selenium 总是在等待服务器启动时超时

Gradle 3和Java 7的Spring Boot在服务器启动时失败

在函数中调用驱动程序时,如何在 Python3 中保持 Selenium Webdriver 浏览器打开?

如何使用Selenium Web驱动程序捕获服务器错误页面?

Tomcat7在服务器启动时启动

如何仅获取表中的前3个元素?Selenium Web驱动程序

我想通过 python selenium 库显示 **href** 上下文 1,2,3,4,5,6,7,8,9

Selenium Marionette驱动程序第二次启动时出现UnreachableBrowserException

Chrome Webdriver Selenium内存错误-Python 3

Selenium Chrome WebDriver无法在端口上启动驱动程序服务

Selenium超时,正在等待位于http://192.168.1.34:62334/wd/hub的WebDriver服务器

使用 Selenium、IEDriverServer 通过 Java 执行测试时出现“IE 驱动程序的命令行服务器已停止工作”错误

我想把数组 [1,2,3,4,5,6,7,8,9,10,11] 变成数组 [1,2,3,4,5,6,7,8,9,1 ,0,1,1] 仅使用此算法

Python Selenium TypeError 期望 3 个参数 (1given)

使用Selenium驱动程序的Mocha超时

如何在Selenium 3中执行Webdriver支持的Selenium?

Windows 7在RAID1中安装2x3TB的问题

量角器:E/启动器 - 错误:WebDriverError:等待驱动程序服务器启动超时

Python:Selenium分页仅将第1页保存到列表中,而不保存第2、3页等

安装Windows 7 Service Pack 1后启动时出现蓝屏

使用Selenium和Java无法找到元素:{“ method”:“ xpath”,“ selector”:“ // li [@ id =” tablist1-tab3“]”}错误

Python3 Selenium Webdriver 在初始化期间超时

R:如何制作序列(1,1,1,2,3,3,3,4,5,5,5,6,7,7,7,8)

SMB 3和Windows 7

三星M.2上的Windows 7安装会在首次重新启动时识别使用驱动程序失败