Capybara helps you test web applications by simulating how a real user would interact with your app. It is agnostic about the driver running your tests and comes with Rack::Test and Selenium support built in. WebKit is supported through an external gem.

Selecting from a drop down

find('#element_page_id').find(:xpath, "option[#{option_value}]").select_option

Finding exact matches on a page

  expect(body).to have_selector(selector_name, text: message, exact_text: true)