Like most Ruby on Rails developers, I write lots of test cases for my models and controllers. My test cases act as a safety net, warning me whenever existing code fails. Sadly, it���s much harder to test client-side behavior. We need a better way to test the system end-to-end, including the actual JavaScript and web browsers. This article shows how to combine Selenium, Selenium on Rails, and a custom patch to write client-side test cases in Ruby.