Windows selenium服务器:意外状态服务\u已暂停

Windows selenium服务器:意外状态服务\u已暂停,windows,symfony,selenium,codeception,Windows,Symfony,Selenium,Codeception,在Windows 10中尝试将Selenium Server作为服务安装(使用nssm)失败,在nssm启动Selenium Server上出现意外状态服务\u暂停。Selenium是Selenium-server-standalone-2.53.0.jar。nssm为2.24。操作系统是Windows101511,32位 事件查看器说 服务selenium服务器运行的时间少于1500毫秒。重新启动 将延迟16000毫秒 目标是使用codeception运行Symfony应用程序的验收测试。Ph

在Windows 10中尝试将Selenium Server作为服务安装(使用nssm)失败,在
nssm启动Selenium Server
上出现
意外状态服务\u暂停
。Selenium是Selenium-server-standalone-2.53.0.jar。nssm为2.24。操作系统是Windows101511,32位

事件查看器说

服务selenium服务器运行的时间少于1500毫秒。重新启动 将延迟16000毫秒


目标是使用codeception运行Symfony应用程序的验收测试。PhantomJS已被放弃,因为它不支持javascript弹出窗口。

返回问题并进行更多搜索揭示了问题所在。虽然这已经很旧了,但关键功能仍然相同(请确保替换
*
,以提供服务器jar的精确文件名,例如
selenium-server-standalone-3.0.0-beta4.jar
):

  • 在注册表中,修改键
    HKEY\U LOCAL\U MACHINE\SYSTEM\CurrentControlSet\Services\selenium server\Parameters\AppDirectory
    ,以显示selenium server standalone*.jar的保存目录
  • 同时将密钥
    HKEY\U LOCAL\U MACHINE\SYSTEM\CurrentControlSet\Services\selenium server\Parameters\AppParameters
    修改为
    -Xrs-jar selenium server standalone*.jar-端口8888

  • 我能够通过在geoB提到的“AppParameters”注册表字段中只包含以下内容来启动selenium服务器服务:

    -jar selenium-server-standalone-3.0.1.jar
    
    似乎-Xrs不是一个有效的参数,它阻止了jar的启动。与-interactive相同(如果您遵循Selenium的网站说明()