在本地主机上使用 Firefox 运行 WatiN
我尝试在本地主机上使用 Firefox 运行 watin,但似乎出现错误:
WatiN.Core.Native.Mozilla.FireFoxException:无法连接到 jssh 服务器,请确保您已正确安装 jssh.xpi 插件
我正在使用 firefox 3.6 并且已安装该插件。当我不使用本地主机时它可以工作。这个问题有解决方法/解决方案吗?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
正如文档所述,您需要安装 jssh.xpi 插件,该链接有分步说明。
它没有提供最新的 jssh 链接,也没有权限,但请查看 Watir 的说明,或者如果是 Windows Firefox 3.6,直接下载
Like the documentation says you need to install the jssh.xpi plugin, that link has step by step instructions.
It does not give latest jssh link and there is no authority for it but have a look to the matrix in step 2 of instructions for Watir or if it is Windows Firefox 3.6, download directly
请注意,如果您通过 NuGet 安装 WatiN,则必须在
packages
文件夹中找到.xpi
文件。Note that if you installed WatiN via NuGet, then you'll have to find the
.xpi
file in yourpackages
folder.我偶尔会得到这个。为此提交了一个错误: -
http:// /sourceforge.net/tracker/?func=detail&aid=3356073&group_id=167632&atid=843727
I get this occasionally. There's been a bug submitted for this: -
http://sourceforge.net/tracker/?func=detail&aid=3356073&group_id=167632&atid=843727
我在服务器上也遇到了同样的问题。我可以在自己的登录下正常运行该应用程序,但是当设置为计划任务时,它就无法工作。最终发现,由于该应用程序在不同的登录名(域服务帐户)下运行,因此它没有访问 JSSH Firefox 插件的权限。
这篇博文更详细地描述了情况(和解决方案),但基本上,当您安装 FireFox 附加组件,它是为当前用户安装的,但不是全局安装的。该附加组件必须全局安装(即所有用户)才能工作。
我无法使用链接中提到的命令行选项,因此我使用服务帐户登录到服务器,并手动添加 JSSH 插件。
在您的情况下,使用“localhost”可能会强制您的应用程序在不同的帐户下运行,该帐户无法访问 FireFox 中的 JSSH 插件。
I had this same problem on server. I could run the application fine under my own login, but when set up as a scheduled task, it wouldn't work. Eventually worked out that because the app was running under a different login (a domain service account), it didn't have permission to access the JSSH Firefox plugin.
This Blog Post describes the situation (and resolution) in much more detail, but basically, when you install an add-on to FireFox, it is installed for the current user, but not globally. The add-on must be installed globally (i.e. for all users) to work.
I couldn't get the command line option mentioned in the link to work, so I logged onto the server using the service account, and added the JSSH add-on manually.
In your case, it could be that using "localhost", is forcing your application to run under a different account, which does not have access to the JSSH plugin in FireFox.