[英]Headless browser for FireFox (similar to PhantomJS for Chrome)
Is there a headless browser for FireFox (similar to PhantomJS for Chrome), that can be used with Karma? 是否有适用于Karma的FireFox无头浏览器(类似于Chrome的PhantomJS)?
Using the Grunt FireFox Launcher plugin causes, the browser to be launched every single time we build our JavaScript using GRUNT. 使用Grunt FireFox Launcher插件导致,每次我们使用GRUNT构建JavaScript时,浏览器都会启动。 We would like something which is more silent and redirects its output to the console window.
我们想要更安静的内容,并将其输出重定向到控制台窗口。 Very similar to how PhantomJS works for Chrome.
与PhantomJS在Chrome上的工作方式非常相似。 Any ideas?
有任何想法吗?
First and foremost: Phantomjs does not launch Chrome. 首先,Phantomjs不会启动Chrome。 Phantomjs is a javascript implementation of Webkit.
Phantomjs是Webkit的JavaScript实现。
Now, if you want to run firefox headlessly you can run it inside XVFB. 现在,如果您想无头运行Firefox,则可以在XVFB中运行它。 Without knowing anything about your build since you haven't included that, I'll just link to node xvfb which is probably a good place to get started: https://github.com/proxv/node-xvfb
由于您还不了解构建,因此我不知道任何相关信息,我将其链接到节点xvfb,这可能是一个入门的好地方: https : //github.com/proxv/node-xvfb
PhantomJS runs webkit not Chrome. PhantomJS运行Webkit而不是Chrome。 It is the same engine but Chrome adds quite a bit more (ie Intl support).
它是相同的引擎,但Chrome增加了很多(即Intl支持)。 There is no equivalent for Gecko -- the equivalent of webkit for Firefox.
Gecko没有与之等效的产品-与Firefox相同的webkit。 On Linux or OS X, you can use xvfb with Firefox to stop the window from popping up.
在Linux或OS X上,可以将xvfb与Firefox配合使用来阻止窗口弹出。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.