Tag: 咖啡脚本

无法启动Selenium + PhantomJS / GhostDriver作为subprocess

我有一个Node脚本,我想使用child_process模块来获取运行PhantomJS的GhostDriver的Selenium服务器。 我需要模块: Child = require "child_process" 以下是我如何尝试启动服务器并将GD附加到它(在Coffeescript中): @Selenium = new Child.exec "java -jar selenium/selenium-server-standalone-2.44.0.jar -role hub -port 4444", (error, stdout, stderr) => console.log stdout console.log error if error @PhantomJS = new Child.exec "phantomjs –webdriver=8080 –webdriver-selenium-grid-hub=http://127.0.0.1:4444", (error, stdout, stderr) => console.log stdout console.log error if error @PhantomJS的stdout是这样的: PhantomJS is launching GhostDriver… [ERROR – 2014-12-10T18:51:27.587Z] GhostDriver – […]