Search code examples
ruby-on-railsfirefoxcucumbercapybarawebdriver

Is it possible to let capybara/webdriver start firefox minimized/unfocused?


Is it possible to stop Firefox from popping up when cucumber hits a @javascript tag? After a while it gets frustrating to always get disrupted while running tests.

It would be nice if webdriver was to start Firefox minimized or not focus on it.


Solution

  • There's no API in WebDriver to do this, and it's not really advisable since Firefox won't trigger certain events (like focus, blur) when the window is in the background. I usually work around this by using a virtual machine (e.g. in VirtualBox) or a separate X display.