In a Rails application I\'m trying to test a Bootstrap modal with a jQuery TokenInput field in Rspec using Capybara with the capybara-webkit driver. The portion
We just do this and it seems to work (for example to click on $('.tp-header-login'):
# instead of find(".tp-header-login")
find(".tp-header-login") # still do the find so you are sure its loaded then...
execute_script "$('.tp-header-login').click()"