I am using capybara to click a checkbox, however it can\'t seem to find it no matter what I do. I am able to correctly find both the span and the label inside the span, but
Try this page.execute_script("$('#agreement').attr('checked', true)"). To make this work you should tag your examples with js: true
page.execute_script("$('#agreement').attr('checked', true)")
js: true