Capture video with Poltergeist, PhantomJS and Capybara

淺唱寂寞╮ 提交于 2019-12-23 09:52:50

问题


Is it possible to capture video with PhantomJS in combination with the gems Poltergeist, Capybara and Cucumber?

I have used the Headless gem previously, which put a video in a specific folder in case a scenario failed. If all went well, no video was stored.

Headless uses Xvfb and ffmpeg. Can ffmpeg also be used to provide the same functionality as shown here: https://github.com/leonid-shevtsov/headless/blob/master/lib/headless/video/video_recorder.rb

I basically need the same functionality, but I have no idea how to go about it. Any advice is highly appreciated.


回答1:


This is a PhantomJS tutorial to record videos: http://mindthecode.com/recording-a-website-with-phantomjs-and-ffmpeg




回答2:


You can't capture video with PhantomJS, but I guess you could hook something up to take a screenshot on each step that Capybara takes (you'd need to dig into the code to do that though).



来源:https://stackoverflow.com/questions/16887214/capture-video-with-poltergeist-phantomjs-and-capybara

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!