想像这样如何与CasperJS/PhantomJS脚本中的用户进行交互?
system = require "system"
system.stdout.write "What's your name? "
name = system.stdin.readLine()
system.stdout.writeLine "Hello, #{name}"
脚本要通过
casperjs name.coffee
运行
我希望能够在用于运行脚本的终端的用户交互,但我陷入readLine()调用中。