Monday 7 February 2011

Lessons from a WATIR to WATIR-Webdriver port - #1 When it comes to Firefox, size matters

I wanted to record problems found (and perhaps solved?) while attempting to port a test automation framework from WATIR to WATIR - Webdriver, and a simple blog entry seemed to be the easiest way.


Slow Firefox Startup


I was finding that it was taking upwards of 30 seconds to launch Firefox at the start of a test.  This compared badly with WATIR, where the same test was a few seconds.

The problem;

As part of Selenium::WebDriver::Firefox::Launcher, the FF profile is copied to a temporary folder.  This uses FileUtils.cp_r and appears to be slow.

The solution:

Make sure the firefox profile used on your test run machine is as small as possible.  I removed Firebug, EditCookies and a few other add-ons, and this reduced the start up time to a few seconds and comparable to WATIR





No comments:

Post a Comment