From bd6cd436de8a06c975933808aef7aa961acf3116 Mon Sep 17 00:00:00 2001 From: Damian Janowski Date: Mon, 12 Apr 2010 16:39:27 -0300 Subject: [PATCH] Point users in the right direction when selenium is not available. --- lib/webrat/selenium/selenium_session.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/webrat/selenium/selenium_session.rb b/lib/webrat/selenium/selenium_session.rb index 8db30fa..e696b3a 100644 --- a/lib/webrat/selenium/selenium_session.rb +++ b/lib/webrat/selenium/selenium_session.rb @@ -3,7 +3,12 @@ require "webrat/selenium/selenium_rc_server" require "webrat/selenium/application_server_factory" require "webrat/selenium/application_servers/base" -require "selenium" +begin + require "selenium" +rescue LoadError => e + e.message << " (You may need to install the selenium-rc gem)" + raise e +end module Webrat class TimeoutError < WebratError