Fix: Capybara is very slow when filling out fields in large forms

Updated . Posted . Visible to the public. Deprecated.

We haven't tested if this very old issue still exists.

In large forms (30+ controls) new Capybara version become [extremely slow] when filling out fields. It takes several seconds per input. The reason for this is that Capybara generates a huge slow XPath expression to find the field.

The attached code patches fill_in with a much faster implementation. It's a dirty fix and probably does a lot less than Capybara's own fill_in so don't use it unless you are having problems with test suites that are unusable because of this problem.

To use the patch in Cucumber, copy it to features/support.

Henning Koch
Last edit
Jonas Schiele
Attachments
License
Source code in this card is licensed under the MIT License.
Posted by Henning Koch to makandra dev (2012-06-14 13:02)