1
votes

I am new here. Is there any way to use headless in windows? I tried but it says :

:/Ruby193/lib/ruby/gems/1.9.1/gems/headless-1.0.1/lib/headless/cli_util.rb:4:in ``': No such file or directory - which Xvfb (Errno::ENOENT)

Please help...

2

2 Answers

1
votes

Headless Tests in "WINDOWS7" using WATIR? You can use phantomjs which is super easy to configure. Follow these easy steps:

  1. Download phantomjs from here
  2. Extract to desired folder, once extracted you just need phantomjs.exe
  3. Now where ever you instantiating the browser, use it like this:

    phantom_dir = "location of phantomjs.exe"
    ENV['PATH'] = "#{ENV['PATH']}#{File::PATH_SEPARATOR}#{ghost_dir}"
    browser = Watir::Browser.new :"phantomjs"
    

To run headless on other OS follow easy steps here

0
votes

You have to run it on a linux box. Xvfb doesn't exist in Windows or Mac