When I'm trying to execute a simple script, I get the following error :
/usr/local/share/gems/gems/headless-2.2.0/lib/headless.rb:193:in read_nonblock': end of file reached (EOFError) from /usr/local/share/gems/gems/headless-2.2.0/lib/headless.rb:193:inensure_xvfb_is_running'
from /usr/local/share/gems/gems/headless-2.2.0/lib/headless.rb:184:in launch_xvfb' from /usr/local/share/gems/gems/headless-2.2.0/lib/headless.rb:172:inblock in pick_available_display'
from /usr/local/share/gems/gems/headless-2.2.0/lib/headless.rb:168:in each' from /usr/local/share/gems/gems/headless-2.2.0/lib/headless.rb:168:inpick_available_display'
from /usr/local/share/gems/gems/headless-2.2.0/lib/headless.rb:164:in attach_xvfb' from /usr/local/share/gems/gems/headless-2.2.0/lib/headless.rb:88:ininitialize'
from record.rb:5:in new' from record.rb:5:in'
Hi,
When I'm trying to execute a simple script, I get the following error :
/usr/local/share/gems/gems/headless-2.2.0/lib/headless.rb:193:in'
read_nonblock': end of file reached (EOFError) from /usr/local/share/gems/gems/headless-2.2.0/lib/headless.rb:193:in
ensure_xvfb_is_running' from /usr/local/share/gems/gems/headless-2.2.0/lib/headless.rb:184:inlaunch_xvfb' from /usr/local/share/gems/gems/headless-2.2.0/lib/headless.rb:172:in
block in pick_available_display' from /usr/local/share/gems/gems/headless-2.2.0/lib/headless.rb:168:ineach' from /usr/local/share/gems/gems/headless-2.2.0/lib/headless.rb:168:in
pick_available_display' from /usr/local/share/gems/gems/headless-2.2.0/lib/headless.rb:164:inattach_xvfb' from /usr/local/share/gems/gems/headless-2.2.0/lib/headless.rb:88:in
initialize' from record.rb:5:innew' from record.rb:5:in
My script :
require 'rubygems' require 'headless' require 'selenium-webdriver'
headless = Headless.new(:dimensions => '1280x720', :video => { :frame_rate => 30, :codec => 'libx264', :provider => 'ffmpeg', :provider_binary_path => 'ffmpeg' }) headless.start
driver = Selenium::WebDriver.for :firefox driver.manage().window().maximize() driver.navigate.to 'https://www.livewebinar.com/BotAccess/47' puts driver.title
headless.video.start_capture
sleep(60)
headless.video.stop_and_save("/root/videos/video.mov") headless.destroy