Please help me solve this problem with capybara
I have a button like this in capybara:
<input type="submit" value="Verify" name="verify" id="verify" class="button">
I tried with
click_button "verify"
but it gives error:
Failure/Error: find('#verify').click
NoMethodError:
undefined method `node_name' for nil:NilClass
Answer by the author
The problem lies inside the html code:
Because there is one redundant
</div>, the<input>was treat outside the form, hencecapybaracause those error. After delete the redundant</div>, everything works fine.