Search code examples
ruby-on-railsseleniumphantomjscapybarapoltergeist

Capybara: Pros and Cons of multiple drivers


I have a suite of capybara tests. By default I'm using Poltergeist/PhantomJS as my driver. Some of these tests are testing against video and audio tags. If you don't know already PhantomJS doesn't support these tags and it looks like they have no plans to do so. What I've discovered is is that if I set the driver to Selenium for the tests checking audio and video, the tests will pass. Are there any cons to using multiple drivers in my tests? I feel like this is a hacky solution but I know no other alternative. The reason we are using PhantomJS is because it's a headless browser.


Solution

  • The only real downsides to using multiple drivers is the increased memory consumption while the tests are running due to the launch of multiple "browsers", and the need to make sure the machines your tests are running on have all the apps necessary to support the drivers you're using (the browser you've configured selenium to use, etc)