windows-services - 将 Selenium RC 作为 Windows 服务运行

标签 windows-services selenium-rc

我正在尝试让 Selenium 设置为作为 Windows 服务运行。似乎没问题,但似乎无法正常运行。

使用我做过的windows工具包:

"C:\Program Files\Windows Resource Kits\Tools\instsrv.exe" SeleniumRC
"C:\Program Files\Windows Resource Kits\Tools\srvany.exe" -a [SeleniumUser] -p [SeleniumUserPass]

将以下内容保存为.reg文件(然后双击它)

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SeleniumRC\Parameters]
"Application"="java.exe"
"AppDirectory"="C:\\Program Files\\selenium-server-1.0.3"
"AppParameters"="-Xrs -jar selenium-server.jar"

我的 SeleniumUser 已被授予以服务身份登录的权限。

在 Services MMC 中启动服务

但是当我开始运行我的测试中心(用于调用和运行测试的简单 UI)时,我单击运行测试,然后它就在页面加载漩涡状的东西上,并说等待服务器的响应。

它几乎就像在运行一样,但它没有连接。

如果我通过命令行运行 java 调用,它会告诉我另一个服务正在该端口上运行。

如果我停止 windows 服务然后再次运行该命令,它会工作(我的测试也是如此)

有人知道发生了什么事吗?

最佳答案

我能够使用 nssm(Non-Sucking Service Manager)安装它。您只需要提供 java 作为应用程序,然后提供选项 -jar -role hub。然后从服务菜单启动服务。

nssm 链接 - http://nssm.cc/

关于windows-services - 将 Selenium RC 作为 Windows 服务运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4164090/

相关文章:

ruby - 将 Ruby 程序作为 Windows 服务运行?

java - 将 Java 应用程序作为 Windows 服务启动时出错

java - Selenium RC 403 错误 - 禁止代理

Selenium 的 Firefox 错误 - 无法访问死对象

java - Selenium WebDriver 中 selenium.waitForPageToLoad ("30000"的等效代码是什么?

c# - 我可以开发既可以是 Windows 服务又可以是(<任何类型>)应用程序的 Windows 服务吗?

c# - 在 Windows 服务 C# 中引发自定义类事件

python - 如何在 xpath 字符串中使用 unicode? (统一码编码错误)

java - 在 Selenium 中获取函数 isElementPresent 的空指针异常...

.net - 托管在 Windows 服务中的 Kestrel 的 Windows 身份验证