Firefox 19 and unable to obtain stable firefox connection in 60 seconds

Problem
You have just upgraded your Firefox to the latest release (currently 19) and when running your javascript cucumber tests you get the following error:

Solution
Add the latest selenium-webdriver to your Gemfile and run bundle update:

Adding a record in Rails through javascript

Problem

You would like to trigger a record insertion after a specific action has happened through javascript (ie drag – drop an item into a container), in a rails application.

 

Solution

You would need to get the object attributes from the html page somehow (ie user_id and user_name), and then have a function in your application js that calls the post function.

So if you have a drag and drop container for example then the code in the application.js should be like the following: