This gem makes Watir work with Hanami.
Add this code to your Gemfile:
group :test do gem "watir-hanami" end
Just use Watir like you've always done in your requests/integration tests:
browser = ::. browser.goto home_path browser.text_field(name: "first").set "Jarmo" browser.text_field(name: "last").set "Pertman" browser.(name: "sign_in").click
- This is a [quick] adaptation of watir-rails. All the heavy lifting was done by those folks.