firefoxwatirfirewatirwatir-webdriverheadless-browser

How do I run Firefox browser headless with my Ruby script?


I need to be able to run my Ruby scripts with my Hudson builds but don't want a browser window attempting to open. I tried:

batman:ETW cmiller$ ./createAccount.rb -b

but this did not work.

How can I run my Ruby scripts using FireWatir headless?

Running on Mac OSX


Solution

  • I would look at using Watir-Webdriver instead of just plain Watir or Fire-watir. Especially since the only way to work with newer versions of firefox is going to be via Watir-Webdriver.

    There's an earlier SO question where the answer covers just this sort of thing, so I'd suggest trying what is described there there first. Can I use Watir to scrape data from a website on a linux server without monitor?

    Also since I now know you are using Mac OS, the advice in this thread from the webdriver google group might be more applicable to you