user968903
user968903

Reputation: 329

What's the advantage of using Capybara while I'm using Selenium 2 and Cucumber for functional testing?

I'm writing functional tests for a chrome app written entirely in javascript. I decided to use Cucumber and Selenium Webdriver and run the tests on chrome. Wrote Selenium code inside Cucumber step definitions and it works fine (I've only just begun though).

I see that I can do headless testing with capybara (or webrat) and I'm not interested in that. Is there anything else that I'd gain if I use capybara?

Upvotes: 2

Views: 887

Answers (2)

gstroup
gstroup

Reputation: 1064

I recently had the same question. Capybara gives you a pretty nice DSL to interact with the DOM for one thing. Another big advantage is you can easily switch drivers. On my team, we constantly switch from the Chrome driver (desktop browser) to the iWedbDriver (mobile safari in iphone simulator).

Upvotes: 1

Marnen Laibow-Koser
Marnen Laibow-Koser

Reputation: 6337

Headless testing is generally a very good thing, since the tests run faster if they don't have to draw the browser window. If the tests run faster, then you'll run them more often. If you're not interested in that, you're making a big mistake.

Upvotes: 0

Related Questions