Search code examples
seleniumcucumberwebrat

How to easily switch between Webrat and Selenium?


Please let me know how can I easily switch between Webrat and Selinium? Selinium takes longer as it simulates by opening the real browser. In some cases I do not need this and just Webrat, showing results in command line is just fine and faster. Is there anyway to configure cucumber to switch between Webrat and Selenium??


Solution

  • Capybara is designed to be a webrat replacement, and it supports multiple back-end drivers (including Selenium) and you can switch between them, even during a test run. For example, maybe you want most of your tests to run fast but some require ajax testing / cross-browser testing and for those you can switch to Selenium.