Execute JavaScript + Capybara

There are certain cases where we need some custom JavaScript while writing some Integration test cases. For such cases you can use page.execute_script.


For Example
page.execute_script("$('#blog-hover-#{blog.id}').show();")

Comments

Popular posts from this blog

Interview Question on Ruby on Rails

Inserting and Moving elements inside Ruby Array