Phantomjs Alternative - RFC6455 WebSocket Standard

2019-08-05 03:52发布

问题:

Unit Testing javascript frontend with phantomjs however the websockets unable to authenticate (401) requests. Did some research found that Phantomjs using older Webkit with older standard. What Alternative headless browser could I use instead of Phantomjs with the latest Websocket Standards?

回答1:

http://slimerjs.org/ has the same API and can be run headlessly with xvfb. It runs the gecko engine through your installed firefox. So you will have web socket support.

There is also http://triflejs.org/ with the same PhantomJS API, but is not yet done/feature complete.