I have a js submit button that is a input element within an li.
So it is not a link or a button and presumably this is why the click_on
isn't working right - I get
Failure/Error: click_on 'user_submit_action'
Capybara::ElementNotFound:
no link or button 'user_submit_action' found
Code...
</fieldset>
<fieldset class="actions"><ol>
<li class="action input_action" id="user_submit_action"><input class="a1" name="commit" type="submit" value="Create User" /></li>
</ol></fieldset></form> </div>
</div>
Like this ?
find("#user_submit_action").find("input").click
You can see the doc : http://rubydoc.info/github/jnicklas/capybara/master/Capybara/Node/Finders.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With