How to check a checkbox in capybara?

I found the following worked for me:

# Check
find(:css, "#cityID[value="62"]").set(true)

# Uncheck
find(:css, "#cityID[value="62"]").set(false)

Leave a Comment