Chapter 15Using Capybara to Test Ajax Web Applications

One of the most popular ways to use Cucumber is to automate the testing of web applications. Here is a dirty little secret:

Cucumber has no idea how to talk to a web application!

That’s right—it’s completely useless for that. Still, people keep using it to test web applications. How come?

Remember, Cucumber isn’t much more than a tool that can parse Gherkin feature files and execute step definitions. It doesn’t know how to talk to databases, web apps, or any external system. People install other libraries for this and use them in their step definitions and support code to connect to those external systems.

At the time of writing, the most popular Ruby library for interacting with a ...

Get The Cucumber Book, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.