Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 744
Tom Maeckelberghe Avatar asked Mar 25 '11 15:03

Tom Maeckelberghe


Video Answer


1 Answers

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.

like image 128
jarib Avatar answered Sep 22 '22 20:09

jarib